Skip to content

beyondtracks/nsw-rfs-majorincidents-timeseries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nsw-rfs-majorincidents-timeseries

Demo using Dec 2019 bushfires

Live Demo

Usage (backend)

yarn install
git clone https://github.com/beyondtracks/nsw-rfs-majorincidents-archive.git

To process the whole history from the archive:

node --max-old-space-size=8192 index.js nsw-rfs-majorincidents-archive > timeseries.ndgeojson

Alternativly process withn a date range :

node --max-old-space-size=8192 index.js --start="2019-12-20" --end="2019-12-20" nsw-rfs-majorincidents-archive > timeseries.ndgeojson

This will output two files:

  • timestamps.json which contains metadata about the timeseries

An Object where the keys are timestamps in unix time, and the values are an array of Feature ID's which are visible for the timestamp.

  • timeseries.ndgeojson which contains a newline-delimited GeoJSON of the timeseries geometries

You can then either convert this to MBTiles to upload as a Mapbox Tileset:

tippecanoe --force --output timeseries.mbtiles -l timeseries timeseries.ndgeojson

...or you can convert to GeoJSON with:

ogr2ogr -f GeoJSON -preserve_fid timeseries.geojson timeseries.ndgeojson

Incremental updates

After update the archine repository to incrementally update with just the new data use:

./index.js --incremental nsw-rfs-majorincidents-archive >> timeseries.ndgeojson

Frontend

A sample visualisation web page using Mapbox GL JS contained at index.html. The app uses feature-states to very efficiently animate the data.

Releases

No releases published

Packages

No packages published