Skip to main content

Programmatic curation of Glottography datasets

Project description

pyglottography

Programmatic curation of Glottography datasets

Build Status PyPI

Installation

Install via pip from PyPI:

pip install pyglottography

[!NOTE] We use GDAL's ogr2ogr command to convert between GeoJSON and GeoPackage formats. Thus, some functionality of pyglottography requires a working GDAL installation.

Curating Glottography datasets with pyglottography

Bootstrapping a new dataset

pyglottography provides a cldfbench project template, which can be used with the cldfbench new command:

cldfbench new --template glottography

Providing the raw data

The cldfbench workflow uses data in a project's raw directory - enriched with information from etc - to create a CLDF dataset in the cldf directory. By default, pyglottography expects input data as follows:

  • Geo-data, i.e. shapes for languoid areas, is expected in a GeoJSON file raw/dataset.geojson. Each feature in thie GeoJSON file should have a unique value for the id property.
  • Metadata about the shapes is expected in a CSV file etc/features.csv. This file must have an id column with values corresponding to the feature ids in the geo-data.

While metadata could be read entirely from the properties object of features in the GeoJSON file, pyglottography looks up the metadata in a different file to allow for more transparent curation. Since the Glottolog language catalog is released in a new version about twice a year, it is necessary to be able to recreate a Glottography dataset with updated Glottocodes. With the raw data setup as implemented in pyglottography, this only requires changes in etc/features.csv, which can easily be tracked with versioning software such as git.

Running the CLDF creation

cldfbench makecldf cldfbench_<dsid>.py

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

pyglottography-1.1.0.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyglottography-1.1.0-py2.py3-none-any.whl (24.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pyglottography-1.1.0.tar.gz.

File metadata

  • Download URL: pyglottography-1.1.0.tar.gz
  • Upload date:
  • Size: 24.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for pyglottography-1.1.0.tar.gz
Algorithm Hash digest
SHA256 1ac4a78780f592dc2005dc26337240cdb85c97bb6d7780afae68e81ddc5979f3
MD5 59872800560368574f3126e68791436d
BLAKE2b-256 2512ad7d70e4073124e1912bdf7e47a7cce7cfb5b4e1c09f9430bd25d7f482a6

See more details on using hashes here.

File details

Details for the file pyglottography-1.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pyglottography-1.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9bd2df5d583af6d39f02df898273e07d1ad71693892360cf90b2f9a52fa59e5c
MD5 d9ddf2cc86721495e7a2c9c6a38b2e54
BLAKE2b-256 575b5f14a3f1eba1939c64b8381d8b6d40bd316f1559ace780cc1d33915486d7

See more details on using hashes here.

Supported by

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