Skip to content

CityCatalyst Data

Luke Gloege edited this page Nov 17, 2023 · 1 revision

CityCatalyst Data

This page describes working with data for the CityCatalyst project.

Emissions Data

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.

Units

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 $44 \text{ moles CO2}/12 \text{ moles C}$.

Point Sources

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:

  1. Lookup the LOCODE using the osmid from Nominatim. The locode_to_osmid.csv helps with this
  2. Another way to lookup the city using the OpenClimate API

Gridded Data

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.

Python Environment

Formatting

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