R/get_heat_vulnerability_index.R

Defines functions get_heat_vulnerability_index

Documented in get_heat_vulnerability_index

#' NSW Heat Vulnerability Index to ABS Statistical Area Level 1 2016
#'
#' The NSW Heat Vulnerability Index (HVI) dataset identifies areas to monitor where
#' populations in the Sydney Greater Metropolitan Area are more vulnerable to the
#' adverse effects of urban heat, as of Summer 2015-2016. HVI utilises indicators
#' for exposure, sensitivity and adaptive capacity to calculate an overall heat
#' vulnerability index. Expressed through the data, a vulnerability of 1 represents a
#'  combination of low exposure, low sensitivity and/or high adaptive capacity.
#'  A vulnerability of 5 represents high exposure, high sensitivity and/or low adaptive capacity.
#'  The calculation of HVI and the inputs to the exposure, sensitivity and adaptive
#'  capacity indicators are explained in the metadata. The HVI data is aggregated to
#'  the Australian Bureau of Statistics (ABS) Statistical Area Level 1 (SA1) polygon
#'  dataset to enable spatial analysis to support local policy and decision making.
#'  It can be used in conjunction with the NSW urban vegetation cover dataset for
#'  the same time period for broader analysis of the relationship of heat to green cover.
#'
#' https://datasets.seed.nsw.gov.au/dataset/nsw-heat-vulnerability-index-to-abs-statistical-area-level-1-2016
#'
#' @param sa1 text, SA1 2016 code
#'
#' @export
get_heat_vulnerability_index <- function(sa1){

  stopifnot(
    'Only 1 value can in input' = length(sa1) == 1,
    'SA1 code not known' = sa1 %in% mb2016_to_sa12016$SA1_MAINCODE_2016)

  query_api(url = service_urls$heat_vulnerability_index,
            where_query_string = sprintf("SA1_MAIN16='%s'", sa1))


}
Shaunson26/futureScenario documentation built on June 15, 2022, 2:12 p.m.