The echemdb Python package can interact with a database of frictionless datapackages containing electrochemical data following echemdb's metadata schema. Such a database can be generated from the data on echemdb.org or from local files.
Detailed installation instructions, description of the modules, advanced usage examples, including local database creation, are provided in our documentation.
Installation instructions
Install the latest stable version of echemdb from PyPI or conda.
pip install echemdb
conda install -c conda-forge echemdb
Python API
The currently available data shown on echemdb.org can be downloaded and stored in a database.
>>> from echemdb.cv.cv_database import CVDatabase
>>> db = Database()
Filtering the database for entries having specific properties, e.g., containing Pt as working electrode material, returns a new database.
>>> db_filtered = db.filter(lambda entry: entry.system.electrodes.working_electrode.material == 'Pt')
A single entry can be retrieved with the identifiers provided on the website (see for example engstfeld_2018_polycrystalline_17743_f4b_1)
>>> entry = db['engstfeld_2018_polycrystalline_17743_f4b_1']
Each entry has a set of descriptors such as its source or the electrochemical system.
>>> entry.source # or entry['source']
{'citation key': 'engstfeld_2018_polycrystalline_17743', 'curve': 1, 'url': 'https://doi.org/10.1002/chem.201803418', 'figure': '4b', 'version': 1}
The data related to an entry can be returned as a pandas dataframe (values are provided in SI units).
>>> entry.df
t E j
0 0.000000 -0.196962 0.043009
1 0.011368 -0.196393 0.051408
...
The dataframe can be returned with custom or original figure axes' units by rescaling the entry.
>>> entry.rescale({'E' : 'mV', 'j' : 'uA / m2'}).df
t E j
0 0.000000 -196.961730 43008.842162
1 0.011368 -196.393321 51408.199892
...
>>> entry.rescale('original').df
t E j
0 0.000000 -0.196962 4.300884
1 0.011368 -0.196393 5.140820
...
The units and reference electrodes can be found in the resource schema. The units are updated upon rescaling an entry.
>>> entry.package.get_resource('echemdb')['schema']
{'fields':
[{'name': 't', 'unit': 's', 'type': 'number'},
{'name': 'E', 'unit': 'V', 'reference': 'RHE', 'type': 'number'},
{'name': 'j', 'unit': 'A / m2', 'type': 'number'}]}
The data can be visualized in a plotly figure:
>>> entry.plot()
License
The contents of this repository are licensed under the GNU General Public License v3.0 or, at your option, any later version.
Metadata
Release files for echemdb 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| echemdb-0.6.0.tar.gz | 27.4 kB | Without provenance | Details for echemdb-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| echemdb-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for echemdb-0.6.0-py3-none-any.whl |
Total release size: 60.5 kB
Release files / echemdb-0.6.0.tar.gz
| Download URL | echemdb-0.6.0.tar.gz |
|---|---|
| Size | 27.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f83c63d3292aa302c00d8cf983e149926142b82146d69332d88d61f1e404df75
|
|
BLAKE2b-256 checksum How to use checksums |
50cdb6f10c82fd0a4bf4e052230fa4360a1d60c00bb2680457983c8f38dd2e2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Release files / echemdb-0.6.0-py3-none-any.whl
| Download URL | echemdb-0.6.0-py3-none-any.whl |
|---|---|
| Size | 33.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ef5df802fea984839ddd73cacc70bcb42607586d884024b4c5c62d8545623b6
|
|
BLAKE2b-256 checksum How to use checksums |
b5459fe874c8cad71651c944d7b7884c5593b47c1204ba96b78053e539169399
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Security for echemdb 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.