{"id":19958021,"url":"https://github.com/echemdb/svgdigitizer","last_synced_at":"2025-08-20T20:32:11.273Z","repository":{"id":37788864,"uuid":"372877535","full_name":"echemdb/svgdigitizer","owner":"echemdb","description":"(x,y) Data Points from SVG files","archived":false,"fork":false,"pushed_at":"2025-08-03T09:31:33.000Z","size":42183,"stargazers_count":19,"open_issues_count":21,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-03T11:28:41.192Z","etag":null,"topics":["data-mining","python","svg","vector-graphics"],"latest_commit_sha":null,"homepage":"https://echemdb.github.io/svgdigitizer/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/echemdb.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":".zenodo.json"}},"created_at":"2021-06-01T15:27:42.000Z","updated_at":"2025-08-03T09:29:45.000Z","dependencies_parsed_at":"2024-06-02T11:46:42.590Z","dependency_job_id":"9daee789-3f7d-47b0-b799-70393f6a74ef","html_url":"https://github.com/echemdb/svgdigitizer","commit_stats":{"total_commits":1077,"total_committers":4,"mean_commits":269.25,"dds":0.3370473537604457,"last_synced_commit":"fce0b3dde11e4782a8853bb1aea1781b4fad889e"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/echemdb/svgdigitizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echemdb%2Fsvgdigitizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echemdb%2Fsvgdigitizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echemdb%2Fsvgdigitizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echemdb%2Fsvgdigitizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/echemdb","download_url":"https://codeload.github.com/echemdb/svgdigitizer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echemdb%2Fsvgdigitizer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271378680,"owners_count":24749192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-mining","python","svg","vector-graphics"],"created_at":"2024-11-13T01:39:51.173Z","updated_at":"2025-08-20T20:32:11.240Z","avatar_url":"https://github.com/echemdb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\r\n    \u003cimg alt=\"logo\" src=\"./logo.png\" width=\"300px\"\u003e\r\n\u003c/p\u003e\r\n\r\n\u003ch1\u003e\u003cp align=\"center\"\u003esvgdigitizer\u003c/p\u003e\u003c/h1\u003e\r\n\r\n\u003cp align=\"center\"\u003e\r\n  \u003cimg src=\"https://img.shields.io/badge/License-GPL_3.0_or_later-blue.svg\" alt=\"License: GPL 3.0 or later\"\u003e\r\n  \u003ca href=\"https://doi.org/10.5281/zenodo.8428961\"\u003e\u003cimg src=\"https://zenodo.org/badge/DOI/10.5281/zenodo.8428961.svg\" alt=\"DOI\"\u003e\u003c/a\u003e\r\n\u003c/p\u003e\r\n\r\n\u003cp align=\"center\"\u003eExtract (x,y) data points from SVG files\u003c/p\u003e\r\n\u003chr\u003e\r\n\r\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://github.com/user-attachments/assets/4a56eae4-62f1-4466-a70a-dddba1c78216\" width=\"80%\"\u003e\r\n  \r\nThe `svgdigitizer` allows recovering data from a curve in a figure, plotted in a 2D coordinate system, which is usually found in scientific publications.\r\nThe 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](https://frictionlessdata.io/) (CSV and JSON) which can be used with [unitpackage](https://echemdb.github.io/unitpackage/) to access the plots metadata or create a database of such datapackages.\r\n\r\n# Features\r\n\r\nThe `svgdigitizer` has additional features compared to other plot digitizers, such as:\r\n\r\n* supports **multiple y (x) values per x (y) value**\r\n* usage of splines allows for very **precise retracing** of distinct features\r\n* splines can be digitized with specific **sampling intervals**\r\n* supports plots with distorted/**skewed axis**\r\n* **extracts units** from axis labels\r\n* **reconstruct time series** with a given scan rate\r\n* supports **scale bars**\r\n* supports **scaling factors**\r\n* **extracts metadata** associated with the plot in the SVG\r\n* **saves data as [frictionless datapackage](https://frictionlessdata.io/)** (CSV + JSON) allowing for [FAIR](https://en.wikipedia.org/wiki/FAIR_data) data usage\r\n* **inclusion of metadata** in the datapackage\r\n* **Python API** to interact with the retraced data\r\n\r\nRefer to our [documentation](https://echemdb.github.io/svgdigitizer/) for more details.\r\n\r\n## Installation\r\n\r\nThis package is available on [PyPI](https://pypi.org/project/svgdigitizer/) and can be installed with pip:\r\n\r\n```sh .noeval\r\npip install svgdigitizer\r\n```\r\n\r\nThe package is also available on [conda-forge](https://github.com/conda-forge/svgdigitizer-feedstock) and can be installed with conda\r\n\r\n```sh .noeval\r\nconda install -c conda-forge svgdigitizer\r\n```\r\n\r\nor mamba\r\n\r\n```sh .noeval\r\nmamba install -c conda-forge svgdigitizer\r\n```\r\n\r\nPlease consult our [documentation](https://echemdb.github.io/svgdigitizer/) for\r\nmore detailed [installation instructions](https://echemdb.github.io/svgdigitizer/installation.html).\r\n\r\n## Command Line Interface\r\n\r\nThe 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](https://echemdb.github.io/svgdigitizer/cli) for more information.\r\n\r\n```sh\r\n$ svgdigitizer\r\nUsage: svgdigitizer [OPTIONS] COMMAND [ARGS]...\r\n\r\n  The svgdigitizer suite.\r\n\r\nOptions:\r\n  --help  Show this message and exit.\r\n\r\nCommands:\r\n  cv        Digitize a cylic voltammogram and create a frictionless datapackage.\r\n  digitize  Digitize a 2D plot.\r\n  figure    Digitize a figure with units on the axis and create a frictionless datapackage.\r\n  paginate  Render PDF pages as individual SVG files with linked PNG images.\r\n  plot      Display a plot of the data traced in an SVG.\r\n\r\n$ svgdigitizer figure doc/files/others/looping_scan_rate.svg --sampling-interval 0.01\r\n```\r\n\r\n## API\r\n\r\nYou can also use the `svgdigitizer` package directly from Python, to access properties of the SVG or additional properties associated with the figure.\r\n\r\n```python\r\n\u003e\u003e\u003e from svgdigitizer.svg import SVG\r\n\u003e\u003e\u003e from svgdigitizer.svgplot import SVGPlot\r\n\u003e\u003e\u003e from svgdigitizer.svgfigure import SVGFigure\r\n\r\n\r\n\u003e\u003e\u003e figure = SVGFigure(SVGPlot(SVG(open('doc/files/others/looping.svg', 'rb')), sampling_interval=0.01))\r\n```\r\n\r\nExamples:\r\n`figure.df` provides a dataframe of the digitized curve.\r\n`figure.plot()` shows a plot of the digitized curve.\r\n`figure.metadadata` provides a dict with metadata of the original plot, such as original units of the axis.\r\n\r\nThe `svgdigitizer` can be enhanced with submodules, which are designed to digitize specific plot types, such as the submodule `electrochemistry.cv`.\r\n\r\nThis submodule allows digitizing cyclic voltammograms\r\ncommonly found in the field of electrochemistry.\r\n\r\n```python\r\n\u003e\u003e\u003e from svgdigitizer.svg import SVG\r\n\u003e\u003e\u003e from svgdigitizer.svgplot import SVGPlot\r\n\u003e\u003e\u003e from svgdigitizer.electrochemistry.cv import CV\r\n\r\n\u003e\u003e\u003e cv_svg = 'doc/files/mustermann_2021_svgdigitizer_1/mustermann_2021_svgdigitizer_1_f2a_blue.svg'\r\n\u003e\u003e\u003e cv = CV(SVGPlot(SVG(open(cv_svg, 'rb')), sampling_interval=0.01))\r\n```\r\n\r\nThe resulting `cv` object has the same properties as the `figure` object above.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fechemdb%2Fsvgdigitizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fechemdb%2Fsvgdigitizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fechemdb%2Fsvgdigitizer/lists"}