Closed hkashiwase closed 3 years ago
Dear Haruna,
I think this is already implemented. Could you try specifying the different indicator codes. Please let me know if you see incorrect results.
df_both <- fetch_indicator('SH.DYN.NCOM.ZS', source = 'who')
df_male <- fetch_indicator('SH.DYN.NCOM.MA.ZS', source = 'who')
df_female <- fetch_indicator('SH.DYN.NCOM.FE.ZS', source = 'who')
/Aleksander
Dear Aleksander,
Could you check if the following indicators are disaggregated? It seems that the indicator has other disaggregated categories. For example, tobacco_female has total and male data?
tobacco_female<-fetch_indicator('SH.PRV.SMOK.FE', source = 'who') suicide<-fetch_indicator('SH.STA.SUIC.P5', source = 'who') suicide_female<-fetch_indicator('SH.STA.SUIC.FE.P5', source = 'who') suicide_male<-fetch_indicator('SH.STA.SUIC.MA.P5', source = 'who') airpollute<-fetch_indicator('SH.STA.AIRP.P5', source = 'who') airpollute_female<-fetch_indicator('SH.STA.AIRP.FE.P5', source = 'who') airpollute_male<-fetch_indicator('SH.STA.AIRP.MA.P5', source = 'who') poison_female<-fetch_indicator('SH.STA.POIS.P5.FE', source = 'who') washmort<-fetch_indicator('SH.STA.WASH.P5', source = 'who')
Hi Haruna.
I found a couple of bugs in the code to retrieve the both sex indicators. And you where right, some indicators had a second dimension (eg. age group) that wasn't being filtered out.
If you install the latest version these issues should be solved, but let me know if you still see errors.
/Aleksander
Dear Aleksander,
I have copied the latest R files and saved it in R folder. Then I ran the codes, but I still see the same issue. Could you let me know if I forget something in the process?
Hi Haruna,
You need to re-install the package for the most recent changes to work. Try running;
library(devtools)
install_github('Aeilert/pddcs', GITHUB_PAT = 'your_personal_access_token')
Dear Aleksander,
Yes, it worked! Sorry, I didn't notice this. The result looks good.
Great!
Dear Aleksander,
When you have time, could you add the sex disaggregated indicators for SH.STA.TRAF.P5 and SH.STA.WASH.P5? We didn't have them before, but the WHO has started releasing them.
SH.STA.TRAF.FE.P5 | Mortality caused by road traffic injury, female (per 100,000 female population) SH.STA.TRAF.MA.P5 | Mortality caused by road traffic injury, male (per 100,000 male population) SH.STA.WASH.FE.P5 | Mortality rate attributed to unsafe water, unsafe sanitation and lack of hygiene, female (per 100,000 female population) SH.STA.WASH.MA.P5 | Mortality rate attributed to unsafe water, unsafe sanitation and lack of hygiene, male (per 100,000 male population)
Thanks, Haruna
Dear Haruna,
I think this should be solved now. You can check by re-installing the package.
# Traffic deaths
df <- fetch_indicator('SH.STA.TRAF.FE.P5', 'who')
df2 <- fetch_indicator('SH.STA.TRAF.MA.P5', 'who')
# Unsafe water
df <- fetch_indicator('SH.STA.WASH.MA.P5', 'who')
df2 <- fetch_indicator('SH.STA.WASH.FE.P5', 'who')
Dear Aleksander, thank you very much for adding these indicators promptly. I confirmed that I was able to fetch them!
Haruna
Dear Aleksander,
May I ask you to add disaggregated info (both sex, male and female) for some indicators for WHO? I added the information on column G (Disaggregate for WHO) in the list. For example, SH.DYN.NCOM.ZS (Mortality from CVD, cancer, diabetes or CRD between exact ages 30 and 70 (%)), it seems that we need to add "BTSX" (both sex) to the WDI code (NCDMORT3070). Please find the link for this indicator. https://ghoapi.azureedge.net/api/NCDMORT3070?$filter=Dim1%20eq%20%27BTSX%27
Thanks, Haruna