This site includes some quick exploration of children in Louisville who would be eligible to attend Bezos Academies given a cutoff of 400% of the Federal Poverty Level (FPL).

For context, the 2024 FPL for a single-parent with one child is $20,440, and the FPL for a two-parent, two-child household is $31,200. The table below shows income benchmarks for various household sizes. (A 4-person household could include two parents and two children, or one parent and three children.) Living wage data is from the MIT living wage calculator.

library(reactable)

wage_df <- data.frame(
  fam_size = c(2, 3, 4),
  FPL100 = c(20440, 25820, 31200),
  FPL200 = c(20440, 25820, 31200) * 2,
  FPL300 = c(20440, 25820, 31200) * 3,
  FPL400 = c(20440, 25820, 31200) * 4,
  living_wage = c(34.89*52*40, 
                (43.29+19.63*2) / 2 * 40 * 52,
                (55.84+24.27*2) / 2 * 40 * 52))

reactable(
  wage_df,
  columns = list(
    fam_size = colDef(name = "Household Size"),
    FPL100 = colDef(name = "100% FPL", format = colFormat(prefix = "$", separators = TRUE, digits = 0)),
    FPL200 = colDef(name = "200% FPL", format = colFormat(prefix = "$", separators = TRUE, digits = 0)),
    FPL300 = colDef(name = "300% FPL", format = colFormat(prefix = "$", separators = TRUE, digits = 0)),
    FPL400 = colDef(name = "400% FPL", format = colFormat(prefix = "$", separators = TRUE, digits = 0)),
    living_wage = colDef(name = "Living Wage", format = colFormat(prefix = "$", separators = TRUE, digits = 0))))

The Census data available to us only provides information on the number of children age 0-5 rather than 3 and 4. While there might be some slight differences, we would expect patterns to be very similar between preschool-age children and all children age 0-5.

Where are the kids?

These maps show children age 0-5 under various poverty thresholds. One dot, one kid.

(We don’t have home addresses, so the dots are placed randomly within census tracts, which is close enough to provide a really accurate picture.)

100

There are 12,500 children age 0-5 under 100% of FPL in Louisville. (We’d guess that means there are 4,200 age 3-4.)

ggplot() + 
  geom_sf(data = jc) +
  geom_sf(data = pov_100_points, alpha = 0.1, color = "#086AD0") +
  theme_void() +
  theme(
    plot.title = element_text(size = 56, hjust = 0.5),
    plot.subtitle = element_text(size = 36, hjust = 0.5),
    legend.title = element_blank(),
    legend.text = element_text(size = 48),
    plot.caption = element_text(size = 28, lineheight = 0.6, margin = margin(t = 24)),

    legend.key.size = unit(2, 'cm')) +
  theme(
    plot.caption = element_text(size = 28, lineheight = 0.6)) +
  labs(
    title = "Children Age 0-5\nUnder 100% FPL",
    caption = "Data from 2022 5-Year American Community Survey Table B17024") +
  geom_sf(data = expressways_buffer, fill = "#444444")

200

There are 24,400 children age 0-5 under 200% of FPL in Louisville. (We’d guess that means there are 8,100 age 3-4.)

ggplot() + 
  geom_sf(data = jc) +
  geom_sf(data = pov_200_points, alpha = 0.1, color = "#086AD0") +
  theme_void() +
  theme(
    plot.title = element_text(size = 56, hjust = 0.5),
    plot.subtitle = element_text(size = 36, hjust = 0.5),
    legend.title = element_blank(),
    legend.text = element_text(size = 48),
    plot.caption = element_text(size = 28, lineheight = 0.6, margin = margin(t = 24)),

    legend.key.size = unit(2, 'cm')) +
  theme(
    plot.caption = element_text(size = 28, lineheight = 0.6)) +
  labs(
    title = "Children Age 0-5\nUnder 200% FPL",
    caption = "Data from 2022 5-Year American Community Survey Table B17024") +
  geom_sf(data = expressways_buffer, fill = "#444444")

300

There are 33,500 children age 0-5 under 200% of FPL in Louisville. (We’d guess that means there are 11,200 age 3-4.)

ggplot() + 
  geom_sf(data = jc) +
  geom_sf(data = pov_300_points, alpha = 0.1, color = "#086AD0") +
  theme_void() +
  theme(
    plot.title = element_text(size = 56, hjust = 0.5),
    plot.subtitle = element_text(size = 36, hjust = 0.5),
    legend.title = element_blank(),
    legend.text = element_text(size = 48),
    plot.caption = element_text(size = 28, lineheight = 0.6, margin = margin(t = 24)),

    legend.key.size = unit(2, 'cm')) +
  theme(
    plot.caption = element_text(size = 28, lineheight = 0.6)) +
  labs(
    title = "Children Age 0-5\nUnder 300% FPL",
    caption = "Data from 2022 5-Year American Community Survey Table B17024") +
  geom_sf(data = expressways_buffer, fill = "#444444")

400

There are 40,800 children age 0-5 under 200% of FPL in Louisville. (We’d guess that means there are 13,600 age 3-4.)

ggplot() + 
  geom_sf(data = jc) +
  geom_sf(data = pov_400_points, alpha = 0.1, color = "#086AD0") +
  theme_void() +
  theme(
    plot.title = element_text(size = 56, hjust = 0.5),
    plot.subtitle = element_text(size = 36, hjust = 0.5),
    legend.title = element_blank(),
    legend.text = element_text(size = 48),
    plot.caption = element_text(size = 28, lineheight = 0.6, margin = margin(t = 24)),

    legend.key.size = unit(2, 'cm')) +
  theme(
    plot.caption = element_text(size = 28, lineheight = 0.6)) +
  labs(
    title = "Children Age 0-5\nUnder 400% FPL",
    caption = "Data from 2022 5-Year American Community Survey Table B17024") +
  geom_sf(data = expressways_buffer, fill = "#444444")

Census Tract Maps

These maps show the percent of children who live in households at various poverty levels by Census Tract.

100

ggplot(graph_map) + 
  geom_sf(aes(fill = pov_100), color = NA) +
  viridis::scale_fill_viridis(labels = scales::percent) +
  theme_void() +
  theme(
    plot.title = element_text(size = 54, hjust = 0.5),
    plot.subtitle = element_text(size = 36, hjust = 0.5),
    legend.title = element_blank(),
    legend.text = element_text(size = 36),
    plot.caption = element_text(size = 28, lineheight = 0.6, margin = margin(t = 24)),

    legend.key.size = unit(2, 'cm')) +
  theme(
    plot.caption = element_text(size = 28, lineheight = 0.6)) +
  labs(
    title = "Percent of Children Age 0-5\nUnder 100% FPL",
    caption = "Data from 2022 5-Year American Community Survey Table B17024") +
  geom_sf(data = expressways_buffer, color = NA)

200

ggplot(graph_map) + 
  geom_sf(aes(fill = pov_200), color = NA) +
  viridis::scale_fill_viridis(labels = scales::percent) +
  theme_void() +
  theme(
    plot.title = element_text(size = 54, hjust = 0.5),
    plot.subtitle = element_text(size = 36, hjust = 0.5),
    legend.title = element_blank(),
    legend.text = element_text(size = 36),
    plot.caption = element_text(size = 28, lineheight = 0.6, margin = margin(t = 24)),

    legend.key.size = unit(2, 'cm')) +
  theme(
    plot.caption = element_text(size = 28, lineheight = 0.6)) +
  labs(
    title = "Percent of Children Age 0-5\nUnder 200% FPL",
    caption = "Data from 2022 5-Year American Community Survey Table B17024") +
  geom_sf(data = expressways_buffer, color = NA)

300

ggplot(graph_map) + 
  geom_sf(aes(fill = pov_300), color = NA) +
  viridis::scale_fill_viridis(labels = scales::percent) +
  theme_void() +
  theme(
    plot.title = element_text(size = 54, hjust = 0.5),
    plot.subtitle = element_text(size = 36, hjust = 0.5),
    legend.title = element_blank(),
    legend.text = element_text(size = 36),
    plot.caption = element_text(size = 28, lineheight = 0.6, margin = margin(t = 24)),

    legend.key.size = unit(2, 'cm')) +
  theme(
    plot.caption = element_text(size = 28, lineheight = 0.6)) +
  labs(
    title = "Percent of Children Age 0-5\nUnder 300% FPL",
    caption = "Data from 2022 5-Year American Community Survey Table B17024") +
  geom_sf(data = expressways_buffer, fill = "#000000", color = NA)

400

ggplot(graph_map) + 
  geom_sf(aes(fill = pov_400), color = NA) +
  viridis::scale_fill_viridis(labels = scales::percent, limits = c(0, 1)) +
  theme_void() +
  theme(
    plot.title = element_text(size = 54, hjust = 0.5),
    plot.subtitle = element_text(size = 36, hjust = 0.5),
    legend.title = element_blank(),
    legend.text = element_text(size = 36),
    plot.caption = element_text(size = 28, lineheight = 0.6, margin = margin(t = 24)),

    legend.key.size = unit(2, 'cm')) +
  theme(
    plot.caption = element_text(size = 28, lineheight = 0.6)) +
  labs(
    title = "Percent of Children Age 0-5\nUnder 400% FPL",
    caption = "Data from 2022 5-Year American Community Survey Table B17024") +
  geom_sf(data = expressways_buffer, fill = "#000000", color = NA)

Council District Data

This table shows the number of children and percent of children age 0 to 5 at various levels of poverty, by Metro Council District. (You can click on a column to sort by it.)

library(reactable)

district_modeled %<>%
  mutate(
    pov_400 = if_else(var_type == "percent" & pov_400 > 100, 100, pov_400))

district_table <- district_modeled %>%
  filter(var_type %in% c("estimate", "percent")) %>%
  pivot_wider(names_from = var_type, values_from = pov_100:pov_400) %>%
  mutate(across(all_of(c("pov_100_percent", "pov_200_percent", "pov_300_percent", "pov_400_percent")), ~ . / 100))

district_table_clean <- district_table %>%
  rename(
    District = district,
    `< 100% Poverty Estimate` = pov_100_estimate,
    `< 100% Poverty Percent` = pov_100_percent,
    `< 200% Poverty Estimate` = pov_200_estimate,
    `< 200% Poverty Percent` = pov_200_percent,
    `< 300% Poverty Estimate` = pov_300_estimate,
    `< 300% Poverty Percent` = pov_300_percent,
    `< 400% Poverty Estimate` = pov_400_estimate,
    `< 400% Poverty Percent` = pov_400_percent)

#downloadthis::download_this("District Data" = district_table_clean)

reactable(
  district_table,
  columns = list(
    district = colDef(name = "District"),
    pov_100_estimate = colDef(name = "#", format = colFormat(separators = TRUE, digits = 0)),
    pov_100_percent = colDef(name = "%", format = colFormat(percent = TRUE, digits = 1)),
    pov_200_estimate = colDef(name = "#", format = colFormat(separators = TRUE, digits = 0)),
    pov_200_percent = colDef(name = "%", format = colFormat(percent = TRUE, digits = 1)),
    pov_300_estimate = colDef(name = "#", format = colFormat(separators = TRUE, digits = 0)),
    pov_300_percent = colDef(name = "%", format = colFormat(percent = TRUE, digits = 1)),
    pov_400_estimate = colDef(name = "#", format = colFormat(separators = TRUE, digits = 0)),
    pov_400_percent = colDef(name = "%", format = colFormat(percent = TRUE, digits = 1))),
  columnGroups = list(
    colGroup(name = "100% FPL", columns = c("pov_100_estimate", "pov_100_percent")),
    colGroup(name = "200% FPL", columns = c("pov_200_estimate", "pov_200_percent")),
    colGroup(name = "300% FPL", columns = c("pov_300_estimate", "pov_300_percent")),
    colGroup(name = "400% FPL", columns = c("pov_400_estimate", "pov_400_percent"))),
  striped = TRUE,
  theme = reactableTheme(
    stripedColor = "#f6f8fa"
  ),
  showPageSizeOptions = TRUE,
  pageSizeOptions = c(10, 13, 26))

Council District Maps

These maps show the percent of children age 0-5 living in households under various poverty thresholds by Metro Council District.

100

dist_df <- district_modeled %>% 
  filter(var_type == "percent") %>%
  mutate(across(pov_100:pov_400, ~ . / 100))

dist_map <- map_district %>%
  left_join(dist_df)
  
dist_labels <- district_label_points %>%
  mutate(
    x = unname(st_coordinates(.)[,1]),
    y = unname(st_coordinates(.)[,2]))

ggplot(dist_map) + 
  geom_sf(aes(fill = pov_100), lwd = 0.5, color = "#AAAAAA") +
  viridis::scale_fill_viridis(labels = scales::percent, limits = c(0, 1)) +
  theme_void() +
  theme(
    plot.title = element_text(size = 54, hjust = 0.5),
    plot.subtitle = element_text(size = 36, hjust = 0.5),
    legend.title = element_blank(),
    legend.text = element_text(size = 36),
    plot.caption = element_text(size = 28, lineheight = 0.6, margin = margin(t = 24)),

    legend.key.size = unit(2, 'cm')) +
  theme(
    plot.caption = element_text(size = 28, lineheight = 0.6)) +
  labs(
    title = "Percent of Children Age 0-5\nUnder 100% FPL",
    caption = "Data from 2022 5-Year American Community Survey Table B17024") +
  shadowtext::geom_shadowtext(data = dist_labels,
                              aes(x = x, y=y, label = district),
                              size = 8,
                              color = "white", bg.color="black")

200

ggplot(dist_map) + 
  geom_sf(aes(fill = pov_200), lwd = 0.5, color = "#AAAAAA") +
  viridis::scale_fill_viridis(labels = scales::percent, limits = c(0, 1)) +
  theme_void() +
  theme(
    plot.title = element_text(size = 54, hjust = 0.5),
    plot.subtitle = element_text(size = 36, hjust = 0.5),
    legend.title = element_blank(),
    legend.text = element_text(size = 36),
    plot.caption = element_text(size = 28, lineheight = 0.6, margin = margin(t = 24)),

    legend.key.size = unit(2, 'cm')) +
  theme(
    plot.caption = element_text(size = 28, lineheight = 0.6)) +
  labs(
    title = "Percent of Children Age 0-5\nUnder 200% FPL",
    caption = "Data from 2022 5-Year American Community Survey Table B17024") +
  shadowtext::geom_shadowtext(data = dist_labels,
                              aes(x = x, y=y, label = district),
                              size = 8,
                              color = "white", bg.color="black")

300

ggplot(dist_map) + 
  geom_sf(aes(fill = pov_300), lwd = 0.5, color = "#AAAAAA") +
  viridis::scale_fill_viridis(labels = scales::percent, limits = c(0, 1)) +
  theme_void() +
  theme(
    plot.title = element_text(size = 54, hjust = 0.5),
    plot.subtitle = element_text(size = 36, hjust = 0.5),
    legend.title = element_blank(),
    legend.text = element_text(size = 36),
    plot.caption = element_text(size = 28, lineheight = 0.6, margin = margin(t = 24)),

    legend.key.size = unit(2, 'cm')) +
  theme(
    plot.caption = element_text(size = 28, lineheight = 0.6)) +
  labs(
    title = "Percent of Children Age 0-5\nUnder 300% FPL",
    caption = "Data from 2022 5-Year American Community Survey Table B17024") +
  shadowtext::geom_shadowtext(data = dist_labels,
                              aes(x = x, y=y, label = district),
                              size = 8,
                              color = "white", bg.color="black")

400

ggplot(dist_map) + 
  geom_sf(aes(fill = pov_400), lwd = 0.5, color = "#AAAAAA") +
  viridis::scale_fill_viridis(labels = scales::percent, limits = c(0, 1)) +
  theme_void() +
  theme(
    plot.title = element_text(size = 54, hjust = 0.5),
    plot.subtitle = element_text(size = 36, hjust = 0.5),
    legend.title = element_blank(),
    legend.text = element_text(size = 36),
    plot.caption = element_text(size = 28, lineheight = 0.6, margin = margin(t = 24)),

    legend.key.size = unit(2, 'cm')) +
  theme(
    plot.caption = element_text(size = 28, lineheight = 0.6)) +
  labs(
    title = "Percent of Children Age 0-5\nUnder 400% FPL",
    caption = "Data from 2022 5-Year American Community Survey Table B17024") +
  shadowtext::geom_shadowtext(data = dist_labels,
                              aes(x = x, y=y, label = district),
                              size = 8,
                              color = "white", bg.color="black")

Council District Charts

These charts show the percent and the number of children age 0-5 living in households under various poverty thresholds. Because Census data come from a survey, there is a margin of error associated with the numbers. The error bars on this chart show a 90% confidence interval–in other words, we’re 90% confident the actual number is within the confidence interval.

100

Percent

pov_100_df <- district_modeled %>%
  select(district, var_type, pov_100) %>%
  pivot_vartype_wider(pov_100)

ggplot(pov_100_df,
       aes(x = district, y = percent, fill = percent)) +
  geom_bar(stat = "identity") +
  viridis::scale_fill_viridis(limits = c(0, 100), guide= FALSE) +
  geom_errorbar(aes(ymin = percent - CI, ymax = percent + CI)) +
  scale_x_continuous(labels = as.character(pov_100_df$district), breaks = pov_100_df$district, expand = c(0.01, 0.01)) +
  scale_y_continuous(limits = c(0, 100), expand = c(0, 0)) +
  theme_classic() + 
  xlab("Metro Council District") + 
  ylab("Percent") + 
  labs(title = "Percent of Children Age 0-5\nunder 100% FPL",
       caption = "Data from 2022 5-Year American Community Survey Table B17024") + 
  theme(legend.title = element_blank(),
        legend.position = "top") +
  theme(
    plot.title = element_text(size = 54, hjust = 0.5),
    plot.subtitle = element_text(size = 36, hjust = 0.5),
    plot.caption = element_text(size = 28, lineheight = 0.6, margin = margin(t = 24)),
    axis.title.x = element_text(size = 36, hjust = 0.5),
    axis.title.y = element_blank(),
    axis.text = element_text(size = 28),
    panel.grid.major.y = element_line(color = "#EEEEEE")) +
  theme(
    plot.caption = element_text(size = 28, lineheight = 0.6))

Estimate

ggplot(pov_100_df,
       aes(x = district, y = estimate, fill = estimate)) +
  geom_bar(stat = "identity") +
  viridis::scale_fill_viridis(guide= FALSE) +
  geom_errorbar(aes(ymin = estimate - MOE, ymax = estimate + MOE)) +
  scale_x_continuous(labels = as.character(pov_100_df$district), breaks = pov_100_df$district, expand = c(0.01, 0.01)) +
  scale_y_continuous( expand = c(0, 0)) +
  theme_classic() + 
  xlab("Metro Council District") + 
  ylab("Percent") + 
  labs(title = "Number of Children Age 0-5\nunder 100% FPL",
       caption = "Data from 2022 5-Year American Community Survey Table B17024") + 
  theme(legend.title = element_blank(),
        legend.position = "top") +
  theme(
    plot.title = element_text(size = 54, hjust = 0.5),
    plot.subtitle = element_text(size = 36, hjust = 0.5),
    plot.caption = element_text(size = 28, lineheight = 0.6, margin = margin(t = 24)),
    axis.title.x = element_text(size = 36, hjust = 0.5),
    axis.title.y = element_blank(),
    axis.text = element_text(size = 28),
    panel.grid.major.y = element_line(color = "#EEEEEE")) +
  theme(
    plot.caption = element_text(size = 28, lineheight = 0.6))

200

Percent

pov_200_df <- district_modeled %>%
  select(district, var_type, pov_200) %>%
  pivot_vartype_wider(pov_200)

ggplot(pov_200_df,
       aes(x = district, y = percent, fill = percent)) +
  geom_bar(stat = "identity") +
  viridis::scale_fill_viridis(limits = c(0, 100), guide= FALSE) +
  geom_errorbar(aes(ymin = percent - CI, 
                    ymax = if_else(percent + CI>100, 100, percent + CI))) +
  scale_x_continuous(labels = as.character(pov_200_df$district), breaks = pov_200_df$district, expand = c(0.01, 0.01)) +
  scale_y_continuous(limits = c(0, 100), expand = c(0, 0)) +
  theme_classic() + 
  xlab("Metro Council District") + 
  ylab("Percent") + 
  labs(title = "Percent of Children Age 0-5\nunder 200% FPL",
       caption = "Data from 2022 5-Year American Community Survey Table B17024") + 
  theme(legend.title = element_blank(),
        legend.position = "top") +
  theme(
    plot.title = element_text(size = 54, hjust = 0.5),
    plot.subtitle = element_text(size = 36, hjust = 0.5),
    plot.caption = element_text(size = 28, lineheight = 0.6, margin = margin(t = 24)),
    axis.title.x = element_text(size = 36, hjust = 0.5),
    axis.title.y = element_blank(),
    axis.text = element_text(size = 28),
    panel.grid.major.y = element_line(color = "#EEEEEE")) +
  theme(
    plot.caption = element_text(size = 28, lineheight = 0.6))

Estimate

ggplot(pov_200_df,
       aes(x = district, y = estimate, fill = estimate)) +
  geom_bar(stat = "identity") +
  viridis::scale_fill_viridis(guide= FALSE) +
  geom_errorbar(aes(ymin = estimate - MOE, ymax = estimate + MOE)) +
  scale_x_continuous(labels = as.character(pov_200_df$district), breaks = pov_200_df$district, expand = c(0.01, 0.01)) +
  scale_y_continuous( expand = c(0, 0)) +
  theme_classic() + 
  xlab("Metro Council District") + 
  ylab("Percent") + 
  labs(title = "Number of Children Age 0-5\nunder 200% FPL",
       caption = "Data from 2022 5-Year American Community Survey Table B17024") + 
  theme(legend.title = element_blank(),
        legend.position = "top") +
  theme(
    plot.title = element_text(size = 54, hjust = 0.5),
    plot.subtitle = element_text(size = 36, hjust = 0.5),
    plot.caption = element_text(size = 28, lineheight = 0.6, margin = margin(t = 24)),
    axis.title.x = element_text(size = 36, hjust = 0.5),
    axis.title.y = element_blank(),
    axis.text = element_text(size = 28),
    panel.grid.major.y = element_line(color = "#EEEEEE")) +
  theme(
    plot.caption = element_text(size = 28, lineheight = 0.6))

300

Percent

pov_300_df <- district_modeled %>%
  select(district, var_type, pov_300) %>%
  pivot_vartype_wider(pov_300)

ggplot(pov_300_df,
       aes(x = district, y = percent, fill = percent)) +
  geom_bar(stat = "identity") +
  viridis::scale_fill_viridis(limits = c(0, 100), guide= FALSE) +
  geom_errorbar(aes(ymin = percent - CI, 
                    ymax = if_else(percent + CI>100, 100, percent + CI))) +
  scale_x_continuous(labels = as.character(pov_300_df$district), breaks = pov_300_df$district, expand = c(0.01, 0.01)) +
  scale_y_continuous(limits = c(0, 100), expand = c(0, 0)) +
  theme_classic() + 
  xlab("Metro Council District") + 
  ylab("Percent") + 
  labs(title = "Percent of Children Age 0-5\nunder 300% FPL",
       caption = "Data from 2022 5-Year American Community Survey Table B17024") + 
  theme(legend.title = element_blank(),
        legend.position = "top") +
  theme(
    plot.title = element_text(size = 54, hjust = 0.5),
    plot.subtitle = element_text(size = 36, hjust = 0.5),
    plot.caption = element_text(size = 28, lineheight = 0.6, margin = margin(t = 24)),
    axis.title.x = element_text(size = 36, hjust = 0.5),
    axis.title.y = element_blank(),
    axis.text = element_text(size = 28),
    panel.grid.major.y = element_line(color = "#EEEEEE")) +
  theme(
    plot.caption = element_text(size = 28, lineheight = 0.6))

Estimate

ggplot(pov_300_df,
       aes(x = district, y = estimate, fill = estimate)) +
  geom_bar(stat = "identity") +
  viridis::scale_fill_viridis(guide= FALSE) +
  geom_errorbar(aes(ymin = estimate - MOE, ymax = estimate + MOE)) +
  scale_x_continuous(labels = as.character(pov_300_df$district), breaks = pov_300_df$district, expand = c(0.01, 0.01)) +
  scale_y_continuous( expand = c(0, 0)) +
  theme_classic() + 
  xlab("Metro Council District") + 
  ylab("Percent") + 
  labs(title = "Number of Children Age 0-5\nunder 300% FPL",
       caption = "Data from 2022 5-Year American Community Survey Table B17024") + 
  theme(legend.title = element_blank(),
        legend.position = "top") +
  theme(
    plot.title = element_text(size = 54, hjust = 0.5),
    plot.subtitle = element_text(size = 36, hjust = 0.5),
    plot.caption = element_text(size = 28, lineheight = 0.6, margin = margin(t = 24)),
    axis.title.x = element_text(size = 36, hjust = 0.5),
    axis.title.y = element_blank(),
    axis.text = element_text(size = 28),
    panel.grid.major.y = element_line(color = "#EEEEEE")) +
  theme(
    plot.caption = element_text(size = 28, lineheight = 0.6))

400

Percent

pov_400_df <- district_modeled %>%
  select(district, var_type, pov_400) %>%
  pivot_vartype_wider(pov_400)

ggplot(pov_400_df,
       aes(x = district, y = percent, fill = percent)) +
  geom_bar(stat = "identity") +
  viridis::scale_fill_viridis(limits = c(0, 100), guide= FALSE) +
  geom_errorbar(aes(ymin = percent - CI, 
                    ymax = if_else(percent + CI>100, 100, percent + CI))) +
  scale_x_continuous(labels = as.character(pov_400_df$district), breaks = pov_400_df$district, expand = c(0.01, 0.01)) +
  scale_y_continuous(limits = c(0, 100), expand = c(0, 0)) +
  theme_classic() + 
  xlab("Metro Council District") + 
  ylab("Percent") + 
  labs(title = "Percent of Children Age 0-5\nunder 400% FPL",
       caption = "Data from 2022 5-Year American Community Survey Table B17024") + 
  theme(legend.title = element_blank(),
        legend.position = "top") +
  theme(
    plot.title = element_text(size = 54, hjust = 0.5),
    plot.subtitle = element_text(size = 36, hjust = 0.5),
    plot.caption = element_text(size = 28, lineheight = 0.6, margin = margin(t = 24)),
    axis.title.x = element_text(size = 36, hjust = 0.5),
    axis.title.y = element_blank(),
    axis.text = element_text(size = 28),
    panel.grid.major.y = element_line(color = "#EEEEEE")) +
  theme(
    plot.caption = element_text(size = 28, lineheight = 0.6))

Estimate

ggplot(pov_400_df,
       aes(x = district, y = estimate, fill = estimate)) +
  geom_bar(stat = "identity") +
  viridis::scale_fill_viridis(guide= FALSE) +
  geom_errorbar(aes(ymin = estimate - MOE, ymax = estimate + MOE)) +
  scale_x_continuous(labels = as.character(pov_400_df$district), breaks = pov_400_df$district, expand = c(0.01, 0.01)) +
  scale_y_continuous( expand = c(0, 0)) +
  theme_classic() + 
  xlab("Metro Council District") + 
  ylab("Percent") + 
  labs(title = "Percent of Children Age 0-5\nunder 400% FPL",
       caption = "Data from 2022 5-Year American Community Survey Table B17024") + 
  theme(legend.title = element_blank(),
        legend.position = "top") +
  theme(
    plot.title = element_text(size = 54, hjust = 0.5),
    plot.subtitle = element_text(size = 36, hjust = 0.5),
    plot.caption = element_text(size = 28, lineheight = 0.6, margin = margin(t = 24)),
    axis.title.x = element_text(size = 36, hjust = 0.5),
    axis.title.y = element_blank(),
    axis.text = element_text(size = 28),
    panel.grid.major.y = element_line(color = "#EEEEEE")) +
  theme(
    plot.caption = element_text(size = 28, lineheight = 0.6))