I hereby claim:
- I am juliasilge on github.
- I am juliasilge (https://keybase.io/juliasilge) on keybase.
- I have a public key ASDmuxcJrM55BGKWGxCENIRSHvzgkeXqhw61aiiVwcqMPQo
To claim this, I am signing this object:
purrr::map_df(2009:2014, function(i) { | |
api_info <- jsonlite::fromJSON(sprintf("http://api.census.gov/data/%s/acs5/", i)) | |
api_info$dataset[, c("title", "c_unavailableMessage")] | |
}) |
--- | |
title: "Fatal Police Shootings in the U.S." | |
output: | |
flexdashboard::flex_dashboard: | |
theme: flatly | |
social: menu | |
orientation: columns | |
vertical_layout: fill | |
--- |
library(dplyr) | |
library(tidyr) | |
library(ggplot2) | |
library(gridExtra) | |
df = data_frame(a = rnorm(100, mean=1), b=rnorm(100, mean=2), c=rnorm(100, mean=0)) %>% | |
gather("var", "value", a,b,c) | |
ggplot(df, aes(x=value)) + | |
geom_density(fill="black", col="white", lwd=1) + |
simple_roc <- function(labels, scores){ | |
labels <- labels[order(scores, decreasing=TRUE)] | |
data.frame(TPR=cumsum(labels)/sum(labels), FPR=cumsum(!labels)/sum(!labels), labels) | |
} |
library(ggplot2) | |
library(igraph) | |
library(ggraph) | |
library(scales) | |
library(ggforce) | |
network_theme <- theme_no_axes() + | |
theme(panel.border = element_blank()) | |
theme_set(network_theme) |
library(tidycensus) | |
library(tidyverse) | |
# If not set, un-comment below and install your Census API key (https://api.census.gov/data/key_signup.html) | |
# census_api_key("YOUR KEY HERE", install = TRUE) | |
get_acs(geography = "metropolitan statistical area/micropolitan statistical area", | |
variables = "DP03_0021PE", | |
summary_var = "B01003_001", | |
survey = "acs1", |
library(tm.plugin.webmining) | |
library(tidyverse) | |
library(tidytext) | |
company <- c("Microsoft", "Apple", "Google", "Amazon", "Facebook", | |
"Twitter", "IBM", "Yahoo", "Netflix") | |
symbol <- c("MSFT", "AAPL", "GOOG", "AMZN", "FB", "TWTR", "IBM", "YHOO", "NFLX") | |
download_articles <- function(symbol) { | |
WebCorpus(GoogleFinanceSource(paste0("NASDAQ:", symbol))) |
library(tidyverse) | |
library(scales) | |
theme_set(silgelib::theme_plex()) | |
library(geniusR) | |
library(tidytext) | |
albums <- tibble(artist = rep("The Beatles", 13), | |
album = c("Please Please Me", | |
"With the Beatles", | |
"A Hard Day's Night", |
## this analysis assumes a dataframe `post_views` with columns: | |
## PostId | |
## CreationDate | |
## Tag | |
## AnswerCount | |
## ViewCount | |
library(tidyverse) | |
post_views %>% |
I hereby claim:
To claim this, I am signing this object: