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
p { | |
line-height: 1.7; | |
} | |
p.caption { | |
color: #777; | |
margin-top: 10px; | |
} | |
code { | |
font-size: 60% | |
} |
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
#' @title A set of generic helpful functions | |
#' @description General purpose functions to make working in R easier. | |
#' @name utils | |
#' @import purrr | |
NULL | |
#' @rdname utils | |
#' @export | |
not_sfc <- function(x) !any(class(x) %in% 'sfc') |
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
require(magrittr) | |
require(dplyr) | |
require(tigris) | |
require(acs) | |
require(stringr) | |
require(tidyr) | |
require(acs) | |
interpMedian <- function(state, county, tracts, endyear = 2014, span = 5, | |
tableNumber = "B19001", round = TRUE){ |
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
# SETUP ------------------------------------------------------------------- | |
library(janitor) | |
library(fuzzyjoin) | |
library(operator.tools) | |
library(rvest) | |
library(glue) | |
library(googlesheets) | |
library(googledrive) | |
library(magrittr) |
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
# SETUP ------------------------------------------------------------------- | |
library(janitor) | |
library(fuzzyjoin) | |
library(operator.tools) | |
library(rvest) | |
library(glue) | |
library(googlesheets) | |
library(googledrive) |
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
# SETUP ---- | |
library(mapview) | |
library(tigris) | |
library(rvest) | |
library(sf) | |
library(tidyverse) | |
options(tigris_class = "sf") |
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
# SETUP ---- | |
library(tidyverse) | |
# LOAD DATA ---- | |
csv_url <- "https://data.kingcounty.gov/resource/es38-6nrz.csv" | |
agencies <- read_csv(csv_url) |
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
# Setup ---- | |
library(lubridate) | |
library(tidyverse) | |
# Create a ggplot theme | |
theme_min_timeline <- function(){ | |
theme_minimal() %+replace% | |
theme( | |
axis.ticks.x = element_line(size = .5), |
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
# Setup ---- | |
library(Ecdat) | |
library(janitor) | |
library(ggrepel) | |
library(rvest) | |
library(scales) | |
library(patchwork) | |
library(tidyverse) |
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
# Setup ---- | |
library(extrafont) | |
library(grDevices) | |
library(ggrepel) | |
library(patchwork) | |
library(placement) | |
library(rvest) | |
library(janitor) | |
library(sf) |
NewerOlder