Skip to content

Instantly share code, notes, and snippets.

@leeolney3
Last active November 7, 2022 21:10
Show Gist options
  • Save leeolney3/d358c45f5212e71feb5aa6b3522d1ea4 to your computer and use it in GitHub Desktop.
Save leeolney3/d358c45f5212e71feb5aa6b3522d1ea4 to your computer and use it in GitHub Desktop.
2022 #30DayMapChallenge
# Libraries
library(tidyverse)
library(showtext)
showtext_opts(dpi = 300)
showtext_auto(enable = TRUE)
# Font
font_add_google("JetBrains Mono")
f1 = "JetBrains Mono"
# Data
harris_roads = tigris::roads(state="TX",county="Harris County")
# Plot
ggplot(harris_roads) +
geom_sf(size=.1, color="#FFFDE8") +
theme_void() +
theme(text=element_text(family=f1, color="#FFFDE8"),
legend.title=element_text(hjust=.5),
plot.title=element_text(hjust=.5),
plot.caption=element_text(size=7, hjust=.5),
plot.margin=margin(.5,.7,.3,.5, unit="cm"),
plot.background = element_rect(fill="#1D253B", color=NA)) +
labs(caption="#30DayMapChallenge Day 6 Network | Source: US Census Bureau via {tigris} R package",
title="Road Network in Harris County, TX")
ggsave("day6.png", height=6, width=7.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment