Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme & increment version #39

Merged
merged 12 commits into from
Sep 24, 2024
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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", , "[email protected]", role = c("aut", "cre")),
person("James", "McMahon", , "[email protected]", role = "aut"),
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
csillasch marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 5 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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/).
csillasch marked this conversation as resolved.
Show resolved Hide resolved

`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()`.
csillasch marked this conversation as resolved.
Show resolved Hide resolved

## Installation

Expand All @@ -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()`.
csillasch marked this conversation as resolved.
Show resolved Hide resolved

```{r example resource, eval = FALSE}
library(phsopendata)
Expand Down Expand Up @@ -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.

Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 <https://www.opendata.nhs.scot/>, or extracted using
`ckanr::package_show`.
`list_resources()`.

library(phsopendata)

Expand Down Expand Up @@ -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:
Expand Down
Loading