Data

Package data files

capital_cities

The point locations of Australian capital cities.

tas_sa2

The polygons of Tasmanian Statistical Areas in 2016.

fp19

2019 Australian Federal election data: First preference votes for candidates (House of Representatives) in each electorate.

homeless

The amount of homeless people in each Statistical Area at Level 2 in 2016.

tas_lga

The polygons of Tasmanian Local Government Areas in 2016.

tas_lga_hexctr

The hexagon centres for polygons of Tasmanian Local Government Areas in 2016.

Core Functions

Functions used to create a tessellated hexagon map

geom_sugarbag()

geom_sugarbag

create_hexmap()

Create a tessellated hexagon map from a set of polygons

create_centroids()

Create a data frame of longitude and latitude centroids of each polygon.

closest_focal_point()

For the polygon provided, find the closest focal point in the set provided

create_grid()

Create a grid of evenly spaced points to allow hexagons to tessellate

allocate()

Allocate polygon centroids to hexagons in a grid

create_buffer()

Expand points to extend beyond the outermost centroids

filter_grid_points()

Filter full set of grid points for those within range of original point

Helper Functions

Functions used to manipulate data

read_shape()

Read in the shape file as sf object

fortify_hexagon()

Creates the points that define a hexagon polygon for plotting

fortify_sfc()

Convert a simple features tibble to tibble for plotting.