May 11, 2020

Data-set Details

library(dplyr)
library(plotly)
nytaxi <- read.csv("nyc_tlc_yellow_trips_2018_subset_1.csv") %>% 
  transmute(yearmonth = format(as.Date(pickup_datetime), "%Y%m"),
            passenger_count) %>%
  group_by(yearmonth) %>% summarise(Passenger_Count = sum(passenger_count))
head(nytaxi)
# A tibble: 6 x 2
  yearmonth Passenger_Count
  <chr>               <int>
1 201801               1228
2 201802               1248
3 201803               2722
4 201804               1249
5 201805               1324
6 201806               1225

Shiny provides the ability to visulise the insights through Radio button

 plot_ly(nytaxi, x = nytaxi$yearmonth, y = nytaxi$Passenger_Count,
         type = 'scatter', mode="lines+markers", name = 'Actual Trips') %>%
layout(title = 'Line Chart - Passener Count By Month')

It further provides user interactivity Shiny NumericInout option

 plot_ly(nytaxi, x = nytaxi$yearmonth, y = nytaxi$Passenger_Count,type = 'scatter', mode="lines+markers", name = 'Actual Trips')  %>%
             add_trace(y = 1200, name = 'Monthly Limit', mode = 'markers') %>%
             layout(title = 'Line Chart - Passener Count By Month')

Summary

What does this app offer!

  1. Interactivity - Ability not only to choose preferred visuals but also input (and visualise) monthly trip limit which city should advocate in order to convince people to use more public transport

  2. Result - Interactivity with insights leveraging shiny and plotly which might encourage users to transition form mere user of app to developer of insights.