An API to access the NewClimate Institute's Climate Policy Database
Project description
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:
- Increment the version number in pyproject.toml
- Run the following commands:
$ python3 -m build
$ python3 -m twine upload dist/*
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cpdb_api-1.0.8.tar.gz.
File metadata
- Download URL: cpdb_api-1.0.8.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46c14b648104546da17c06e38cc8f5fe49950e3aeaee5f299f65feafea6f4e7b
|
|
| MD5 |
33a0e24c01842fbe16db6eb421cd7406
|
|
| BLAKE2b-256 |
9305c6caddb52265931b4ace76c470c570fc1b833abec3b1f311e7e5775b9ee7
|
File details
Details for the file cpdb_api-1.0.8-py3-none-any.whl.
File metadata
- Download URL: cpdb_api-1.0.8-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f35de1738aa6b94ce797a6af7aec0c7fa42335ecd7345632a8e4161e156318b8
|
|
| MD5 |
8c8b4fb7250c52455db8d217ab775aca
|
|
| BLAKE2b-256 |
3bc4daab2b88a5c81e349f245794fbe042648ad87c91a8a825097c13c9303790
|