# Fetching the unemployment data for Virginia from 2000 onward
unemp_data_2020 <- tq_get(c("VIRG251URN"), get = "economic.data", from = "2000-01-01")
# Summarizing the data from January 2020 onward
unemp_summary_2020 <- unemp_data_2020 %>%
filter(date >= "2020-01-01") %>%
summarize(
min_rate = min(price, na.rm = TRUE),
max_rate = max(price, na.rm = TRUE),
mean_rate = mean(price, na.rm = TRUE)
)
# Generating the styled table
kable(unemp_summary_2020,
align = 'c',
col.names = c('Minimum Unemployment Rate', 'Maximum Unemployment Rate', 'Mean Unemployment Rate'),
digits = 2) %>%
kable_classic()