Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ropensci/fingertipsR
R package to interact with Public Health England’s Fingertips data tool
https://github.com/ropensci/fingertipsR
api-wrapper cran fingertips health open-data peer-reviewed public-health public-health-england r r-package rstats
Last synced: 2 months ago
JSON representation
R package to interact with Public Health England’s Fingertips data tool
- Host: GitHub
- URL: https://github.com/ropensci/fingertipsR
- Owner: ropensci
- Created: 2017-04-07T12:00:06.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-10-25T10:57:32.000Z (4 months ago)
- Last Synced: 2024-11-04T16:29:06.189Z (3 months ago)
- Topics: api-wrapper, cran, fingertips, health, open-data, peer-reviewed, public-health, public-health-england, r, r-package, rstats
- Language: R
- Homepage: https://docs.ropensci.org/fingertipsR
- Size: 1.22 MB
- Stars: 92
- Watchers: 24
- Forks: 18
- Open Issues: 29
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- Contributing: CONTRIBUTING.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- jimsghstars - ropensci/fingertipsR - R package to interact with Public Health England’s Fingertips data tool (R)
README
---
output: github_document
---```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```[![codecov](https://codecov.io/gh/ropensci/fingertipsR/branch/master/graph/badge.svg?token=MpVheRqaRo)](https://codecov.io/gh/ropensci/fingertipsR)
[![](https://badges.ropensci.org/168_status.svg)](https://github.com/ropensci/software-review/issues/168)
[![R build status](https://github.com/ropensci/fingertipsR/workflows/R-CMD-check/badge.svg)](https://github.com/ropensci/fingertipsR/actions)# fingertipsR
This is an R package to interact with Public Health England's [Fingertips](http://fingertips.phe.org.uk/) data tool. Fingertips is a major public repository of population and public health indicators for England. The site presents the information in many ways to improve accessibility for a wide range of audiences ranging from public health professionals and researchers to the general public. The information presented is a mixture of data available from other public sources, and those that are available through user access agreements with other organisations. The source of each indicator presented is available using the `indicator_metadata()` function.
This package can be used to load data from the Fingertips API into R for further use.
## Installation
### rOpenSci
Get the latest released, stable version from rOpenSci:
```{r rOpenSci-install, eval=FALSE}
# Enable repository from ropensci
options(repos = c(
ropensci = 'https://ropensci.r-universe.dev',
CRAN = 'https://cloud.r-project.org'))# Download and install fingertipsR in R
install.packages('fingertipsR')
```### With remotes
You can install the latest development version from github using [remotes](https://github.com/r-lib/remotes):
```{r gh-installation, eval = FALSE}
# install.packages("remotes")
remotes::install_github("rOpenSci/fingertipsR",
build_vignettes = TRUE,
dependencies = "suggests")
```## Example
This is an example of a workflow for downloading data for the indicator on *Healthy Life Expectancy at Birth* from the *Public Health Outcomes Framework* profile.
The `profiles()` function presents all of the available profiles:
```{r profiles example}
library(fingertipsR)
profs <- profiles()
profs <- profs[grepl("Public Health Outcomes Framework", profs$ProfileName),]
head(profs)
```This table shows that the `ProfileID` for the Public Health Outcomes Framework is 19. This can be used as an input for the `indicators()` function:
```{r indicators example}
profid <- 19
inds <- indicators(ProfileID = profid)
print(inds[grepl("Healthy", inds$IndicatorName), c("IndicatorID", "IndicatorName")])
```Healthy Life Expectancy at Birth has the `IndicatorID` equal to 90362.
Finally, the data can be extracted using the `fingertips_data()` function using that `IndicatorID`:
```{r fingertips_data example}
indid <- 90362
df <- fingertips_data(IndicatorID = indid, AreaTypeID = 202)
head(df)
```## Use
Please see the vignettes for information on use.
```{r use, eval=FALSE}
browseVignettes("fingertipsR")
```## More information
* Please note that the 'fingertipsR' project is released with a
[Contributor Code of Conduct](https://github.com/ropensci/fingertipsR/blob/master/CODE_OF_CONDUCT.md).
By contributing to this project, you agree to abide by its terms.
* License: [GPL-3](https://opensource.org/licenses/GPL-3.0)[![ropensci\_footer](https://ropensci.org/public_images/ropensci_footer.png)](https://ropensci.org)