traffordDataLab / population_picker

Web application enabling retrieval of mid-year population estimates for custom areas
MIT License
2 stars 0 forks source link

Code for NOMIS apis need to be https:// updated from original http:// #1

Open Lextuga007 opened 10 months ago

Lextuga007 commented 10 months ago

In code https://github.com/traffordDataLab/population_picker/blob/master/data/pre-processing.R:

la <- read_csv("http://www.nomisweb.co.uk/api/v01/dataset/NM_2002_1.data.csv?geography=1820327969&date=latest&gender=0...2&c_age=101...191&measures=20100&select=date_name,geography_name,geography_code,gender_name,c_age_name,measures_name,obs_value,obs_status_name") %>% 
  mutate(GEOGRAPHY_CODE = "Local authority")

Gives the error

http://www.nomisweb.co.uk/api/v01/dataset/NM_2002_1.data.csv?geography=1820327969&date=latest&gender=0...2&c_age=101...191&measures=20100&select=date_name,geography_name,geography_code,gender_name,c_age_name,measures_name,obs_value,obs_status_name

because it need to be https. Note too that the headers have changed.

itsozz commented 10 months ago

Hi @Lextuga007 thanks for raising this, really appreciate it. We haven't given this app an update for a while and it is definitely in need of some attention! I'll put this on the ever-increasing TODO list and close the issue once it's been done.

Lextuga007 commented 10 months ago

Thanks for replying! It's great to know it's going to be looked at and totally appreciate the ever increasing TODO list. Thanks for providing some great code though 🏆

I'm trying to recode some of it to use the R package {nomisr} rather than use the APIs which can help with others wanting to reproduce this for their own areas. I'll be putting the code on the NHS-R GitHub, not quite sure exactly where yet, but details will be in the https://github.com/nhs-r-community/health-inequalities-notebook once we get that up and running (along with a link to the Trafford Data Lab site which is fabulous).

itsozz commented 10 months ago

No worries at all and thank you very much indeed for your kind words, really appreciated! It's nice to know our resources are useful and looking forward to seeing your work when it's published, sounds a great idea. Very grateful to @rcatlord for integrating R and the concepts of reproducibility into the Lab.