README.md

nzcensr

Travis-CI Build Status Coverage status

A library largely composed of tables representing the New Zealand Census and a helper functions to manipulate them. The data can be either a normal dataframe (tibble) or a simple features data table (GIS).

Check out the vignette and package help at spatialanalytics.co.nz.

Installation

Please be aware that this is a rather large package due to the amount of data contained within it, and therefore takes a little while to download.

To install the package:

devtools::install_github("phildonovan/nzcensr")

Getting going

Four main functions for use:

Let's take a quick look.

# Load libraries
library(nzcensr)
library(tidyverse)
library(sf)

# Select topic, filter area units within Hamilton, and transform
hamilton_city_council_ethnic_groups <- select_by_topic(individual_part_1_area_units, "ethnic") %>% 
  filter_by_area("area_units", "tas", "hamilton") %>% 
  transform_census(long = TRUE, clean = TRUE, replace_confidential_values = 1)

Author



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