Browse Source

day 12

master
boB Rudis 5 years ago
parent
commit
79c16d3cc8
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 3
      2019-11-11-elevation.R
  2. 16
      2019-11-12-movement.R

3
2019-11-11-elevation.R

@ -86,7 +86,7 @@ ggplot() +
labs(
x = NULL, y = NULL,
title = "Mount Desert Island / Acadia National Park Elevation Contours",
caption = "Data source: {tigris}\nhttps://git.rud.is/hrbrmstr/y2019-30daymapchallenge • #30DayMapChallenge"
caption = "Data source: ArcGIS/<maine.gov>\nhttps://git.rud.is/hrbrmstr/y2019-30daymapchallenge • #30DayMapChallenge"
) +
theme_ipsum_es(grid="", plot_title_size = 24) +
theme(plot.background = element_rect(fill = "#3a4f5b", color = "#3a4f5b")) +
@ -94,6 +94,7 @@ ggplot() +
theme(legend.title = element_text(color = "white")) +
theme(legend.text = element_text(color = "white")) +
theme(plot.title = element_text(hjust = 0.5, color = "white")) +
theme(plot.caption = element_text(color = "white")) +
theme(legend.position = c(0.9, 0.275))

16
2019-11-12-movement.R

@ -47,7 +47,7 @@ select(cmap, fips, geometry) %>%
select(fips, lng = X, lat = Y) -> centers
count(me_start, start_county, wt=workers, sort=TRUE) %>%
mutate(lab = glue::glue("{gsub(' County', '', start_county)} Total Outflow: {scales::comma(n)}")) -> labs
mutate(lab = glue::glue("{gsub(' County', '', start_county)} Outflow: {scales::comma(n)}")) -> labs
left_join(
me_start, centers,
@ -61,8 +61,6 @@ left_join(
mutate(lab = factor(lab, levels = labs$lab)) %>%
glimpse() -> start
st_bbox(cmap)
ggplot() +
geom_sf(data = cmap, color = "#b2b2b277", size = 0.05, fill = "#3B454A") +
geom_curve(
@ -75,9 +73,15 @@ ggplot() +
) +
scale_color_distiller(
limits = range(start$workers), labels = scales::comma,
trans = "log10", palette = "Reds", direction = 1
trans = "log10", palette = "Reds", direction = 1, name = "Worker\nOutflow"
) +
coord_sf(datum = NA, ylim = c(-2500000.0, 1500000)) +
facet_wrap(~lab) +
labs(x = NULL, y = NULL) +
theme_ft_rc(grid="")
labs(
x = NULL, y = NULL,
title = "Oh The Places [Mainers] Will Go [For Work]!",
subtitle = "2011-2015 5-Year ACS commuting outflows from Maine counties to out-of-state counties, sorted from most worker outflow to least.",
caption = "Data source: <www.census.gov/data/tables/2015/demo/metro-micro/commuting-flows-2015.html>\nhttps://git.rud.is/hrbrmstr/y2019-30daymapchallenge • #30DayMapChallenge"
) +
theme_ft_rc(grid="", strip_text_family = font_es_bold, strip_text_size = 13) +
theme(strip.text = element_text(color = "white"))

Loading…
Cancel
Save