Skip to content

Commit

Permalink
indicator_metadata adapted for new field (Impact of COVID19)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Fox committed May 17, 2021
1 parent ee0655c commit cbccd6b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: fingertipsR
Type: Package
Version: 1.0.5.9000
Version: 1.0.6
Title: Fingertips Data for Public Health
Description: Fingertips (<http://fingertips.phe.org.uk/>) contains data for many indicators of public health in England. The underlying data is now more easily accessible by making use of the API.
Maintainer: Sebastian Fox <sebastian.fox@phe.gov.uk>
Expand Down
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# fingertipsR 1.0.5.9000
# fingertipsR 1.0.6 (2021-05-17)

* fixed warning message for multiple IndicatorIDs passed to indicator_metadata()
* fixed bug in indicator_metadata(IndicatorID = "All") - thanks Luke Bradley for pointing it out
* indicator_metadata now includes `Impact of COVID19 field`

# fingertipsR 1.0.5 (2020-09-16)

Expand Down
4 changes: 2 additions & 2 deletions R/indicator_metadata.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ indicator_metadata <- function(IndicatorID = NULL,
`Definition` = "c",
`Rationale` = "c",
`Data source` = "c",
`Indicator production` = "c",
`Indicator source` = "c",
`Methodology` = "c",
`Standard population/values` = "c",
Expand All @@ -68,7 +67,8 @@ indicator_metadata <- function(IndicatorID = NULL,
`Unit` = "c",
`Value type` = "c",
`Year type` = "c",
`Polarity` = "c")
`Polarity` = "c",
`Impact of COVID-19` = "c")

if (missing(path)) path <- fingertips_endpoint()
set_config(config(ssl_verifypeer = 0L))
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-enhancements.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ test_that("fingertips_redred should return an error", {
numcols <- 26
test_that(paste("fingertips_redred returns correct column number table for AreaTypeID 202"), {
skip_on_cran()
expect_equal(ncol(fingertips_redred(90616, AreaTypeID = 202, Comparator = "England")), numcols)
expect_equal(ncol(fingertips_redred(30309, AreaTypeID = 402, Comparator = "England")), numcols)
})

test_that("fingertips_redred returns correct column number table for AreaTypeID 154", {
Expand Down
3 changes: 2 additions & 1 deletion tests/testthat/test-extract.R
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ test_that("the correct url produced when AreaTypeID = 'All' and ProfileID provid
test_that("the correct url produced when AreaTypeID = 'All' and IndicatorID provided", {
skip_on_cran()
expect_equal(fingertips_data(IndicatorID = 90362, ProfileID = 156, AreaTypeID = "All", url_only = TRUE),
c("https://fingertips.phe.org.uk/api/all_data/csv/by_indicator_id?indicator_ids=90362&child_area_type_id=302&parent_area_type_id=15&profile_id=156&include_sortable_time_periods=yes",
c("https://fingertips.phe.org.uk/api/all_data/csv/by_indicator_id?indicator_ids=90362&child_area_type_id=402&parent_area_type_id=15&profile_id=156&include_sortable_time_periods=yes",
"https://fingertips.phe.org.uk/api/all_data/csv/by_indicator_id?indicator_ids=90362&child_area_type_id=302&parent_area_type_id=15&profile_id=156&include_sortable_time_periods=yes",
"https://fingertips.phe.org.uk/api/all_data/csv/by_indicator_id?indicator_ids=90362&child_area_type_id=202&parent_area_type_id=15&profile_id=156&include_sortable_time_periods=yes",
"https://fingertips.phe.org.uk/api/all_data/csv/by_indicator_id?indicator_ids=90362&child_area_type_id=102&parent_area_type_id=15&profile_id=156&include_sortable_time_periods=yes",
"https://fingertips.phe.org.uk/api/all_data/csv/by_indicator_id?indicator_ids=90362&child_area_type_id=15&parent_area_type_id=15&profile_id=156&include_sortable_time_periods=yes",
Expand Down

0 comments on commit cbccd6b

Please sign in to comment.