Closed arxan11 closed 4 years ago
Hi @arxan11 - thanks for reporting this. It looks like a bug with AreaTypeID = "All"
. I need to investigate it - it is a fairly new feature.
In the meantime, here is a robust workflow that will work:
library(fingertipsR)
library(dplyr)
#get a list of indicators
inds <- indicators_unique()
#find the indicator of interest & extract data for all areas & area types
see <- inds %>%
filter(grepl("reporting learning disability", IndicatorName))
ind_ats <- indicator_areatypes(see$IndicatorID) %>%
left_join(area_types(), by = "AreaTypeID") %>%
select(IndicatorID:AreaTypeName) %>%
unique()
View(ind_ats) # see the table
# You want AreaTypeID == 7
df <- fingertips_data(IndicatorID = see$IndicatorID, AreaTypeID = 7) %>%
rename_all(tolower)
# check if data for the 1st from the top GP practice and the 5th from the top exist
"Y00058" %in% df$areacode
"J83063" %in% df$areacode
Hi @arxan11 - I've updated the package to fix this bug. I'm going to push it to CRAN any day now. If you're happy to wait, you should be able to install it sometime next week using install.packages("fingertipsR")
- otherwise, you can get the update now using:
if (!require(remotes)) install.packages("remotes")
remotes::install_github("rOpenSci/fingertipsR")
If you're happy with the fix, please could you close the issue. Thanks again
Thanks @sebastian-fox
Hi. I am having trouble acquiring data through fingertips r that are available through the fingertips website. Below is a screenshot of an example where you have the "% reporting learning disability" metric at CCG and gp practice level for a specific area:
Let's try and get the same data using the fingertips package:
The outputs are TRUE and FALSE. Meaning data for Taw Hill Medical Practice are not available. This is the case for other GP practices within this area and also applies to other areas. Any suggestions?