Similar to mapping Australian cities, is there some native way to generate a state/territory choropleth in R?
I can see several methods documented but none which are complete (e.g. this looks somewhat promising, but lacks the original data)
library(rgdal)
library(spdplyr)
library(geojsonio)
library(rmapshaper)
# Load Australian State and Territories shapefile data
aus_ste <- readOGR(dsn = "/Users/kannishida/Downloads/STE11aAust", layer = "STE11aAust")
# Convert to GeoJSON
aus_ste_json <- geojson_json(aus_ste)
# Simplify the polygons to reduce the size
aus_ste_sim <- ms_simplify(aus_ste_json)
# Write GeoJSON file out to a file system
geojson_write(aus_ste_sim, file = "/Users/kannishida/Downloads/aus_ste.geojson")
An ideal solution would use data that exists on CRAN or reliable APIs - i.e. preference for reproducibility and reliability (by analogy, the same way we can get the world cities from CRAN via maps
library)
library(maps)
library(dplyr)
world.cities %>%
filter(country.etc == "Australia")
The desired result is something along the lines of