HW2blog

hw2

Henry Mulvey
2/13/2022

HW2 try 2

library(“tidyverse”) library(“dplyr”)

library(readxl) MBTA_bus_all2 <- read_excel(“MBTA_bus_all2.xlsx”) View(MBTA_bus_all2)

mode, type of transit vehicle (bus), numeral

season, text

route_id and route_name, number of transit route

stop_sequence, not sure, numeral

direction_id, not sure, numeral

day_type_id, numerical representation of day_type_name, numeral

day_type_nam, weekday or weekend, text

time_period_id, not sure, text

stop_name, name of transit stop, text

stop_id, numerical id of transit stop, numeral

average_ons, average of boardings at that transit stop, numeral

average_offs, average of people getting off at that transit stop, numeral

average_load, I think average percentage of bus occupancy at that transit stop, percentage

num_trips, I think number of trips that day that serviced that stop, numeral

rdm_all <- filter(MBTA_bus_all2, route_name > 13 & route_name < 31) view(rdm_all)

rdm_all isolates all of the bus stops in the Boston neighborhoods of Roxbury, Dorchester, and Mattapan

popular_stops_rdm <- arrange(rdm_all, desc(average_ons)) view(popular_stops_rdm)

popular_stops_rdm ranks all of the stops in rdm_all by the average number of people that get on the bus at that stop

R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

summary(cars)
     speed           dist       
 Min.   : 4.0   Min.   :  2.00  
 1st Qu.:12.0   1st Qu.: 26.00  
 Median :15.0   Median : 36.00  
 Mean   :15.4   Mean   : 42.98  
 3rd Qu.:19.0   3rd Qu.: 56.00  
 Max.   :25.0   Max.   :120.00  

Including Plots

You can also embed plots, for example:

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.

Reuse

Text and figures are licensed under Creative Commons Attribution CC BY-NC 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".

Citation

For attribution, please cite this work as

Mulvey (2022, Feb. 13). Data Analytics and Computational Social Science: HW2blog. Retrieved from https://github.com/DACSS/dacss_course_website/posts/httpsrpubscomhmuleyumass865375/

BibTeX citation

@misc{mulvey2022hw2blog,
  author = {Mulvey, Henry},
  title = {Data Analytics and Computational Social Science: HW2blog},
  url = {https://github.com/DACSS/dacss_course_website/posts/httpsrpubscomhmuleyumass865375/},
  year = {2022}
}