I hereby claim:
- I am andrewbtran on github.
- I am trana (https://keybase.io/trana) on keybase.
- I have a public key ASAMUjcvhuYo-gflVNYHlsAzAXhR8uH3Ge2NvwOjh7TDMAo
To claim this, I am signing this object:
# code from https://github.com/gkaramanis/aRtist/blob/main/genuary/2021/2021-3/2021-3.R | |
library(ggplot2) | |
library(dplyr) | |
library(magick) | |
library(ggridges) | |
# Read in image and convert to grayscale | |
img <- image_read(here::here("MRlWzfMH_400x400.jpg")) %>% | |
image_convert(colorspace = "gray") |
--- | |
title: "Coronavirus racial disparities" | |
author: "Andrew Ba Tran and Reis Thebault" | |
date: "4/7/2020" | |
output: | |
html_document: | |
code_folding: hide | |
--- | |
Counties where Black residents are the majority have three times the rate of median cases of coronavirus cases and have almost four times the average rate of deaths of counties. |
# This function checks if you don't have the correct packages installed yet | |
# If not, it will install it for you | |
packages <- c("tidyverse", "jsonlite", "data.table", "formattable", "scales", "knitr") | |
if (length(setdiff(packages, rownames(installed.packages()))) > 0) { | |
install.packages(setdiff(packages, rownames(installed.packages())), repos = "http://cran.us.r-project.org") | |
} | |
# packages necessary | |
library(tidyverse) | |
library(jsonlite) |
I hereby claim:
To claim this, I am signing this object:
# Load libraries | |
library(dplyr) | |
library(rvest) | |
devtools::install_github("abresler/markovifyR") | |
library(markovifyR) | |
# The url for the 2019 predictions | |
year2019 <- "https://www.niemanlab.org/collection/predictions-2019" |
library(tidyverse) | |
library(googlesheets) | |
# Authorize user on Google | |
gs_auth(new_user = TRUE) | |
# Naming the sheet | |
name_of_googlesheet <- "Testing out gsiterator" | |
# Test array |
library(tidyverse) | |
responses <- read_csv("https://docs.google.com/spreadsheets/d/e/2PACX-1vT7yj6UE0S08spLamewjnZH1vbOCqobyRSEao5I535XvgO9VeM_fwe-P84_9oiPAuQsfd5rYyncNuax/pub?output=csv") | |
week3 <- data.frame(c("Theon Greyjoy", | |
"Melisandre", | |
"Jorah Mormont", | |
"Edd Tollett", | |
"Lyanna Mormont", | |
"Beric Dondarrion (can select multiple eps for death) |
library(tidyverse) | |
library(rvest) | |
page <- xml2::read_html("https://extapps2.oge.gov/201/Presiden.nsf/PAS%20Filings%20by%20Date?OpenView") | |
tbl <- html_table(page)[[1]] | |
tbl <- as_tibble(tbl) | |
names(tbl) <- c("date", "report", "name", "department", "position") | |
tbl |
# File # 1 | |
# https://drive.google.com/open?id=1Lhz23JP4gRW4p_01D7OzaL60CT1wfem- | |
# File # 2 | |
# https://drive.google.com/open?id=1XOWD8COTdDx30HNLZgrp57WzWUGOtaKA | |
# NOTE: To load data, you must download both the extract's data and the DDI | |
# and also set the working directory to the folder with these files (or change the path below). | |
#install.packages("tidyverse") |
library(jsonlite) | |
library(tidyr) | |
schools_list <- fromJSON("http://neworleansequityindex.org/jsoncache/schools.json") | |
schools_list <- schools_list$data | |
# for loop | |
# for i in 1 through number of rows of the dataframe schools_list |