|Petra Lamborn d5695ff2b6 More link messing||1 year ago|
|viz||1 year ago|
|.gitignore||1 year ago|
|README.md||1 year ago|
|commute.Rproj||1 year ago|
|maps.R||1 year ago|
|process.R||1 year ago|
|travel-education.csv||1 year ago|
|travel-work.csv||1 year ago|
This is an R Shiny and Leaflet data visualisation of the commuter data from the 2018 NZ Census of Populations and Dwellings; you can see it in action here. It serves as my entry for the 2020 There and Back Again data viz competition. The code for the visualisation itself is in the
viz/ folder, however note that it requires the code in
process.R to be run first to produce the
.RData file, along with the separate download of a SA2 shapefile (in WGS projection, and possibly simplified by the code in
Some problems with the code, for future personal reference.
Unfortunately I had to remove the Chatham Islands from the map, despite it being in the dataset! This was because their position on the far side of the 180° meridian causes issues with leaflet maps on WGS projections, while I was unable to get an alternative projection to work.
If you hover the cursor over a region, and then over the sea or a lake, the shiny code is capable of registering that you’re not over that same region still. However if you then return to the same region it doesn’t recognise that. This seems to be a limitation of how the shiny events stuff works. There might be something I can do with resetting the
input$, but I’ll look into it later.