Closed SeaCelo closed 11 months ago
@jdebacker:
It turns out that the "data flow" changes almost every quarter when there are updated to the DSD.
The current DSD is version 1.15 (from 1.10).
Currently working link: https://data.un.org/ws/rest/data/IAEG-SDGs,DF_SDG_GLH,1.15/..SL_EMP_GTOTL.710...........?startPeriod=2020&endPeriod=2020&format=csv
I will work on a method to get or compute the correct value for the future.
edit: link to the documentation: https://data.un.org/Host.aspx?Content=API
The fix is to skip the dataflow version in the url. This will always get the latest available.
I will make the changes in a future PR
@jdebacker
Great find - thanks @SeaCelo!
@jdebacker I think we need another check. The current data is only available for 2020. I think you are using 2021, which returns "no data" for this call. Do we need some logic to test or throw a message to the user?
The current data is only available for 2020. I think you are using 2021, which returns "no data" for this call. Do we need some logic to test or throw a message to the user?
Thanks for noticing this Marcelo. In my actual run of run_og_zaf.py
the target URL is
https://data.un.org/ws/rest/data/IAEG-SDGs,DF_SDG_GLH/..SL_EMP_GTOTL.710...........?startPeriod=1947&endPeriod=2023&format=csv
which does work. It's pulling the start and end year from those set above used for the FRED data. But it seems to work at long as the start year is prior to 2021.
@jdebacker You are correct. The start is 1947 so it will take the latest available before today. No more issues and this can close with #45
Labor share data (SDG indicator 10.4.1) is sourced from UN Statistics portal. Variable 'un_data_a' in 'macro_params.py'
This API is returning an error: 404 error: https://data.un.org/ws/rest/data/IAEG-SDGs,DF_SDG_GLH,1.10/..SL_EMP_GTOTL.710...........?startPeriod=2021&endPeriod=2021&format=csv
500 error using this method: https://unstats.un.org/sdgs/UNSDGAPIV5/swagger/index.html https://unstats.un.org/sdgs/UNSDGAPIV5/v1/sdg/Indicator/Data?indicator=SL_EMP_GTOTL&areaCode=710&timePeriod=2020