About project (README Rus)
This repo contains real example of building chart for scientific article using Measurelook file with Inkscape and R.
How it works:
- Data is readed and prepared.
- Prepared data is passed it templater input (Mustache) and templater output returns R program to build SVG chart.
- R executes program. You recieve SVG files.
- Generated pic-preview.html with SVGs links to quick preview in browser.
- (optional) SVG processes in PNG and PDF with Inkscape
Note: This repo contains Implementation-1 of image builder. I have a revised Implementation-2 which is more reusable but it is not published yet.
- Download repo
- npm i
- Fix config\config.json - change path to R (required) and Inkscape (only if you need convert svg->png and svg->pdf)
- node app.js
- config - run settings
- measures - folder with Measurelook data files
- pdfs - PDF folder
- plots
- index.js - starter of chart building
- performanceData2_2.js - preparing data for chart
- printDataPreprocessor.js - reusable chart data postprocessing
- pngs - PNG folder
- svgs - SVG folder
- templates - R templates folder
- utils
- databaseLoader.js - reader of Measurelook files
- dataExtractor.js - tracks extractor
- generateHtml.js - pic-preview.html generator
- runR.js - running of R script from JavaScript
- app.js - application starter
- pic-preview.html - preview SVGs in browser
eclint check
eclint fix
"node_modules/.bin/eslint" app.js --fix
"node_modules/.bin/eslint" plots --fix
"node_modules/.bin/eslint" utils --fix
"node_modules/.bin/eslint" config --fix