The preview data is not shown because the data was published by an older version of Exploratory Desktop.
Hover over or click an area.
0.07 – 0.14
0.14 – 0.21
0.21 – 0.28
0.28 – 0.35
0.35 – 0.41
Leaflet | Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © Mapbox
# Set libPaths.
.libPaths("/Users/kannishida/.exploratory/R/3.3")

# Load required packages.
library(janitor)
library(lubridate)
library(hms)
library(tidyr)
library(urltools)
library(stringr)
library(readr)
library(broom)
library(RcppRoll)
library(tibble)
library(dplyr)
library(exploratory)

# Data Analysis Steps
exploratory::read_delim_file("/Users/kannishida/Downloads/Birthplace_ethnicgroup.csv" , ",", quote = "\"", skip = 0 , col_names = TRUE , na = c("","NA") , locale=locale(encoding = "ASCII", decimal_mark = "."), trim_ws = FALSE , progress = FALSE) %>%
  exploratory::clean_data_frame() %>%
  filter(!is.na(Value)) %>%
  filter(Birthplace == "Total people, birthplace" & `Ethnic group` %nin% c("Not elsewhere included", "Total people stated", "Total people,other ethnicity", "Total people, ethnic group")) %>%
  filter(str_detect(Area, "Region") & Area != "Area Outside Region") %>%
  filter(!str_detect(Area, "^Oceanic") & !str_detect(Area, "^Total,")) %>%
  group_by(Area) %>%
  mutate(ratio = Value / sum(Value)) %>%
  filter(`Ethnic group` == "Maori")