Code Monkey home page Code Monkey logo

divvyvision's Introduction

Divvy.Vision

Divvy.Vision is an open-source visualization platform of Chicago's Divvy bike share program, and an entry for the Divvy Data Challenge 2015.

It aims to better understand rider mobility by visualizing trips between stations with hourly height curves representing trip length, and daily flow from a selected neighborhood with a map-coupled chord diagram.

Here's a demo of Divvy.Vision. Feel free to try out the visualization yourself by recreating the visualization using the instructions below.

Divvy Vision


Features

Major features of the visualization platform are outlined and below:

  1. Find 2014 daily & hourly origin-destination trip data with the sliders. Taller curves = longer trips.
  2. View daily frequency of trips between two neighborhoods with the chord diagram to the right.
  3. Highlight neighborhoods to see flow from a selected neighborhood. Brightness = more trips.

This visualization uses a dockerized Cassandra database for storage and querying,Cesium for 3D GIS mapping, CartoDB Positron for basemap tiling, d3 for chord diagrams, jsTween for sliders, Nodejs for serving of content, and Turf for server-side GIS operations.


Run Divvy.Vision

Clone the Divvy.Vision repository to a local directory:

git clone [email protected]:mattshax/divvyvision.git

Install nodejs packages via npm:

cd divvyvision
npm install

Divvy.Vision uses a Cassandra database for storage of 2014 Divvy trips. Install docker with the command below if on Ubuntu or see the instructions here.

curl -sSL https://get.docker.com/ubuntu/ | sudo sh

Pull and run the mattshax/divvyvision_db docker container with the command below:

docker run --entrypoint /sbin/my_init -d --name divvyvision_db mattshax/divvyvision_db

After a few minutes (ie download container and start Cassandra ~1-2 min), the database should be available.

Get the IP address of the database container, and set as the "databaseIP" environment variable:

export databaseIP=$(docker inspect -f '{{ .NetworkSettings.IPAddress }}' divvyvision_db)

Start the nodejs service directly:

node server --public

If developing, run the Grunt task manager to watch for file changes and auto-reload on update:

grunt

Then open http://localhost:3006/ and you should see Divvy.Vision come to life.


Libraries and Technologies

  • Cesium – 3D mapping platform
  • Cassandra – Database of Divvy Trips
  • Docker – Containerizer of Cassandra database
  • Node.js – Server-side runtime environment
  • D3.js – Interactive chord flow diagrams
  • Grunt – Task manager / build system
  • Turf – Server-side geospatial analysis
  • CartoDB Positron – Night cesium basemap
  • jsTween – Slider tweening

Copyright & License

The MIT License (MIT)

Copyright (c) 2015 - Matthew Shaxted

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

divvyvision's People

Contributors

mattshax avatar snyk-community avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

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.