Metamock#
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,csvorparquet.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.