Learn R Programming

eechidna (version 0.1)

nat_data: (Very small) Map of Australian Electorate from 2013

Description

A dataset containing the map of the all 150 Australian electorates using the 2013 boundaries of the electorates (and downsampled to a 0.5% file to allow fast plotting). The data were obtained from the Australian Electoral Commission, and downloaded from http://www.aec.gov.au/Electorates/gis/gis_datadownload.htm. Data of the Australian Electorate from 2013

Usage

nat_data

Arguments

Format

A data frame with 150 rows with the following variables:
  • id: numeric identifier that links the electorate with the corresponding polygon in `nat_map`.
  • ELECT_DIV: Electorate division name
  • STATE: abbreviation of the state name
  • NUMCCDS: AEC variable that might be filled with meaning or a description down the road
  • AREA_SQKM: combined square kilometers of each electorate

Details

A dataset containing some demographic information for each of the 150 Australian electorates. The data were obtained from the Australian Electoral Commission, and downloaded from http://www.aec.gov.au/Electorates/gis/gis_datadownload.htm. The data is published

Examples

Run this code

data(nat_data)
nat_map$region <- nat_map$ELECT_DIV
data(abs2011)
abs2011$region <- abs2011$Electorate
both <- intersect(unique(abs2011$region), unique(nat_map$region))
data(nat_data)
library(ggplot2)
library(ggthemes)
ggplot(aes(map_id=region), data=subset(abs2011, region %in% both)) +
  geom_map(aes(fill=MedianIncome), map=subset(nat_map, region %in% both)) +
  expand_limits(x=nat_map$long, y=nat_map$lat) + 
  theme_map()
  

Run the code above in your browser using DataLab