Mapping NSW Fire Incidents in R

Author

Dean Marchiori

Published

January 17, 2021

Current Incidents Feed (GeoJSON)

This feed contains a list of current incidents from the NSW RFS, and includes location data and Major Fire Update summary information where available. Click through from the feed to the NSW RFS website for full details of the update.

GeoJSON is a lightweight data standard that has emerged to support the sharing of information with location or geospatial data. It is widely supported by modern applications and mobile devices.

See here: https://www.rfs.nsw.gov.au/news-and-media/stay-up-to-date/feeds for attribution and guidelines. Please read these important guidelines before using this data.

Code

Load packages

library(sf)
library(mapview)
library(tidyverse)

Pull incidents

url <- "http://www.rfs.nsw.gov.au/feeds/majorIncidents.json"
fires <- st_read(url)
Reading layer `majorIncidents' from data source 
  `http://www.rfs.nsw.gov.au/feeds/majorIncidents.json' using driver `GeoJSON'
Simple feature collection with 30 features and 7 fields
Geometry type: GEOMETRY
Dimension:     XY
Bounding box:  xmin: 145.1853 ymin: -37.10646 xmax: 153.4195 ymax: -28.33643
Geodetic CRS:  WGS 84

Optional step to get points only

# points only
fire_pt <- fires %>% 
  st_cast("POINT") 

Optional Step to get Polygons only. Note the hack to aply a zero distance buffer.

#' Polygons only
fire_poly <- fires %>% 
  st_buffer(dist = 0) %>% 
  st_union(by_feature = TRUE)

Mapping data interactively

mapview(fire_poly, layer.name = "RFS Current Incident Polygons", zcol = "category") +
  mapview(fire_pt, layer.name = "RFS Current Incident Locations", zcol = "category")

screenshot of leafet interactive map of fire incidents