-
Notifications
You must be signed in to change notification settings - Fork 4
CityCatalyst Data
This page describes working with data for the CityCatalyst project.
When you find a new data source, check to see if it has an API. If it does not, then we will most likely add is to the global API.
Be cognizant of units. Some data sources express emissions in units of carbon content. To convert from mass in carbon to mass of CO2, multiply by
For point sources (e.g. cement plants) we determine which city the point falls in. The latitude and longitude for locations can be reverse geocoded to determine the city name. We then need to find the LOCODE One way to reverse geocode is to use Nominatim. There are a couple ways to get the LOCODE:
- Lookup the LOCODE using the osmid from Nominatim. The
locode_to_osmid.csv
helps with this - Another way to lookup the city using the OpenClimate API
Data sources such as EDGAR and Crosswalk Labs uses gridded datasets. The way we handle this data is determine what percentage of each grid cell is within the city boundary. We then use this to determine the amount of emissions that should be allocated to the city for each grid cell.
For all Python scripts we use Black formatting. Black can be installed via pip:
pip install black
Once installed, apply formatting like this:
black python_script.py