The original data is available from the Chicago Data Portal at: https://data.cityofchicago.org/Transportation/CTA-Ridership-L-Station-Entries-Daily-Totals/5neh-572f. The file size is 39MB.
The original data is very detailed and contains ridership data of all the CTA stations in Chicago starting 2001 to 2021. The dataset shows entries at all turnstiles, combined, for each station. Daytypes are as follows: W = Weekday, A = Saturday, U = Sunday/Holiday.
For the purpose of this project, ridership data is filtered for three particular stations namely: UIC-Halsted, O'hare, and Sox-35th. After filtering the data, three separate TSV files were created for each of the stations. Later, these three TSV files were used to create the visualizations of the app. R language was used to read and filter the dataset. The code used for filtering the original dataset and creating the TSV files is provided below:
library(dplyr)
cta <- read.csv(file = "CTA_-_Ridership_-__L__Station_Entries_-_Daily_Totals.tsv", sep = "\t", header = TRUE)
cta_halsted <- cta %>% filter(stationname == "UIC-Halsted")
write.table(cta_halsted, file = "cta_halsted.tsv", row.names=FALSE, sep="\t")
cta_ohare <- cta %>% filter(stationname == "O'Hare Airport")
write.table(cta_ohare, file = "cta_ohare.tsv", row.names=FALSE, sep="\t")
cta_sox <- cta %>% filter(stationname == "Sox-35th-Dan Ryan")
write.table(cta_sox, file = "cta_sox.tsv", row.names=FALSE, sep="\t")