UN Goal Timelines - Data Pull
Cool: Data Commons Sheets add-on
Two Colabs:
-
Map Filter Colab outputs for one year for our Map Nav. It includes Population, CO2 and Methane.
-
UN Goals Timelines CoLab and DCIDs from our Google Sheet UN goal tabs
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: In the UN Goals Colab, the country.csv timeline output Abhishek created can be output to data-commons/docs/data/air/[dcid].csv.
Then delete the country.csv file
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 a string containing DCID files pulled from our Google Sheet UN Goal tabs.
Pass the earthColab function the column Scope as: Country, State, County
Convert from 3 to 2-char country codes.
Send rules in the function's parameters to identify which locations to omit (like which countries lack emissions data).
Pull the valid year range from the Google Sheet row in StartYear and EndYear
We'll send our .csv output to UN Goal subfolders at data-commons/docs/data