pydplace


Namepydplace JSON
Version 3.2.0 PyPI version JSON
download
home_pagehttps://github.com/D-PLACE/pydplace
SummaryA cldfbench plugin to curate D-PLACE datasets
upload_time2024-08-15 11:31:23
maintainerNone
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 v5.0 --with-cldfreadme cldfbench_<id>.py
pytest
```

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

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

```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": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "linguistics",
    "author": "Robert Forkel",
    "author_email": "robert_forkel@eva.mpg.de",
    "download_url": "https://files.pythonhosted.org/packages/ad/a4/1742f923e9219fe68f7a0f7058019dda31e516f6ef4c9abaddb7131ec68c/pydplace-3.2.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 v5.0 --with-cldfreadme cldfbench_<id>.py\npytest\n```\n\nNow inspect the changes and add a corresponding section to `CHANGELOG.md`.\n\n```shell\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 v3.1\"\ngit push origin\ndplace release cldfbench_<id>.py v3.1\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.2.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": "d16e530b817dd0bf8a1da137e381492ac3926fd35c8abf4d74dd5f16937641a4",
                "md5": "199cdd6422ca5446e6a48c775c9d70d8",
                "sha256": "edd81e4434a48c1fa7c026687961ffb52bdb0fcd4b26bab6da652a5cf44787d5"
            },
            "downloads": -1,
            "filename": "pydplace-3.2.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "199cdd6422ca5446e6a48c775c9d70d8",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 394741,
            "upload_time": "2024-08-15T11:31:14",
            "upload_time_iso_8601": "2024-08-15T11:31:14.297248Z",
            "url": "https://files.pythonhosted.org/packages/d1/6e/530b817dd0bf8a1da137e381492ac3926fd35c8abf4d74dd5f16937641a4/pydplace-3.2.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ada41742f923e9219fe68f7a0f7058019dda31e516f6ef4c9abaddb7131ec68c",
                "md5": "c5610646cdee987332317f452518a11e",
                "sha256": "f68ebf385f95903b0f8197016f7f029fc00ad219d8420df89e25a8982432842b"
            },
            "downloads": -1,
            "filename": "pydplace-3.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c5610646cdee987332317f452518a11e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 388650,
            "upload_time": "2024-08-15T11:31:23",
            "upload_time_iso_8601": "2024-08-15T11:31:23.380932Z",
            "url": "https://files.pythonhosted.org/packages/ad/a4/1742f923e9219fe68f7a0f7058019dda31e516f6ef4c9abaddb7131ec68c/pydplace-3.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-15 11:31:23",
    "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.29145s