Data Commons

Goal Timelines - Data Pull

The Google DCID values for our timelines reside in our Google Sheet UN goal tabs.
Our timeline charts use javascript to pull directly from the Google Data Commons API.
Scroll down to see Air and Water topics from our Google Sheet tabs.

For python output, our UN Goals Timelines CoLab pulls timeline data DCID values from our Google Sheet. We also pull States and Counties with Python

Checkout our Data Commons pull for navigation map-filters

Cool: Data Commons Google Sheet add-on


TO DO: Document and create examples of our util for scope data retrieval scope-data-utils.py

TO DO: Update our UN Goals Colab to pull DCID's from our Google Sheet Goal tabs - Priyanka, Alexandra, everyone

TO DO: Update our Google Sheet UN Goal tabs with additional DCID values that we'll pull for our Python .csv file generation. - Everyone

TO DO: Update earthscape.js to also display countries and states. Eliminate datacommons.html after adding to the current page.

TO DO: The DCID value for the water UN Goal topics is: dc/g/SDG_6
Fix the following so we can update /feed/view/#feed=water to pull the water nav DCID

https://api.datacommons.org/v2/observation?key=AIzaSyCTI4Xz-UW_G2Q2RfknhcfdAnTHq5X5XuI&entity.dcids=dc/g/SDG_6

UN Goals CoLab Specs

In the UN Goals Timelines CoLab create a function called timelineGeneration() that generates the timeline csv files. Pass it an object containing DCID values and their scopes - pulled from our Google Sheet UN Goal tabs.

Scope values are: Country, State, County, Zip

Apply the valid year range from the Google Sheet row in StartYear and EndYear

We could include an OmitLocations column if some countries lack emissions data.

We'll send our .csv output to UN Goal subfolders at data-commons/docs/data