Public-Health-Scotland / phsmethods

An R package to standardise methods used in Public Health Scotland (https://public-health-scotland.github.io/phsmethods/)
https://public-health-scotland.github.io/phsmethods/
54 stars 13 forks source link

Open Data #57

Closed Moohan closed 3 years ago

Moohan commented 3 years ago

Opening this as the master issue for all Open Data (https://www.opendata.nhs.scot/) related discussions.

@csillasch and I just had a chat about what we currently have and what would be nice to have as far as functions to make accessing and using open data easier. Also lots of chat about the best way(s) to do this.

There is already a package called ckanr which does lots of useful and nice things however it doesn't do everything we might want, it might also be tricky to wrap some of the functionality to make it specific to our platform. For simplicity, we thought it best to just start with a mix of functions that use ckanr as the backend and others with a custom (likely using httr) backend.

Csilla will post to the R User group with a call for suggestions/feature requests but so far we thought:

Filtering data is obviously a valuable feature, both for users and the platform (as it reduces the size of requests) but is not simple to implement in a general way that also would present a nice interface to users.

I'm going to create an 'open-data' branch then we will create function/feature branches from there, which will alow us to work on the open data stuff separately and collaboratively before merging into the master branch.

Moohan commented 3 years ago

I've added the two functions I was going to work on, I've opened draft pull requests for both. Open to comments but I won't have much time to work on them so probably easiest for whoever checks/reviews to make changes.

58 - For retrieving data by resource id

59 - For retrieving multiple (usually all) resources from a dataset