Creating an Australian maritime ports map in R

Creating an Australian maritime ports map in R

It is visually appealing if you want to visualise locations on a map. And with R, it is fairly easy to pin each location onto the map by using its coordinates.

In this post, I'm going to use R to create an Australian map showing its maritime ports.

Required files

To get started, you need to get the following files ready.

After reading the maritime ports .csv file, we only need to keep the longitude, latitude, class, and name columns for chart creation. Class column is acting as a category to identify a port is for Commodity use or mixed use of Commodity and Military. While the name column is for us to show the label or name of a port.  

Note:

  1. GDA2020 digital boundary file (.shp) was downloaded from ABS under State and Territory level. 
  2. Geoscience Australia, Major Maritime Ports, CC BY 4.0 License. 

R script

You can access the R script used (shown below) to create such a map.

Back to blog