filter_by_census_area: Filters census data by area

Description Usage Arguments Value

Description

Filters a census table by another area e.g. meshblocks by territorial area or region. It can only work if the geographic level is at the same or a greater scale than the input data e.g. meshblocks <= area_units <= wards <= local boards <= territoral authorities <= regions

Usage

1
2
filter_by_census_area(.data, geographic_level, geographic_filter, pattern,
  append_geog_desc = TRUE)

Arguments

.data

The data set to be filtered. Must contain a column with census spatial names in it e.g. (Area_Code_and_Description).

geographic_level

The geographic level of the input spatial data e.g. area_units.

geographic_filter

The geographic level of the spatial filter e.g. region.

pattern

The pattern to match the area to filter by e.g. 'Wellington Region'.

Value

A sf dataframe.


phildonovan/nzcensr documentation built on May 12, 2019, 7:20 p.m.