Tasmania

2019-08-20

The sugarbag package can be downloaded directly from github:

#remotes::install_github("srkobakian/sugarbag")
library(sugarbag)
library(dplyr)
library(tidyr)
library(tibble)
library(ggplot2)

Creating a hexagon map of Tasmania

Tasmania is a state of Australia, it has one large land mass and several smaller islands.

Data

We will use the Australian Bureau of Statistics’ ESRI shape files to build our map. Provided for convenience on the package website:

https://srkobakian.github.io/sugarbag/articles/abs-data.html

The set has been filtered for only Tasmanian areas. The data set of Tasmanian Statistical Areas at level two has been provided as a package data set, ?tas_sa2.

Centroids

The function create_centroids finds the central points of the polygons provided as an argument.

Hexagon grid

To tesselate correctly, all the hexagons must be evenly spaced. This function creates a grid of possible locations for the polygons.

Allocate areas

Each polygon centroid will be allocated to the closest available hexagon grid point. The capital cities data set will be used to preserve neighbourly relationships.