Using the client¶
First instanatiate a client object¶
The client object provides access to methods that make it easy to query the LEDGER database.
First, import the Client class from ledgerdata and instantiate an object:
The client object lets you query the LEDGER database. First, import Client() and then create an object:
You can then use the client’s methods to query the database with a pattern like this client.method().
Next we will walk you through some of the ways you can query the database to retrieve data.
Actors¶
Actors refers to any:
- adm0: nation
- adm1: state / province
- adm2: city
List all actors¶
The following will return a dataframe with all the actors in the database:
Parts of an actor¶
sometimes you want parts of an actor
Retrieve contextual data¶
Once you know the ids of the actors you are interested in you can easily retrieve contexual data on the actor. Keep in mind that not all contexual data is available for each actor.
Note
unlike emissions, we only provide one datasource for each actor.
Emission targets¶
Population¶
GDP¶
Energy Consumption¶
Emissions¶
Where possible, emissions are broken down into subsector and gas and aggregated using global warming potentials (GWP).
Total emissions¶
Decompose emissions¶
You can retrieve emissions based on gas and sectors
Global Warming Potentials¶
You can retrieve global warming potentials from an assessement report