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(lubridate) | |
library(zoo) | |
library(scales) | |
# Read Data --------------------------------------------------------------- | |
confirmed <- read_csv("https://github.com/nytimes/covid-19-data/raw/master/us-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) | |
library(jsonlite) | |
df <- "https://api.inc.com/rest/i5list/2021" %>% | |
fromJSON() %>% | |
.$companies %>% | |
bind_rows() %>% | |
unnest(article) %>% | |
select(-editorsPick) %>% | |
write_csv("inc.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
name,registered_voters_2020,registered_voters_2016 | |
Aitkin,"10,840","10,090" | |
Anoka,"228,495","206,600" | |
Becker,"21,396","18,829" | |
Beltrami,"27,518","24,213" | |
Benton,"24,688","22,106" | |
Big Stone,"3,212","3,090" | |
Blue Earth,"39,978","36,184" | |
Brown,"16,209","15,052" | |
Carlton,"22,253","20,424" |
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(pdftools) | |
week <- 42 | |
mn_counties <- c("Aitkin","Anoka","Becker","Beltrami","Benton","Big Stone","Blue Earth","Brown","Carlton","Carver","Cass","Chippewa","Chisago","Clay","Clearwater","Cook","Cottonwood","Crow Wing","Dakota","Dodge","Douglas","Faribault","Fillmore","Freeborn","Goodhue","Grant","Hennepin","Houston","Hubbard","Isanti","Itasca","Jackson","Kanabec","Kandiyohi","Kittson","Koochiching","Lac qui Parle","Lake","Lake of the Woods","Le Sueur","Lincoln","Lyon","McLeod","Mahnomen","Marshall","Martin","Meeker","Mille Lacs","Morrison","Mower","Murray","Nicollet","Nobles","Norman","Olmsted","Otter Tail","Pennington","Pine","Pipestone","Polk","Pope","Ramsey","Red Lake","Redwood","Renville","Rice","Rock","Roseau","Saint Louis","Scott","Sherburne","Sibley","Stearns","Steele","Stevens","Swift","Todd","Traverse","Wabasha","Wadena","Waseca","Washington","Watonwan","Wilkin","Winona","Wright","Yellow Medicine","Unknown/missing") | |
location <- paste0("https://www.health.state.mn.us/diseases/ |
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
// Twilio Credentials | |
const accountSid = "accountSid"; | |
const authToken = "authToken"; | |
//require the Twilio module and create a REST client | |
const client = require("twilio")(accountSid, authToken); | |
//END Twilio | |
const fetch = require("node-fetch"); | |
setInterval(() => { | |
check_if_available(); |
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
<?php | |
define('DB_NAME', 'zip'); | |
/** MySQL database username */ | |
define('DB_USER', '*****'); | |
/** MySQL database password */ | |
define('DB_PASSWORD', '*****'); | |
/** MySQL hostname */ |
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
#Connect to this using websockets on port 9454 | |
#Send in the format of {"data":[1,2,3]} | |
#The ppp returns the standard deviation of the sent array | |
library(jsonlite) | |
library(httpuv) | |
#server | |
app <- list( | |
onWSOpen = function(ws) { | |
ws$onMessage(function(binary, message) { | |
write(message, file = "log.txt",append = TRUE, sep = "\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(tidycensus) | |
library(tidyverse) | |
library(viridisLite) | |
library(gganimate) | |
library(patchwork) | |
us_county_population <- get_estimates(geography = "county", | |
product = "population", | |
shift_geo = TRUE, geometry = TRUE, | |
year = 2018) %>% |
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(lubridate) | |
library(ggthemes) | |
library(forecast) | |
library(xts) | |
library(timetk) | |
future <- 7 | |
confirmed <- read_csv("https://github.com/CSSEGISandData/COVID-19/raw/master/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Confirmed.csv") | |
South_Korea <- list() |