USING JMP VISUALIZATION FOR A BIKESHARING PROGRAM IN
USING JMP® VISUALIZATION FOR A BIKE-SHARING PROGRAM IN NYC DISCOVERY SUMMIT 2014 MATT FLYNN, AETNA; MARY LOVELESS, JMP Copyright © 2012, SAS Institute Inc. All rights reserved.
DISCOVERY WHO WE ARE SUMMIT 2014 • Mn. M is an analytic consulting company. Team members are: • Matt Flynn: awesome SAS and JMP programmer; all-around genius • Mary Loveless: storyteller and JMP user • Mn. M looked at Citi Bike’s open, free data to understand patterns of ridership and bike usage in New York City. • Tools we used: SAS • R • JMP • Copyright © 2012, SAS Institute Inc. All rights reserved.
DISCOVERY OVERVIEW SUMMIT 2014 Citi Bike Data • Data Collection • Data Description • Visualization Flow • Copyright © 2012, SAS Institute Inc. All rights reserved.
DISCOVERY CITI BIKE DATA SUMMIT 2014 Citi Bike offers a public bike-sharing service in many cities in the US. • This talk will focus on the New York City bike share program: • Membership • Rider usage • Availability: • • Bikes (access) • Docks (returns) • Station and neighborhood usage Copyright © 2012, SAS Institute Inc. All rights reserved.
DISCOVERY THE DATA (CITI BIKE PUBLIC DATA) SUMMIT 2014 • Bike Station Data is available in JSON format from https: //www. citibikenyc. com/stations/json • • Contains mostly: • Station Names and IDs • Available Bikes and Docks • Dates and Times Trip History Data available in CSV format from http: //www. citibikenyc. com/system-data • Contains information regarding bike trips, such as: • • • Start Time and Date Stop Time and Date Start Station Name End Station Name Station ID Station Lat/Long Bike ID User Type (Customer = 24 -hour pass or 7 -day pass user; Subscriber = Annual Member) Gender (Zero=unknown; 1=male; 2=female) Year of Birth Copyright © 2012, SAS Institute Inc. All rights reserved.
DISCOVERY WHERE DO WE BEGIN? SUMMIT 2014 The data is in a JSON file • What is a JSON file ? • • Wikipedia definition: “Java. Script Object Notation is an open standard format that uses human-readable text to transmit data objects consisting of attribute-value pairs. It is used primarily to transmit data between a server and web application, as an alternative to XML. ” Copyright © 2012, SAS Institute Inc. All rights reserved.
DISCOVERY DATA COLLECTION SUMMIT 2014 • How do we extract the data in a readable format? SAS has a JSON parser • R has two packages called: • • RJSONIO: reads a JSON file • HTTR: works with the web connection (See Appendix for example code) Copyright © 2012, SAS Institute Inc. All rights reserved.
DISCOVERY JMP EXPLORATION SUMMIT 2014 • After formatting the data, we used JMP for visualization, exploration and mapping. • Graph Builder: Flexible drag-and-drop data visualization builder • Heat maps • Bar graphs Bubble Plot: look at many variables at one time and animate • Street Level Maps • Background polygon maps • • Converted JSON New York City coordinates • Converted a KML New York City map format to use as a background map • • Used a KML polygon importer JMP add-in Create custom icons • Created custom icons using JMP add-in: Bubble Shape Editor Copyright © 2012, SAS Institute Inc. All rights reserved.
DISCOVERY WHAT ARE WE LOOKING TO LEARN? SUMMIT 2014 • Questions we want to explore: Where are the bikes, and how many are available? • Where are the docks, and how many are empty? • Who are the riders? • • Members or ad hoc riders? • When do they ride? What are the popular neighbors? • Station usage • Copyright © 2012, SAS Institute Inc. All rights reserved.
DISCOVERY LET US SHOW YOU SUMMIT 2014 Live JMP Demo Copyright © 2012, SAS Institute Inc. All rights reserved.
DISCOVERY EXAMPLES SUMMIT 2014 Examples of Output Copyright © 2012, SAS Institute Inc. All rights reserved.
DISCOVERY AVAILABLE BIKES OR DOCKS SUMMIT 2014 Available Bikes? Available Docks? Copyright © 2012, SAS Institute Inc. All rights reserved.
DISCOVERY RIDERSHIP SUMMIT 2014 Who are our riders? • Membership? • What time of day do they ride? • What are the popular neighborhoods by gender? • Copyright © 2012, SAS Institute Inc. All rights reserved.
DISCOVERY DAY OF THE WEEK SUMMIT 2014 • Which day of the week has the greatest ridership? Copyright © 2012, SAS Institute Inc. All rights reserved.
DISCOVERY NEIGHBORHOOD USAGE SUMMIT 2014 Copyright © 2012, SAS Institute Inc. All rights reserved.
DISCOVERY STATION USAGE SUMMIT 2014 Application to look at station usage: Copyright © 2012, SAS Institute Inc. All rights reserved.
DISCOVERY CONCLUSIONS SUMMIT 2014 You can go from JSON format to formatted data to use with JMP exploration tools. • We were able to visualize data to show Citi Bike where and how it could improve its business. • • If Citi Bike were to hire Mn. M consulting, here is what we would share: • • • More males ride than females. Female riders prefer neighborhoods as opposed to financial areas. Sunday and Saturday mid-morning and afternoon are most popular. Certain neighborhoods and stations are more popular during certain times and days. How to manage bike stocking. Ridership in financial areas is consistent, but there areas of improvement for Citi Bike. Copyright © 2012, SAS Institute Inc. All rights reserved.
DISCOVERY WHAT WE COULD SHOW CITI BIKE SUMMIT 2014 Time series: Neighborhood station usage Managing station needs: Which will need more bikes or more docks? • Model: Understand the effects on available bikes and/or docks • Look at additional data with Citi Bike data such as: Retail locations: Can we improve foot traffic? Is there an uptick around certain station locations? Restaurants and bars: Are we seeing more riders late at night? Subways: Is there more usage when subways are broken? Improve neighborhood connections and stations • Copyright © 2012, SAS Institute Inc. All rights reserved.
DISCOVERY WHO ELSE CAN WE HELP? SUMMIT 2014 • Other industries could use these same steps. For example: • • • Retail industry: Shopping patterns and geographical locations? Insurance: Where are the claims be filed? Types of claims? Geographical locations? Banking: Branch usage? Time of day and week? Most popular locations? Medical: Procedure patterns? Emergent care locations? Employers (and Employees): Another alternative to commute to work? Remember that Citi Bike is a company that provides a service to move people around a location. Stations must be accessible and easy to use. • Location location! • Copyright © 2012, SAS Institute Inc. All rights reserved.
DISCOVERY THANK YOU SUMMIT 2014 • *Mn. M Consulting Company thanks you for taking the time to view our presentation. • Note: Mn. M is fictitious company name created for this presentation. Copyright © 2012, SAS Institute Inc. All rights reserved.
DISCOVERY APPENDIX SUMMIT 2014 • Sample Code for SAS and R Copyright © 2012, SAS Institute Inc. All rights reserved.
DISCOVERY SAS CODE TO GET AND READ JSON SUMMIT 2014 Copyright © 2012, SAS Institute Inc. All rights reserved.
DISCOVERY SUMMIT SAS CODE 2014 Copyright © 2012, SAS Institute Inc. All rights reserved.
DISCOVERY R CODE TO GET AND READ JSON FILE SUMMIT 2014 Copyright © 2012, SAS Institute Inc. All rights reserved.
- Slides: 24