Description Usage Format Examples
A dataset containing the map of the all 150 Australian electorates using the 2016 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.
1 |
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
1 2 3 4 5 6 7 8 9 10 11 12 13 | library(eechidna)
nat_map16 <- nat_map_download(2016)
# choropleth map with Australian Census data
nat_map16$region <- nat_map16$elect_div
data(abs2016)
abs2016$region <- abs2016$DivisionNm
library(ggplot2)
library(ggthemes)
both <- intersect(unique(abs2016$region), unique(nat_map16$region))
ggplot(aes(map_id=region), data=subset(abs2016, region %in% both)) +
geom_map(aes(fill=MedianPersonalIncome), map=subset(nat_map16, region %in% both)) +
expand_limits(x=nat_map16$long, y=nat_map16$lat) +
theme_map()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.