Skip to main content

A cldfbench plugin to curate D-PLACE datasets

Project description

pydplace

A Python library to curate D-PLACE data.

Build Status PyPI

To install pydplace run

pip install pydplace

Usage

Bootstrapping a pydplace-curated dataset

pydplace provides a cldfbench dataset template to create the skeleton of files and directories for a D-PLACE dataset, to be run with cldfbench new.

Running

cldfbench new --template dplace_dataset 

will create a dataset skeleton looking as follows

$ tree testtree/

Implementing CLDF creation

Implementing CLDF creation means - as for any other cldfbench-curated dataset - filling in the cmd_makecldf method of the Dataset subclass in cldfbench_<id>.py.

Running CLDF creation

With cmd_makecldf implemented, CLDF creation can be triggered running

cldfbench makecldf cldfbench_<id>.py

The resulting CLDF dataset can be validated running

pytest

Release workflow

cldfbench makecldf --glottolog-version v5.0 --with-cldfreadme cldfbench_<id>.py
pytest

Now inspect the changes and add a corresponding section to CHANGELOG.md.

cldfbench zenodo --communities dplace cldfbench_<id>.py
cldfbench cldfviz.map cldf --pacific-centered --format png --width 20 --output map.png --with-ocean --no-legend
cldfbench readme cldfbench_<id>.py
dplace check cldfbench_<id>.py
git commit -a -m"release v3.1"
git push origin
dplace release cldfbench_<id>.py v3.1

Then create a release on GitHub, thereby pushing the repos to Zenodo.

Using the datasets

$ csvgrep -c Var_ID -m AnnualMeanTemperature cldf/data.csv | csvstat -c Value
  4. "Value"

	Type of data:          Number
	Contains null values:  False
	Unique values:         1649
	Smallest value:        -19,45
	Largest value:         29,153
	Sum:                   32.700,717
	Mean:                  16,449
	Median:                19,721
	StDev:                 9,684
	Most common values:    14,392 (9x)
	                       21,66 (6x)
	                       6,96 (6x)
	                       23,335 (5x)
	                       21,619 (5x)

Row count: 1988

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

pydplace-3.2.0.tar.gz (388.6 kB view details)

Uploaded Source

Built Distribution

pydplace-3.2.0-py2.py3-none-any.whl (394.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pydplace-3.2.0.tar.gz.

File metadata

  • Download URL: pydplace-3.2.0.tar.gz
  • Upload date:
  • Size: 388.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for pydplace-3.2.0.tar.gz
Algorithm Hash digest
SHA256 f68ebf385f95903b0f8197016f7f029fc00ad219d8420df89e25a8982432842b
MD5 c5610646cdee987332317f452518a11e
BLAKE2b-256 ada41742f923e9219fe68f7a0f7058019dda31e516f6ef4c9abaddb7131ec68c

See more details on using hashes here.

File details

Details for the file pydplace-3.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: pydplace-3.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 394.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for pydplace-3.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 edd81e4434a48c1fa7c026687961ffb52bdb0fcd4b26bab6da652a5cf44787d5
MD5 199cdd6422ca5446e6a48c775c9d70d8
BLAKE2b-256 d16e530b817dd0bf8a1da137e381492ac3926fd35c8abf4d74dd5f16937641a4

See more details on using hashes here.

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