pydplace


Namepydplace JSON
Version 3.0.0 PyPI version JSON
download
home_pagehttps://github.com/D-PLACE/pydplace
SummaryA cldfbench plugin to curate D-PLACE datasets
upload_time2023-11-21 13:45:10
maintainer
docs_urlNone
authorRobert Forkel
requires_python>=3.8
licenseApache 2.0
keywords linguistics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pydplace

A Python library to curate [D-PLACE](https://d-place.org) data.

[![Build Status](https://github.com/D-PLACE/pydplace/workflows/tests/badge.svg)](https://github.com/D-PLACE/pydplace/actions?query=workflow%3Atests)
[![PyPI](https://img.shields.io/pypi/v/pydplace.svg)](https://pypi.org/project/pydplace)


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](https://github.com/cldf/cldfbench/#creating-a-skeleton-for-a-new-dataset-directory).

Running

```shell
cldfbench new --template dplace_dataset 
```

will create a dataset skeleton looking as follows
```shell
$ 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
```shell
cldfbench makecldf cldfbench_<id>.py
```

The resulting CLDF dataset can be validated running
```shell
pytest
```


### Release workflow

```shell
cldfbench makecldf --glottolog-version v4.8 --with-cldfreadme cldfbench_<id>.py
pytest
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 vX.Y"
git push origin
```

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


### Using the datasets

```shell
$ 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
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/D-PLACE/pydplace",
    "name": "pydplace",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "linguistics",
    "author": "Robert Forkel",
    "author_email": "robert_forkel@eva.mpg.de",
    "download_url": "https://files.pythonhosted.org/packages/a5/de/45a5fd85de057d6a73a2e736429f9eb1b792d589bdb4beb2969989f8eccd/pydplace-3.0.0.tar.gz",
    "platform": "any",
    "description": "# pydplace\n\nA Python library to curate [D-PLACE](https://d-place.org) data.\n\n[![Build Status](https://github.com/D-PLACE/pydplace/workflows/tests/badge.svg)](https://github.com/D-PLACE/pydplace/actions?query=workflow%3Atests)\n[![PyPI](https://img.shields.io/pypi/v/pydplace.svg)](https://pypi.org/project/pydplace)\n\n\nTo install `pydplace` run\n\n```\npip install pydplace\n```\n\n## Usage\n\n### Bootstrapping a `pydplace`-curated dataset\n\n`pydplace` provides a `cldfbench` dataset template to create the skeleton of files and directories for a\nD-PLACE dataset, to be run with [cldfbench new](https://github.com/cldf/cldfbench/#creating-a-skeleton-for-a-new-dataset-directory).\n\nRunning\n\n```shell\ncldfbench new --template dplace_dataset \n```\n\nwill create a dataset skeleton looking as follows\n```shell\n$ tree testtree/\n```\n\n\n### Implementing CLDF creation\n\nImplementing CLDF creation means - as for any other `cldfbench`-curated dataset - filling in the\n`cmd_makecldf` method of the `Dataset` subclass in `cldfbench_<id>.py`.\n\n\n### Running CLDF creation\n\nWith `cmd_makecldf` implemented, CLDF creation can be triggered running\n```shell\ncldfbench makecldf cldfbench_<id>.py\n```\n\nThe resulting CLDF dataset can be validated running\n```shell\npytest\n```\n\n\n### Release workflow\n\n```shell\ncldfbench makecldf --glottolog-version v4.8 --with-cldfreadme cldfbench_<id>.py\npytest\ncldfbench zenodo --communities dplace cldfbench_<id>.py\ncldfbench cldfviz.map cldf --pacific-centered --format png --width 20 --output map.png --with-ocean --no-legend\ncldfbench readme cldfbench_<id>.py\ndplace check cldfbench_<id>.py\ngit commit -a -m\"release vX.Y\"\ngit push origin\n```\n\nThen create a release on GitHub, thereby pushing the repos to Zenodo.\n\n\n### Using the datasets\n\n```shell\n$ csvgrep -c Var_ID -m AnnualMeanTemperature cldf/data.csv | csvstat -c Value\n  4. \"Value\"\n\n\tType of data:          Number\n\tContains null values:  False\n\tUnique values:         1649\n\tSmallest value:        -19,45\n\tLargest value:         29,153\n\tSum:                   32.700,717\n\tMean:                  16,449\n\tMedian:                19,721\n\tStDev:                 9,684\n\tMost common values:    14,392 (9x)\n\t                       21,66 (6x)\n\t                       6,96 (6x)\n\t                       23,335 (5x)\n\t                       21,619 (5x)\n\nRow count: 1988\n```\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "A cldfbench plugin to curate D-PLACE datasets",
    "version": "3.0.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/D-PLACE/pydplace/issues",
        "Homepage": "https://github.com/D-PLACE/pydplace"
    },
    "split_keywords": [
        "linguistics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0062e97ad521a1e23ee0601053471cafc2a41ec74ab3d964a8b1faf88e5d9e80",
                "md5": "42957219fbc150a15c6a1eaf43963738",
                "sha256": "8aaf8fdb349345754a5c32aa05e94fe61c33c920a29b3fddf3581afa1fb526a1"
            },
            "downloads": -1,
            "filename": "pydplace-3.0.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "42957219fbc150a15c6a1eaf43963738",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 393824,
            "upload_time": "2023-11-21T13:45:05",
            "upload_time_iso_8601": "2023-11-21T13:45:05.744502Z",
            "url": "https://files.pythonhosted.org/packages/00/62/e97ad521a1e23ee0601053471cafc2a41ec74ab3d964a8b1faf88e5d9e80/pydplace-3.0.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a5de45a5fd85de057d6a73a2e736429f9eb1b792d589bdb4beb2969989f8eccd",
                "md5": "894c93bd1bbcff21e4752c0b53738c65",
                "sha256": "56fc30caedfe05c9cf2149bdfb1f33b8a43c45c97721e90ddd68dcc4a1653f39"
            },
            "downloads": -1,
            "filename": "pydplace-3.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "894c93bd1bbcff21e4752c0b53738c65",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 387864,
            "upload_time": "2023-11-21T13:45:10",
            "upload_time_iso_8601": "2023-11-21T13:45:10.059239Z",
            "url": "https://files.pythonhosted.org/packages/a5/de/45a5fd85de057d6a73a2e736429f9eb1b792d589bdb4beb2969989f8eccd/pydplace-3.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-21 13:45:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "D-PLACE",
    "github_project": "pydplace",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "pydplace"
}
        
Elapsed time: 0.14147s