Welcome to echemdb-converters’s documentation!

echemdbconverters provides a command line interface (CLI) for creating echemdb compatible unitpackages from CSV or CSV like files. The module can be extended to load different kind of CSV files and/or to convert files with different structure but similar content into a standardized format. An API to the loaders and converters allows for seamless integration in existing workflows.

Warning

This module is still under development.

Examples

Hint

An ! in the following examples indicates a shell command which is executed in a jupyter cell. Remove the ! to run the command in a shell.

Note

The input and output files for and from the following commands can be found in the test folder of the repository.

A frictionless datapackage consits of a JSON, describing one or more tabular data files. With echemdbconverters, a frictionless datapackage can be created from a CSV without header, where the first line contains the column names.

!echemdbconverters csv ../test/csv/default.csv --outdir ../test/generated

By providing information on the units of the columns in a metadata file (YAML) a unitpackage can be created. The units to the columns must be included in the YAML under figure_description.fields, according to the frictionless field schema. See example YAML for reference.

!echemdbconverters csv ../test/csv/unit.csv --metadata ../test/csv/unit.csv.metadata --outdir ../test/generated

Specific loaders convert non-standard CSV, which, for example, contain a certain number of header lines, values are separated by different separators, or have a different decimal separator. Such files are often generated from software supplied with data acquisition instruments. The header is removed in the resulting CSV to the unitpackage.

!echemdbconverters csv ../test/csv/eclab_cv_csv.mpt --device eclab --metadata ../test/csv/eclab_cv_csv.mpt.metadata --outdir ../test/generated
No units to the fields provided in the metadata

Further usage

Use echemdbs’ unitpackage to browse, modify and visualize the data.

from unitpackage.collection import Collection
db = Collection.from_local('../test/generated')
entry = db['eclab_cv_csv']
entry
Entry('eclab_cv_csv')

Installation

This package is available on PiPY and can be installed with pip:

pip install echemdbconverters

See the installation instructions for further details.

License

The contents of this repository are licensed under the GNU General Public License v3.0 or, at your option, any later version.