CSV2WikiChart AppLSAC
Wikipedia and Wikiversity have templates for creating a graphs/diagram based on data (see Template:Graph:Chart in Wikipedia).
- Demo CSV2WikiChart - WebApp processes data on the client in your browser.
The benefit of data driven dynamic graphs is that the mathematical curves can be updated much easier from a spreadsheet software like LibreOffice Calc. The concept of this repository was create for the learning resource COVID-19 in Wikiversity. Considering this AppLSAC as example to convert spreadsheet data for multiple curves into chart syntax of Wikipedia and Wikiversity. The development of the WebApp csv2wikichart_app
was documented in CSV2Chart on Wikiversity as a learning resource how to create an AppLSAC for CSV conversion (i.e. for developers). This a AppLSAC csv2wikichart_app
itself was create authors in Wikiversity (e.g. COVID-19 Mathematical Modelling to create charts for the modelling results. Furthermore the AppLSAC can be used for number of cases other cases in which generated data must be updated in Wikiversity on a regular basis. Using an image for graph in WikiCommons and embed the image in a learning resource of article in Wikipedia or Wikiversity can be done as well, but updating of images in WikiCommons e.g. on a daily or weekly basis is consuming much more disk space for versioning and for an update of data just adds one additional (x,y) value pair must be added to the chart or the updated chart is generated again with the AppLSAC csv2wikichart_app
. The development of this AppLSAC is also based on the Wikiveristy learning resource about AppLSAC WebApps that use JSON2Schema for App generation in 5min. The JSON editor integrated in the tool was build by Jeremy Dorn.
Basic Structure of AppLSACs
This WebApp CSV2WikiChart
is an AppLSAC with the
- (Processing Data) JSON Editor by Jeremy Dorn and generating the graph with HandleBars4Code,
- (Load Data) loading data with LoadFile4DOM and
- (Save Data) saving data with FileSaver.js by Eli Grey.
Preview of WebApp
Title Demo | URL for Demo |
---|---|
CSV2WikiChart - Default Demo - Graph/Chart template | https://niebert.github.io/csv2wikichart_app |
CAS4Wiki - Computer Algebra System for Wikiveristy | https://niebert.github.io/WikiversityDoc/cas4wiki.html |
CAS4Wiki shows an alternative option of Chart generation in Wikiversity learning resources. Those charts are more interactive and based on mathematical functions in comparison to the 2D plot of data.
The hamburger menu was create with JSON2Schema and JSONEditor4Menu.
Applications in other Repositories
- JSON2Schema on GitLab uses the
jsoneditor_app
as AppLSAC and replaces the default JSON schema inschema/schema4json.js
by a generated new schema created by JSON2Schema. JSON2Schema usesjsoneditor_app
as default AppLSAC and creates aJSON schema
from a givenJSON
and theJSON schema
is used for the definition of the input elements for this JSON editorjsoneditor_app
. So JSON2Schema replaces the schema in filejsoneditor_app/schema/schema4json.js
in thejsoneditor_app.zip
with a dynamically generated JSON Schema and provides the updatedjsoneditor_app.zip
for download in JSON2Schema on GitLab.
jsoneditor_app.zip
in JSON2Schema
Validation of the ZIP JSON2Schema is an AppLSAC just like jsoneditor_app
. It runs offline and does not require internet resources other than the browser. Nevertheless a ZIP can be used to ship harmful code to the client. Therefore it is important that the content of the generated ZIP-file can be assessed by the user of JSON2Schema. This repository jsoneditor_app
shows the content of the ZIP-file. The ZIP-file can be base64 encoded with create_files4json.html
and the ZIP-file for the jsoneditor_app repository can be stored in as JSON data for further processing in an AppLSAC like JSON2Schema.
JSON2Schema adds a new JSON schema and Handlebars4Code
template according to the input JSON to the jsoneditor_app.zip
.
Furthermore if you want to replace this JSON editor by your own JSON editor e.g. with a different layout or a new release of the JSON Editor json-editor
, please feel free to encode your own modified ZIP file of your JSON Editor jsoneditor_app
by create_files4json.html
into a base64 encoded library that stores your ZIP for further processing just in your browser as AppLSAC. With create_files4json.html
you can replace your own JSON editor by default JSON Editor in db/files4json.js
of JSON2Schema with your own jsoneditor_app
. It is recommended to use a JSON editor of Jeremy Dorn so that the JSON schema is support for the editor. For the underlying jsoneditor
by Jeremy Dorn it might be necessary to generate an adapted version of schema4json.js
that matches with the schema definition of your own JSON editor. The generated schema is delivered in schema/schema4json.js
. If you want alter the underlying JSON replace the following:
tpl/template4json_tpl.js
that contains the template for rendering the output withHandlebars4Code
.schema/schema4json.js
that defines the JSON Schema for definition of input elements in the JSON editor according to the JSON elements.