Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e6cc19d
See below
sonixtreme322 Jan 23, 2026
3b9c44a
made the slide deck
sonixtreme322 Jan 23, 2026
79fe312
Update Data400Praccy.html
sonixtreme322 Jan 27, 2026
d6c24dd
Initial changes to slideshow for idea pitching
sonixtreme322 Jan 30, 2026
dc7234e
Making the actual idea pitch
sonixtreme322 Jan 30, 2026
e378e4e
Took out the images, the were hard to work with
sonixtreme322 Jan 30, 2026
c88e909
some changes
sonixtreme322 Jan 30, 2026
f7a4f6e
Edited the markdown file and imported needed data
sonixtreme322 Feb 3, 2026
4c005b4
uh
sonixtreme322 Feb 5, 2026
a3c3a2e
mini project 2 upload
sonixtreme322 Feb 6, 2026
30c10a4
wow, html
sonixtreme322 Feb 6, 2026
f80253d
more
sonixtreme322 Feb 10, 2026
1f0ac25
Create webscrapingData400.textClipping
sonixtreme322 Feb 10, 2026
964d2ec
webscraping in class activity
sonixtreme322 Feb 10, 2026
5d9a2f3
some edits
sonixtreme322 Feb 10, 2026
1b78ccd
weeeb
sonixtreme322 Feb 10, 2026
d5044e0
actually doing project work
sonixtreme322 Feb 17, 2026
98ad660
just did it all again for chicago
sonixtreme322 Feb 17, 2026
686de21
ah
sonixtreme322 Feb 17, 2026
a9184dc
Images and actually making my presentation for today
sonixtreme322 Feb 17, 2026
146d429
doin stuff
sonixtreme322 Feb 17, 2026
c7ac478
more project work because I'm so so very on top of things
sonixtreme322 Feb 17, 2026
e698a74
ahhhhhhhhhh
sonixtreme322 Feb 17, 2026
849dad2
Update MiniProjectPresentation.html
sonixtreme322 Feb 17, 2026
37fbb40
last call
sonixtreme322 Feb 17, 2026
3ceefae
moved shit
sonixtreme322 Feb 17, 2026
539c8fc
where be the comments i know they exist
sonixtreme322 Feb 24, 2026
904a1f1
hollon
sonixtreme322 Feb 27, 2026
6987b9b
Uploading Capstone presentation for grading
sonixtreme322 Mar 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
Empty file added .Rhistory
Empty file.
42,263 changes: 42,263 additions & 0 deletions .ipynb_checkpoints/webscrapingData400-checkpoint.ipynb

Large diffs are not rendered by default.

Binary file added CrowdBeforeTrain.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CrowdInTrain.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
191 changes: 191 additions & 0 deletions Data400Praccy_files/figure-html/cars-1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Data_Capstone_Progress_Presentation.pptx
Binary file not shown.
158 changes: 158 additions & 0 deletions MiniProject.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
### ~ Libraries ~ ###
library(ggplot2)
library(dplyr)
library(lubridate)

### ~ Extraction ~ ###

#Trains!
boston_rail <- read.csv('/Users/benjaminfox/Desktop/Data400_Spring26/data/Public Transit Fer Mini Project/Boston_Rail.csv')
ny_rail <- read.csv('/Users/benjaminfox/Desktop/Data400_Spring26/data/Public Transit Fer Mini Project/New_York_Rail.csv')
chicago_rail <- read.csv('/Users/benjaminfox/Desktop/Data400_Spring26/data/Public Transit Fer Mini Project/Chicago_Rail.csv')

#Tour dates for reference - csvs I made from existing data
newYorkDates <- read.csv('/Users/benjaminfox/Downloads/Artists Playing Dates - In New York.csv')
bostonDates <- read.csv('/Users/benjaminfox/Downloads/Artists Playing Dates - In Boston.csv')
chicagoDates <- read.csv('/Users/benjaminfox/Downloads/Artists Playing Dates - In Chicago.csv')

### ~ Refactoring ~ ###

#Boston Rail
boston_rail_by_day <- summarise(group_by(boston_rail, servicedate), sum_boardings = sum(estimated_boardings))

boston_rail_by_day <- boston_rail_by_day %>% mutate(generous_revenue = sum_boardings * 2.4,
kinda_generous = sum_boardings * 1.1)

#Chicago Rail
which(grepl('202',chicago_rail$service_date)==TRUE)
trimmed_chicago <- chicago_rail[which(grepl('202',chicago_rail$service_date)==TRUE),]

chicago_dates_for_r <- mdy(trimmed_chicago$service_date)

doubleTrain <- cbind(chicago_dates_for_r,weekdays(chicago_dates_for_r),
trimmed_chicago[2:5])
colnames(doubleTrain) <- c("Service Date", "Day of Week", "Day Type", "Bus", "Rail", "Total")

#New York Rail
newYorkNoPercent <- ny_rail |> select(Date, Subways..Total.Estimated.Ridership,
Buses..Total.Estimated.Ridership,
LIRR..Total.Estimated.Ridership,
Metro.North..Total.Estimated.Ridership,
Access.A.Ride..Total.Scheduled.Trips,
Bridges.and.Tunnels..Total.Traffic,
Staten.Island.Railway..Total.Estimated.Ridership)

colnames(newYorkNoPercent) <- c("Date","Subway Total", "Bus Total",
"LIRR Total","Metro North Total",
"Access A Ride Total","Bridge & Tunnel Total",
"Staten Island Total")
#FYI, LIRR = Long Island Rail Road
#Access A Ride is those with disabilities to get around the city

#I ran a bunch of commands to clean the numbers into being processed as numbers
newYorkNoPercent <- newYorkNoPercent %>% mutate(TransitTotal = `Subway Total` + `Bus Total` +
`LIRR Total` + `Metro North Total` +
`Access A Ride Total` + `Bridge & Tunnel Total` +
`Staten Island Total`)

CleanedNYTransit <- newYorkNoPercent %>% select(Date, TransitTotal,`Subway Total`, `Bus Total`,
`LIRR Total`, `Metro North Total`, `Access A Ride Total`,
`Bridge & Tunnel Total`, `Staten Island Total`)

#Where do I actually need to analyze tho? Like which trains for which shows?
#I will make vectors of concert dates for each artist

CleanedNYTransit$Date <- mdy(CleanedNYTransit$Date)

#Focusing on looking at the mean and median travel by year in each city
newYorkByYear <- summarise(group_by(CleanedNYTransit, substr(Date, 1,4)),
meanBoardings = mean(TransitTotal),
medianBoardings = median(TransitTotal))

bostonByYear <- summarise(group_by(boston_rail_by_day, substr(servicedate, 1,4)),
meanBoardings = mean(sum_boardings),
medianBoardings = median(sum_boardings))

chicagoByYear <- summarise(group_by(doubleTrain, substr(`Service Date`, 1, 4)),
meanBoardings = mean(Total),
medianBoardings = median(Total))

colnames(chicagoByYear) <- c("Year", "Mean Transit", "Median Transit")

###Making final date charts before doing a wee bit of analysis
blankVector <- c(1:nrow(chicagoDates))

#Ensuring dates are built well
chicagoDates$Date <- ymd(chicagoDates$Date)
chicagoDates <- arrange(chicagoDates, Date)

#which(boston_rail_by_day$servicedate %in% bostonDates$Date[6])

#Building Basic Columns
for (i in blankVector){
replaceRow <- which(doubleTrain$`Service Date` %in% chicagoDates$Date[i])

blankVector[i] <- doubleTrain$Total[replaceRow]
}

for (i in blankVector){
yur <- substr(chicagoDates$Date[i], 1, 4)
blankVector[i] <- yur
}

chicagoDates <- cbind(chicagoDates,blankVector)

#Switch case loop
for (i in blankVector){
the <- switch(chicagoDates$Year[i],
"2020" = chicagoByYear$`Mean Transit`[1],
"2021" = chicagoByYear$`Mean Transit`[2],
"2022" = chicagoByYear$`Mean Transit`[3],
"2023" = chicagoByYear$`Mean Transit`[4],
"2024" = chicagoByYear$`Mean Transit`[5],
"2025" = chicagoByYear$`Mean Transit`[6])

blankVector[i] <- the
}

for (i in blankVector){
and <- switch(chicagoDates$Year[i],
"2020" = chicagoByYear$`Median Transit`[1],
"2021" = chicagoByYear$`Median Transit`[2],
"2022" = chicagoByYear$`Median Transit`[3],
"2023" = chicagoByYear$`Median Transit`[4],
"2024" = chicagoByYear$`Median Transit`[5],
"2025" = chicagoByYear$`Median Transit`[6])

blankVector[i] <- and
}

#Mutate the differentials
chicagoDates <- chicagoDates %>%
mutate(meanDifferential = `Transit Total` - `Yearly Average`,
medianDifferential = `Transit Total` - `Yearly Median`)

colnames(chicagoDates) <- c("Date", "Artist", "Venue", "Transit Total", "Year",
"Yearly Average", "Yearly Median",
"Mean Differential", "Median Differential")

chicagoDates <- cbind(chicagoDates[1:4],chicagoDates[6:9])

CutYorkDates <- newYorkDates[1:38,]

meanDifferentials <- data.frame("Cities" = c("New York", "New York","Boston", "Boston","Chicago","Chicago","Total","Total"),
"Mean Differentials" = c(
mean(CutYorkDates$`Mean Differential`),
mean(CutYorkDates$`Median Differential`),
mean(bostonDates$`Mean Differential`),
mean(bostonDates$`Median Differential`),
mean(chicagoDates$`Mean Differential`),
mean(chicagoDates$`Median Differential`),
mean(allDates$`Mean Differential`),
mean(allDates$`Median Differential`)
), "Mode" = c("Mean","Median","Mean","Median","Mean","Median","Mean","Median"))

allDates <- rbind(CutYorkDates, bostonDates, chicagoDates)
allDates <- arrange(allDates, Date)

write.csv(meanDifferentials, file = '/Users/benjaminfox/Desktop/Data400_Spring26/data/Final Charts For Mini Project Presentation/meanDifferentials.csv')
Binary file added MiniProjectPresentation_files/.DS_Store
Binary file not shown.
Loading