Mapping NSW Fire Incidents in R

R
analysis
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 22 features and 7 fields
Geometry type: GEOMETRY
Dimension:     XY
Bounding box:  xmin: 141.9267 ymin: -37.06285 xmax: 153.0005 ymax: -29.11298
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