library(tidyverse)
x <- list(1, 2, 3)
y <- list(3, 3, 3)
z <- list(100, 200, 300)
j <- function(first, second, third) (first + third) * second
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(tidycensus) | |
library(tidyverse) | |
d21_in <- get_acs( | |
geography = "place", | |
variables = c("DP03_0024P"), | |
summary_var ="DP03_0018", | |
year = 2021, | |
survey="acs1") |
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
data ds1; | |
length id dob age 8.; | |
format dob mmddyy10.; | |
informat dob ANYDTDTE.; | |
input id dob age; | |
cards; | |
1 03292007 . | |
2 06262006 . | |
3 . 15 | |
4 . . |
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(tidycensus) | |
library(tidyverse) | |
library(geofacet) | |
lv19 <- load_variables(2019, "acs1") | |
d20 <- get_decennial( | |
"state", | |
variables=c("HU_Tot"="H1_001N", |
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
--- | |
title: "Untitled" | |
author: "Stephanie" | |
date: "5/25/2021" | |
output: html_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE) | |
``` |
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) | |
library(tidycensus) | |
nyc_counties <- c("005", "047", "061", "081", "085") | |
acsvars <- load_variables(2015, "acs5", cache=TRUE) | |
options(tigris_use_cache = TRUE) | |
nyc_tract <- get_acs(geography="tract", | |
variables=c("B16001_001", "B16001_066", "B16001_067", "B16001_068"), |
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) | |
library(survey) | |
library(srvyr) | |
data(api) | |
apisrs_mut <- apisrs %>% | |
as_tibble() %>% | |
mutate(stype_factor=parse_factor(as.character(stype), levels=c("E", "M", "H")), |
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
# https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-03-31/readme.md | |
library(tidyverse) | |
# Get the Data | |
brewing_materials <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-03-31/brewing_materials.csv') | |
beer_taxed <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-03-31/beer_taxed.csv') | |
brewer_size <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-03-31/brewer_size.csv') | |
beer_states <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-03-31/beer_states.csv') |
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) | |
set.seed(406) | |
N <- 2000 | |
library(rbenchmark) | |
benchmark( | |
"rowwise"={ | |
df <- tibble(x=runif(N), y=runif(N), z=runif(N)) |
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(tmaptools) | |
library(sf) | |
library(dplyr) | |
library(stringr) | |
library(tidycensus) | |
addresses <- c("3040 E Cornwallis Rd, Durham, NC") # This is RTI HQ | |
# Google geocodes lat/lon as 35.906156, -78.864160 |
NewerOlder