Closed cslovell closed 5 years ago
Thanks for the report! I'll look into it.
I can confirm the "Last Inventory" problem, thanks again!
Not sure about the second point, I think this is required for not duplicating "Base year" - i'll check that tomorrow, it's getting late here.
I think the actual issue might be that the "Last inventory" year is now 2017 and that the script wasn't updated to include this change. I've commited a fix (https://github.com/openclimatedata/unfccc-detailed-data-by-party/commit/7335c1564f93b4dfbb545b0139d4cf7f67390e1f) to always use up-to-date year mappings but this needs more testing.
@cslovell Can you give this a try? This should now work again (and hopefully with future updates as well) and the latest commits on master should include 2017 as well.
@JGuetschow Can you try reading this into your workflow as well if you get the chance?
I tagged a new release with this download, please open an issue when encountering any further issues!
https://github.com/openclimatedata/unfccc-detailed-data-by-party/releases/tag/2019-08-01
The last year of the data (2016, in this case) is not shown in the final csv file.
The API returns 2016 and the year is present in the json files but not in the final csv file.
https://github.com/openclimatedata/unfccc-detailed-data-by-party/blob/8927160de5917e2660e371c62a72cbd1b33edb08/scripts/process.py#L40
I guess at one point the API call returned "Last Inventory Year (2016)" and index[indexed_keys[-1]][-5:-1] transformed this to simply "2016". Now it seems the API returns "2016" and this operation transforms it to "201". In my local version I've commented out this line and everything works fine. Not sure if this behavior can be verified and changed in the source code here?
Also later in the file there is this line:
removing -1 from the last line seems to fix this.