DBDelve
Dive deep into your data. A fast, native, multi-engine database client written in Rust. Free and open source, no telemetry.
翻訳待ち
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗The svgdigitizer allows recovering data from a curve in a figure, plotted in a 2D coordinate system, which is usually found in scientific publications.
The data is accessible either with a command line interface or the API from a specifically prepared scaled vector graphics (SVG) file. The data can be stored as a frictionless datapackage (CSV and JSON) which can be used with unitpackage to access the plots metadata or create a database of such datapackages.
The svgdigitizer has additional features compared to other plot digitizers, such as:
Refer to our documentation for more details.
This package is available on PyPI and can be installed with pip:
pip install svgdigitizer
The package is also available on conda-forge and can be installed with conda
conda install -c conda-forge svgdigitizer
or mamba
mamba install -c conda-forge svgdigitizer
Please consult our documentation for more detailed installation instructions.
The CLI allows creating SVG files from PDFs and allows digitizing the processed SVG files. Certain plot types have specific commands to recover different kinds of metadata. Refer to the CLI documentation for more information.
$ svgdigitizer
Usage: svgdigitizer [OPTIONS] COMMAND [ARGS]...
The svgdigitizer suite.
Options:
--help Show this message and exit.
Commands:
cv Digitize a cylic voltammogram and create a frictionless datapackage.
digitize Digitize a 2D plot and create a frictionless datapackage.
figure Alias of the `digitize` command. (DEPRECATED: Use `digitize` instead.)
paginate Render PDF pages as individual SVG files with linked PNG images.
plot Display a plot of the data traced in an SVG.
$ svgdigitizer digitize doc/files/others/looping_scan_rate.svg --sampling-interval 0.01
You can also use the svgdigitizer package directly from Python, to access properties of the SVG or additional properties associated with the figure.
>>> from svgdigitizer.svg import SVG
>>> from svgdigitizer.svgplot import SVGPlot
>>> from svgdigitizer.svgfigure import SVGFigure
>>> figure = SVGFigure(SVGPlot(SVG(open('doc/files/others/looping.svg', 'rb')), sampling_interval=0.01))
Examples:
figure.df provides a dataframe of the digitized curve.
figure.plot() shows a plot of the digitized curve.
figure.metadadata provides a dict with metadata of the original plot, such as original units of the axis.
The svgdigitizer can be enhanced with submodules, which are designed to digitize specific plot types, such as the submodule electrochemistry.cv.
This submodule allows digitizing cyclic voltammograms commonly found in the field of electrochemistry.
>>> from svgdigitizer.svg import SVG
>>> from svgdigitizer.svgplot import SVGPlot
>>> from svgdigitizer.electrochemistry.cv import CV
>>> cv_svg = 'doc/files/mustermann_2021_svgdigitizer_1/mustermann_2021_svgdigitizer_1_f2a_blue.svg'
>>> cv = CV(SVGPlot(SVG(open(cv_svg, 'rb')), sampling_interval=0.01))
The resulting cv object has the same properties as the figure object above.
Contributions are welcome! Please read our contributing guidelines to learn how to set up a development environment, run the tests and submit a pull request.
question label.Everyone participating in this project is expected to follow our Code of Conduct.