From 639f28b7b42de097a0cfc7fc22c2a27a86575eec Mon Sep 17 00:00:00 2001 From: csills01 Date: Wed, 18 Sep 2024 15:54:15 +0100 Subject: [PATCH 01/10] update readme --- README.Rmd | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.Rmd b/README.Rmd index 5c03111..8c40947 100644 --- a/README.Rmd +++ b/README.Rmd @@ -25,10 +25,12 @@ knitr::opts_chunk$set( - `get_resource()` extracts a single resource from an open dataset by resource id - `get_dataset()` extracts multiple resources from an open dataset by dataset name +- `list_datasets()` returns the names of all available datasets +- `list_resources()` returns information on all resources within an open dataset by dataset name For extracting metadata and search functionality, we recommend using the [ckanr package](https://docs.ropensci.org/ckanr/). -`phsopendata` can be used on both the [server](https://rstudio.nhsnss.scot.nhs.uk/) and desktop versions of RStudio. However, depending on firewall settings, proxy use may need to be configured with `use_proxy()`. +`phsopendata` can be used on both Posit Workbench and desktop versions of RStudio. However, depending on firewall settings, proxy use may need to be configured with `use_proxy()`. ## Installation @@ -46,7 +48,7 @@ remotes::install_github("Public-Health-Scotland/phsopendata", ### Downloading a data table with `get_resource()` -To extract a specific resource, you will need it's unique identifier - resource id. This can be found in the dataset metadata, the URL of a resource's page on https://www.opendata.nhs.scot/, or extracted using `ckanr::package_show`. +To extract a specific resource, you will need it's unique identifier - resource id. This can be found in the dataset metadata, the URL of a resource's page on https://www.opendata.nhs.scot/, or extracted using `list_resources()`. ```{r example resource, eval = FALSE} library(phsopendata) @@ -83,7 +85,7 @@ get_resource( ### Downloading multiple tables with `get_dataset()` -To extract all resources from a dataset, you will need to use the *dataset name*. Note that this will differ from the *dataset title* that displays on the website. This can be found in the dataset metadata extracted using `ckanr::package_show`, or taken from the dataset URL. +To extract all resources from a dataset, you will need to use the *dataset name*. Note that this will differ from the *dataset title* that displays on the website. This can be found using `list_datasets()`, or taken from the dataset URL. In this example, we are downloading GP Practice Population Demographics from: [opendata.nhs.scot/dataset/*gp-practice-populations*](https://www.opendata.nhs.scot/dataset/gp-practice-populations), so the dataset name will be gp-practice-populations. From f4af8ab1719caab000b8ef219ca3c32e1a09fcde Mon Sep 17 00:00:00 2001 From: csillasch Date: Wed, 18 Sep 2024 15:00:11 +0000 Subject: [PATCH 02/10] Re-build README.Rmd --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e8aad17..30bfa9a 100644 --- a/README.md +++ b/README.md @@ -19,14 +19,16 @@ platform](https://www.opendata.nhs.scot/) via the CKAN API. resource id - `get_dataset()` extracts multiple resources from an open dataset by dataset name +- `list_datasets()` returns the names of all available datasets +- `list_resources()` returns information on all resources within an + open dataset by dataset name For extracting metadata and search functionality, we recommend using the [ckanr package](https://docs.ropensci.org/ckanr/). -`phsopendata` can be used on both the -[server](https://rstudio.nhsnss.scot.nhs.uk/) and desktop versions of -RStudio. However, depending on firewall settings, proxy use may need to -be configured with `use_proxy()`. +`phsopendata` can be used on both Posit Workbench and desktop versions +of RStudio. However, depending on firewall settings, proxy use may need +to be configured with `use_proxy()`. ## Installation @@ -46,7 +48,7 @@ Using `remotes` you run this to install the package: To extract a specific resource, you will need it’s unique identifier - resource id. This can be found in the dataset metadata, the URL of a resource’s page on , or extracted using -`ckanr::package_show`. +`list_resources()`. library(phsopendata) @@ -84,8 +86,8 @@ You can use `col_select` and `row_filters` to query the data server-side To extract all resources from a dataset, you will need to use the *dataset name*. Note that this will differ from the *dataset title* that -displays on the website. This can be found in the dataset metadata -extracted using `ckanr::package_show`, or taken from the dataset URL. +displays on the website. This can be found using `list_datasets()`, or +taken from the dataset URL. In this example, we are downloading GP Practice Population Demographics from: From 7a844347714442fda34d1e3f01e7e9c8ba5f5700 Mon Sep 17 00:00:00 2001 From: csills01 Date: Wed, 18 Sep 2024 16:10:39 +0100 Subject: [PATCH 03/10] increment release version --- DESCRIPTION | 2 +- NEWS.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 16b36c6..f512ef0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: phsopendata Title: Extract Open Data from opendata.nhs.scot -Version: 0.1.0.9000 +Version: 0.2.0 Authors@R: c( person("Csilla", "Scharle", , "csilla.scharle2@phs.scot", role = c("aut", "cre")), person("James", "McMahon", , "james.mcmahon@phs.scot", role = "aut"), diff --git a/NEWS.md b/NEWS.md index 5bad634..4ea6d84 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# phsopendata (development version) +# phsopendata 0.2.0 (2024-09-18) - `get_dataset()` and `get_resource()` gain a new parameter `include_context` which allows adding context such as the resource ID and modified / created From 3a4ac77b1674e01904fa4d117275d2845f905f1f Mon Sep 17 00:00:00 2001 From: James McMahon Date: Thu, 19 Sep 2024 09:12:30 +0100 Subject: [PATCH 04/10] Fix typo --- README.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.Rmd b/README.Rmd index 8c40947..d8c8d04 100644 --- a/README.Rmd +++ b/README.Rmd @@ -48,7 +48,7 @@ remotes::install_github("Public-Health-Scotland/phsopendata", ### Downloading a data table with `get_resource()` -To extract a specific resource, you will need it's unique identifier - resource id. This can be found in the dataset metadata, the URL of a resource's page on https://www.opendata.nhs.scot/, or extracted using `list_resources()`. +To extract a specific resource, you will need its unique identifier - resource id. This can be found in the dataset metadata, the URL of a resource's page on https://www.opendata.nhs.scot/, or extracted using `list_resources()`. ```{r example resource, eval = FALSE} library(phsopendata) From 5e858d9af1e68fa238c517e6a0dea4e5fb48a742 Mon Sep 17 00:00:00 2001 From: Moohan Date: Thu, 19 Sep 2024 08:16:07 +0000 Subject: [PATCH 05/10] Re-build README.Rmd --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 30bfa9a..cbe1c11 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Using `remotes` you run this to install the package: ### Downloading a data table with `get_resource()` -To extract a specific resource, you will need it’s unique identifier - +To extract a specific resource, you will need its unique identifier - resource id. This can be found in the dataset metadata, the URL of a resource’s page on , or extracted using `list_resources()`. From 2c8492d51e4f583d97d9d3075fbb035974ffb965 Mon Sep 17 00:00:00 2001 From: csillasch <59616009+csillasch@users.noreply.github.com> Date: Thu, 19 Sep 2024 09:50:19 +0100 Subject: [PATCH 06/10] Update README.Rmd Remove ckanr links Co-authored-by: James McMahon --- README.Rmd | 1 - 1 file changed, 1 deletion(-) diff --git a/README.Rmd b/README.Rmd index d8c8d04..f613a6f 100644 --- a/README.Rmd +++ b/README.Rmd @@ -28,7 +28,6 @@ knitr::opts_chunk$set( - `list_datasets()` returns the names of all available datasets - `list_resources()` returns information on all resources within an open dataset by dataset name -For extracting metadata and search functionality, we recommend using the [ckanr package](https://docs.ropensci.org/ckanr/). `phsopendata` can be used on both Posit Workbench and desktop versions of RStudio. However, depending on firewall settings, proxy use may need to be configured with `use_proxy()`. From bb70ae55050de19e5b1264e58ea8224d058e84bc Mon Sep 17 00:00:00 2001 From: csillasch Date: Thu, 19 Sep 2024 08:53:59 +0000 Subject: [PATCH 07/10] Re-build README.Rmd --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index cbe1c11..073c4cb 100644 --- a/README.md +++ b/README.md @@ -23,9 +23,6 @@ platform](https://www.opendata.nhs.scot/) via the CKAN API. - `list_resources()` returns information on all resources within an open dataset by dataset name -For extracting metadata and search functionality, we recommend using the -[ckanr package](https://docs.ropensci.org/ckanr/). - `phsopendata` can be used on both Posit Workbench and desktop versions of RStudio. However, depending on firewall settings, proxy use may need to be configured with `use_proxy()`. From 976937db54e72295eda30daf1ba8d6aa3871a1b9 Mon Sep 17 00:00:00 2001 From: csills01 Date: Thu, 19 Sep 2024 09:54:50 +0100 Subject: [PATCH 08/10] update news with get_latest_resource --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index 4ea6d84..1bb693b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -9,6 +9,7 @@ you've asked for doesn't exist (i.e. there's a typo) and there are multiple likely candidates (#28). - Two new functions `list_datasets()` and `list_resources()` allow browsing available datasets and resources (#10). +- The new function `get_latest_resource()` retrieves the most recent resource from a dataset with additional context such as the resource ID and modified / created dates (#36). # phsopendata 0.1.0 (2021-07-22) From 010cb712c58914045b2d6ee4225e51222d751de1 Mon Sep 17 00:00:00 2001 From: csills01 Date: Tue, 24 Sep 2024 11:33:06 +0100 Subject: [PATCH 09/10] Simplify wording --- README.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.Rmd b/README.Rmd index f613a6f..9367b56 100644 --- a/README.Rmd +++ b/README.Rmd @@ -29,7 +29,7 @@ knitr::opts_chunk$set( - `list_resources()` returns information on all resources within an open dataset by dataset name -`phsopendata` can be used on both Posit Workbench and desktop versions of RStudio. However, depending on firewall settings, proxy use may need to be configured with `use_proxy()`. +`phsopendata` can be used on both Posit Workbench and desktop versions of RStudio. ## Installation From bed6256fb06bdd88ec301f3d7cdca727344c2ff5 Mon Sep 17 00:00:00 2001 From: csillasch Date: Tue, 24 Sep 2024 10:37:06 +0000 Subject: [PATCH 10/10] Re-build README.Rmd --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 073c4cb..d5e265a 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,7 @@ platform](https://www.opendata.nhs.scot/) via the CKAN API. open dataset by dataset name `phsopendata` can be used on both Posit Workbench and desktop versions -of RStudio. However, depending on firewall settings, proxy use may need -to be configured with `use_proxy()`. +of RStudio. ## Installation