Description Super classes Methods
UK ONS demographics
UK ONS demographics
ukcovidtools::PassthroughFilesystemCache -> ukcovidtools::DataProvider -> UKDemographicsProvider
new()UKDemographicsProvider$new(providerController, ...)
getDetailedDemographics()get the full range of demographics data at most detailed resolution
UKDemographicsProvider$getDetailedDemographics(...)
getDemographicsWithEstimatedEthnicity()UKDemographicsProvider$getDemographicsWithEstimatedEthnicity(...)
getIMDData()UKDemographicsProvider$getIMDData(...)
getDemographicsMap()LSOA & Scottish Data Zones
UKDemographicsProvider$getDemographicsMap(...)
getDemographicsForShape()get demographics interpolated to a specific shape file and aggregated to a given set of age bands, with optionally combining genders
UKDemographicsProvider$getDemographicsForShape( mapId, outputShape = self$geog$getMap(mapId), outputVars = vars(code, name), ageBreaks = seq(5, 90, 5), combineGenders = FALSE )
mapId= the mapId
outputShape= the sf object containing the shapefile of the desired output which may be grouped by desired output
outputVars= the desired output columns from the output shapefile enclosed by vars(...) (defaults to code and name)
ageBreaks= where to cut age groups? e.g. c(15,65,80) (max 90)
combineGenders= merge the genders
getDemographicsForCodeTypes()UKDemographicsProvider$getDemographicsForCodeTypes( codeTypes, ageBreaks = seq(5, 90, 5), combineGenders = FALSE )
getDemographicsFromWeightedMapping()UKDemographicsProvider$getDemographicsFromWeightedMapping( mappingDf, fromCodeVar = "fromCode", toCodeVar = "toCode", outputCodeVar = "code", weightExpr = 1, ageBreaks = seq(5, 90, 5), combineGenders = FALSE )
getSingleDigitDemographics()UKDemographicsProvider$getSingleDigitDemographics( mappingDf, fromCodeVar = "fromCode", toCodeVar = "toCode", outputCodeVar = "code", weightExpr = 1, combineGenders = FALSE )
transitiveClosureWeightedMap()UKDemographicsProvider$transitiveClosureWeightedMap( df, codeVar = "code", codeTypeVar = "codeType", ... )
findDemographics()UKDemographicsProvider$findDemographics( df, codeVar = "code", codeTypeVar = "codeType", ageCatVar = "ageCat", genderVar = "gender", ... )
clone()The objects of this class are cloneable with this method.
UKDemographicsProvider$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.