ozmaps

The goal of ozmaps is to get maps of Australia to plot! The package itself is available from CRAN. The package includes several data sets of Australian coastline, state outlines, local municipality boundaries (LGA, Local Government Areas) and electoral boundaries for commonwealth (nation) level.

These data layers may be plotted directly obtained as spatial data objects. The layers are a simplified subset (reduced detail, and not all layers included) of the Australian Bureau of Statistics 2016 map data. The original data sets and the process for their simplication and extraction is outlined in the ozmaps.data package. That package is an unfinished project designed to ease access to the more detailed and full data products that are available.

library(ozmaps)

Plot Australia with states.

library(ozmaps)
ozmap()

Plot Australia without states.

ozmap(x = "country")

Add to an existing plot.

plot(quakes[c("long", "lat")], xlim = c(120, 190))
ozmap(add = TRUE)

Obtain the data used in sf form.

sf_oz <- ozmap_data("states")

tibble::as_tibble(sf_oz)
#> # A tibble: 9 x 2
#>   NAME                         geometry
#>   <chr>                        <list>  
#> 1 New South Wales              <XY>    
#> 2 Victoria                     <XY>    
#> 3 Queensland                   <XY>    
#> 4 South Australia              <XY>    
#> 5 Western Australia            <XY>    
#> 6 Tasmania                     <XY>    
#> 7 Northern Territory           <XY>    
#> 8 Australian Capital Territory <XY>    
#> 9 Other Territories            <XY>

Plot with a custom palette.

if (utils::packageVersion("paletteer") < '1.0.0') {
 pal <- paletteer::paletteer_d(package = "ochRe", palette = "namatjira_qual")
} else {
  pal <- paletteer::paletteer_d(palette = "ochRe::namatjira_qual")
} 
opal <- colorRampPalette(pal)

ozmap("abs_ced", col = opal(nrow(abs_ced)))


ozmap("abs_ste", col = opal(nrow(abs_ste)))