This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(showtext) | |
# Add fonts similar to those used on Vanderbilt's website | |
font_add_google("Arimo", "arimo") | |
font_add_google("Noto Serif Display", "noto-serif-display") | |
showtext_auto() | |
# Create dataframe with top priorities data | |
# From Slide 24: https://www.vanderbilt.edu/csdi/Nasville_2025_slides_final.pdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(lubridate) | |
library(ggdist) | |
library(distributional) | |
tibble::tribble(~departure_time, ~duration_min, ~duration_max, | |
"9:00am", lubridate::dminutes(65), dminutes(100), | |
#"9:15am", lubridate::dminutes(70), dminutes(100), | |
"9:30am", lubridate::dminutes(70), dminutes(110), | |
#"9:45am", lubridate::dminutes(70), dminutes(110), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tibble::tribble(~departure_time, ~duration_min, ~duration_max, | |
"9:00am", lubridate::dminutes(65), dminutes(100), | |
#"9:15am", lubridate::dminutes(70), dminutes(100), | |
"9:30am", lubridate::dminutes(70), dminutes(110), | |
#"9:45am", lubridate::dminutes(70), dminutes(110), | |
"10:00am", lubridate::dminutes(75), dminutes(130), | |
#"10:15am", lubridate::dminutes(75), dminutes(130), | |
"10:30am", lubridate::dminutes(80), dminutes(130), | |
#"10:45am", lubridate::dminutes(80), dminutes(140), | |
"11:00am", lubridate::dminutes(80), dminutes(140), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(lubridate) | |
# The function below was written primarily with the aim of producing a codebook which can be exported to Excel. | |
# If you are trying to get a quick understanding of your data, str(), glimpse(), or summary() will all likely better serve you | |
# If you use this and make any improvements, please let me know. | |
# There's lots of room for this to be improved. | |
# - Check for presence of each data type, and perform processing accordingly | |
# - Check if the remaining df is empty after summarising each data type | |
# I wrote it without any safeguards because I know what I use it for but it could definitely use some more careful argument checking |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(gt) | |
# Read in data | |
# Using LA Budget data: https://controllerdata.lacity.org/Budget/City-Budget-and-Expenditures/uyzw-yi8n | |
la_budget_raw = read_csv("https://controllerdata.lacity.org/api/views/uyzw-yi8n/rows.csv?accessType=DOWNLOAD") | |
## OPTIONAL ## | |
# cleaner column names | |
library(janitor) |