nat_map19: Map of Australian Electorates from 2019

nat_map19R Documentation

Map of Australian Electorates from 2019

Description

A dataset containing the map of the all 150 Australian electorates using the 2019 boundaries of the The data were obtained from the Australian Electoral Commission, and downloaded from https://www.aec.gov.au/Electorates/gis/gis_datadownload.htm. Must be loaded using the 'nat_map_download' function.

Usage

nat_map19

Format

A data frame with the following variables:

  • id: Numeric identifier for the polygon

  • long: longitude coordinate of point in polygon

  • lat: latitude coordinate of point in polygon

  • order: order for polygon points

  • hole: whether polygon has a hole

  • piece: piece for polygon

  • group: group for polygon

  • elect_div: Electoral division name

  • state: Abbreviation for state name

Examples

## Not run: 
library(eechidna)
nat_map19 <- nat_map_download(2019)
# choropleth map with Australian Census data
nat_map19$region <- nat_map19$elect_div
data(abs2019)
abs2019$region <- abs2019$DivisionNm
library(ggplot2)
library(ggthemes)
both <- intersect(unique(abs2019$region), unique(nat_map19$region))
ggplot(aes(map_id=region), data=subset(abs2019, region %in% both)) +
  geom_map(aes(fill=MedianPersonalIncome), map=subset(nat_map19, region %in% both)) +
  expand_limits(x=nat_map19$long, y=nat_map19$lat) +
  theme_map()

## End(Not run)

ropenscilabs/eechidna documentation built on May 4, 2023, 6:51 a.m.