Name | cpdb-api JSON |
Version |
1.0.8
JSON |
| download |
home_page | |
Summary | An API to access the NewClimate Institute's Climate Policy Database |
upload_time | 2023-05-22 14:38:47 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.7 |
license | |
keywords |
nci
cpdb
climatepolicydatabase
newclimateinstitute
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
A Python API for NewClimate Institute's ClimatePolicy DataBase (CPDB). You can also view the database via the website at https://climatepolicydatabase.org/.
# Installation
Installation is simple, via pip.
```
pip install cpdb-api
```
If you *need* to specify a version, please do this (we strongly recommend against this unless you know what you're doing):
```
pip install cpdb-api==<version e.g. 1.0.5>
```
# Usage
```
from cpdb_api import request
r = request.Request()
# set filters
r.set_country("IND")
r.set_decision_date(2010)
r.set_policy_status("In force")
r.add_sector("Electricity and heat")
r.add_sector("Coal")
r.add_policy_instrument("Energy and other taxes")
r.add_mitigation_area("Renewables")
# Issue the request (this returns a pandas dataframe, if you want to parse it programmatically)
r.issue()
# save the result to CSV file
r.save_csv("filtered_cpdb.csv")
```
# Releasing
To release to PyPi (pip), do the following:
1. Increment the version number in pyproject.toml
2. Run the following commands:
```
$ python3 -m build
$ python3 -m twine upload dist/*
```
Raw data
{
"_id": null,
"home_page": "",
"name": "cpdb-api",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "nci,cpdb,climatepolicydatabase,newclimateinstitute",
"author": "",
"author_email": "NewClimate Institute <info@newclimate.org>",
"download_url": "https://files.pythonhosted.org/packages/93/05/c6caddb52265931b4ace76c470c570fc1b833abec3b1f311e7e5775b9ee7/cpdb_api-1.0.8.tar.gz",
"platform": null,
"description": "A Python API for NewClimate Institute's ClimatePolicy DataBase (CPDB). You can also view the database via the website at https://climatepolicydatabase.org/.\n\n# Installation\n\nInstallation is simple, via pip.\n\n```\npip install cpdb-api\n```\n\nIf you *need* to specify a version, please do this (we strongly recommend against this unless you know what you're doing):\n```\npip install cpdb-api==<version e.g. 1.0.5>\n```\n\n# Usage\n\n```\nfrom cpdb_api import request \n\nr = request.Request()\n\n# set filters\nr.set_country(\"IND\")\nr.set_decision_date(2010)\nr.set_policy_status(\"In force\")\nr.add_sector(\"Electricity and heat\")\nr.add_sector(\"Coal\")\nr.add_policy_instrument(\"Energy and other taxes\")\nr.add_mitigation_area(\"Renewables\")\n\n# Issue the request (this returns a pandas dataframe, if you want to parse it programmatically)\nr.issue()\n\n# save the result to CSV file\nr.save_csv(\"filtered_cpdb.csv\")\n```\n\n# Releasing\n\nTo release to PyPi (pip), do the following:\n\n1. Increment the version number in pyproject.toml\n2. Run the following commands:\n```\n$ python3 -m build\n$ python3 -m twine upload dist/*\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "An API to access the NewClimate Institute's Climate Policy Database",
"version": "1.0.8",
"project_urls": {
"Homepage": "https://climatepolicydatabase.org",
"Source Code": "https://github.com/KevinDackow/CPDB-API"
},
"split_keywords": [
"nci",
"cpdb",
"climatepolicydatabase",
"newclimateinstitute"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3bc4daab2b88a5c81e349f245794fbe042648ad87c91a8a825097c13c9303790",
"md5": "8c8b4fb7250c52455db8d217ab775aca",
"sha256": "f35de1738aa6b94ce797a6af7aec0c7fa42335ecd7345632a8e4161e156318b8"
},
"downloads": -1,
"filename": "cpdb_api-1.0.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8c8b4fb7250c52455db8d217ab775aca",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 8178,
"upload_time": "2023-05-22T14:38:43",
"upload_time_iso_8601": "2023-05-22T14:38:43.583211Z",
"url": "https://files.pythonhosted.org/packages/3b/c4/daab2b88a5c81e349f245794fbe042648ad87c91a8a825097c13c9303790/cpdb_api-1.0.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9305c6caddb52265931b4ace76c470c570fc1b833abec3b1f311e7e5775b9ee7",
"md5": "33a0e24c01842fbe16db6eb421cd7406",
"sha256": "46c14b648104546da17c06e38cc8f5fe49950e3aeaee5f299f65feafea6f4e7b"
},
"downloads": -1,
"filename": "cpdb_api-1.0.8.tar.gz",
"has_sig": false,
"md5_digest": "33a0e24c01842fbe16db6eb421cd7406",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 7786,
"upload_time": "2023-05-22T14:38:47",
"upload_time_iso_8601": "2023-05-22T14:38:47.321049Z",
"url": "https://files.pythonhosted.org/packages/93/05/c6caddb52265931b4ace76c470c570fc1b833abec3b1f311e7e5775b9ee7/cpdb_api-1.0.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-22 14:38:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "KevinDackow",
"github_project": "CPDB-API",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "cpdb-api"
}