Created
August 7, 2017 16:20
-
-
Save hunterowens/e11801bd806fe76d7d84aad58f2fa7a3 to your computer and use it in GitHub Desktop.
Mapper of disjoint datasets
This file contains 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
library(tidyverse) | |
dot_data <- read_csv('./path/to/dot.csv') | |
311_data <- read_csv('./path/to/311.csv') | |
# Shared headers, based on dot list you gave me | |
headers <- c(Columns by SR # / CD # / Request Type / Address / Description / Submit Date / Closed Date / Current Status / Owner) | |
dot_data %>% | |
mutate(key = stringr::str_replace(key, "old_header", "new_header")) | |
## Repeat | |
# set the owner to dot | |
311_data %>% | |
mutate(key = stringr::str_replace(key, "old_header", "new_header")) | |
## Repeat | |
# set the owner to 311 | |
merged_data <- rbind(dot_data, 311_data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment