Code Monkey home page Code Monkey logo

commute's Introduction

How did Kiwis commute in 2018?

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 maps.R).

Issues

Some problems with the code, for future personal reference.

The Chatham Islands

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.

Hovering

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.

commute's People

Contributors

petraoleum avatar

Watchers

 avatar

Forkers

drroad

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.