-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
📊 Update dataset on national contributions to climate change #2496
📊 Update dataset on national contributions to climate change #2496
Conversation
… github.com:owid/etl into update-national-contributions-data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good! I think I remember seeing a previous version of this. I added a few minor comments, but it's all working good.
name: CC BY 4.0 | ||
url: https://zenodo.org/record/7636699#.ZFCy4exBweZ | ||
wdir: ../../../data/snapshots/emissions/2023-11-23 | ||
Jones, M. W. (2024) “National contributions to climate change due to historical emissions of carbon dioxide, methane and nitrous oxide”, Scientific Data. Zenodo. doi: 10.5281/zenodo.10839859. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One problem with the automatic extraction of the text is that it uses an APA-like kind of format we are moving away from
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They offer different choices. I changed APA to Chicago style.
"Ryukyu Islands": "Ryukyu Islands", | ||
"St. Kitts-Nevis-Anguilla": "St. Kitts-Nevis-Anguilla", | ||
"LDC": "Least developed countries (Jones et al.)", | ||
"OECD": "OECD (Jones et al.)" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why Pacific Islands (Palau)
is not here, but in the excluded list, when there are several such entities in this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was overlapping data for "Palau" and for "Pacific Islands (Palau)", so I simply excluded this region instead of trying to figure out a better solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: On line 271, it seems redundant to use the maps_series functions when you run run_sanity_checks_on_inputs just before. I think replace can do the job just as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, warnings for the harmonizing countries function are True by default, so there's no need to keep the parameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remember correctly, map_series
warns if something can't be mapped, while replace
silently creates nan.
#################################################################################################################### | ||
for column in columns_that_cannot_be_negative: | ||
# Ensure all negative values are just numerical noise. | ||
assert (tb[column].fillna(0) >= -2e-4).all() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can set the tolerance value above and call it here to easily change it if needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I preferred to have this value here, close to where it's most relevant, given that it's just a very specific check. That value is not an important global variable that is used elsewhere or that affects the data.
assert emissions_after_jump / emissions_before_jump > 10, error | ||
|
||
# Visually inspect the jump. | ||
# import plotly.express as px |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this code if you're not using it anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's convenient to have it there, as a quick way to check on next update if the spurious jump is still in the data.
@@ -39,173 +39,237 @@ tables: | |||
unit: tonnes | |||
short_unit: t | |||
description_short: *measured-in-tonnes | |||
presentation: | |||
title_public: Annual methane emissions from fossil fuels and industry | |||
annual_emissions_ch4_land: | |||
title: Annual methane emissions from agriculture and land use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it could be useful to explain what land use includes in description_short
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be even better to have a DoD about land use emissions, I'll write that down.
@@ -214,16 +278,22 @@ tables: | |||
description_key: | |||
- This temperature change measures each country's contribution to global mean surface temperature (GMST) rise from its cumulative emissions of carbon dioxide, methane and nitrous oxide. | |||
- The warming effects of each gas are calculated based on cumulative CO₂-equivalent emissions using the Global Warming Potential (GWP*) approach. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could maybe expand on what Global Warming Potential (GWP*) approach is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a DoD for GWP. I suppose it could be better to add a sentence or a paragraph about GWP* there.
Thank you very much for the review, @paarriagadap! |
11642b0
into
update-national-contributions-data-reference-branch
…e branch (#2501) * Duplicate code from previous version of national contributions to global warming dataset * Update dataset on national contributions to climate change (#2496) * Adapt snapshots, meadow, garden and grapher steps * Fix spurious negative numbers * Improve format * Various small improvements, following Pablo A suggestions
Update dataset on national contributions to global warming (Jones et al.).