Skip to main content

Generate synthetic data from datadoc metadata

Project description

Metamock

PyPI Status Python Version License

Documentation Tests

pre-commit Black Ruff Poetry

Features

  • Generate synthetic data from a Datadoc metadata document.
  • Column data types will correspond with those specified in the metadata.
  • Where Statistics Norway's classification system Klass is referenced, data will be generated from the codes.
  • Choose the output file format from json, csv or parquet.
  • Placeholder data is used where nothing more specific can be found in the metadata.

Example

metamock --datadoc-document tests/data/person_data_v1__DOC.json --output-path ~/metamock/output --output-filename datadoc_example --file-type csv
csvlook --delimiter ";" --max-columns 10 --max-rows 2 ~/metamock/output/datadoc_example.csv

| a | pers_id        |  tidspunkt | sivilstand | alm_inntekt | ... |
| - | -------------- | ---------- | ---------- | ----------- | --- |
| 0 | et             | 1977-08-22 | fugiat     |         696 | ... |
| 1 | nam            | 1986-08-05 | cum        |         692 | ... |
| 2 | exercitationem | 2000-06-17 | illum      |         476 | ... |
| 3 | dignissimos    | 1985-12-12 | ab         |         642 | ... |
| 4 | ipsa           | 2023-02-04 | nihil      |         189 | ... |
| ... | ...            |        ... | ...        |         ... | ... |

Installation

You can install Metamock via pipx:

pipx install ssb-metamock

Usage

Please see the Reference Guide for details.

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

License

Distributed under the terms of the MIT license, Metamock is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Credits

This project was generated from Statistics Norway's SSB PyPI Template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ssb_metamock-0.1.0.tar.gz (12.4 kB view hashes)

Uploaded Source

Built Distribution

ssb_metamock-0.1.0-py3-none-any.whl (14.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page