Skip to main content

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/*

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cpdb_api-1.0.8.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

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

cpdb_api-1.0.8-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

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

Hashes for cpdb_api-1.0.8.tar.gz
Algorithm Hash digest
SHA256 46c14b648104546da17c06e38cc8f5fe49950e3aeaee5f299f65feafea6f4e7b
MD5 33a0e24c01842fbe16db6eb421cd7406
BLAKE2b-256 9305c6caddb52265931b4ace76c470c570fc1b833abec3b1f311e7e5775b9ee7

See more details on using hashes here.

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

Hashes for cpdb_api-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 f35de1738aa6b94ce797a6af7aec0c7fa42335ecd7345632a8e4161e156318b8
MD5 8c8b4fb7250c52455db8d217ab775aca
BLAKE2b-256 3bc4daab2b88a5c81e349f245794fbe042648ad87c91a8a825097c13c9303790

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.8 This release

2 files

1.0.7

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page