OpenClimate-pyclient
OpenClimate Python Client is a Python 3.8+ package for the OpenClimate API. The goal of this package is to make emissions data and pledges more accessible.
Installation
pip install openclimate
Usage
Import and create a Client() object
from openclimate import Client
client = Client()
Retrieving data
Emissions
Retrieve all emissions data for a single actor. Here I am retrieving emissions data for Canada
df = client.emissions(actor_id='CA')
Retrieve all emissions data for a list of actors. Here I am retrieving emission data for the United States, Canada, and Great Britain.
df = client.emissions(actor_id=['US','CA','GB'])
Return the different datasets available for a particular actor:
df = client.emissions_datasets(actor_id='US')
Only select data for a particular dataset
df = client.emissions_datasets(actor_id='US', datasource_id='GCB2022:national_fossil_emissions:v1.0')
Targets
Retrieve emissions targets for a particule actor
df = client.targets(actor_id='US')
Population
Retrieve population data.
df = client.population(actor_id=['US','CA','GB'])
GDP
Retrieve GDP data.
df = client.gdp(actor_id=['US','CA','GB'])
Searching for codes
use the following to list the actor_ids for countries:
df = client.country_codes()
search for actor codes:
df = client.search(query='Minnesota')
get all the parts of an actor. Here I am returning the actor_id for each US state.
df = client.parts(actor_id='US',part_type='adm1')
Metadata
Release files for openclimate 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| openclimate-0.1.5.tar.gz | 17.7 kB | Without provenance | Details for openclimate-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| openclimate-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for openclimate-0.1.5-py3-none-any.whl |
Total release size: 35.9 kB
Release files / openclimate-0.1.5.tar.gz
| Download URL | openclimate-0.1.5.tar.gz |
|---|---|
| Size | 17.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cee9d4140da99815421786a736d0ed31b464cb1268caf4b4ad98c8912b9d765b
|
|
BLAKE2b-256 checksum How to use checksums |
be4e661f05d6eed742ab6cb7d1cf7a42240cc14ea7ede6abdca207e82afd5bc0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / openclimate-0.1.5-py3-none-any.whl
| Download URL | openclimate-0.1.5-py3-none-any.whl |
|---|---|
| Size | 18.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
226f4671ac07b2772a560900ea4ae34a3937d85200f9e093bc8e118e6ef101fa
|
|
BLAKE2b-256 checksum How to use checksums |
9df2f09de9c28fd0e4c656e5ababf84be0876290a62892062753eea85f7984c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Security for openclimate 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.