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(ggplot2) | |
library(nycflights13) | |
library(dplyr) | |
library(sf) | |
library(maps) | |
states <- st_as_sf(map("state", plot = FALSE, fill = TRUE)) | |
from <- nycflights13::flights %>% | |
count(origin, dest, carrier) %>% |
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(terrainr) | |
library(rayshader) | |
katahdin <- tmaptools::geocode_OSM("mt katahdin") | |
downloaded_tiles <- get_bbox(lat = katahdin$coords["y"], | |
lng = katahdin$coords["x"]) %>% | |
set_bbox_side_length(2000) %>% | |
get_tiles() | |
katahdin_raster <- raster::raster(downloaded_tiles[[1]]) |
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(ggplot2) | |
library(dplyr) | |
library(tigris) | |
library(tidycensus) | |
abbr <- state.abb[-c(2, 11)] | |
state_dat <- vector("list", length(abbr)) | |
names(state_dat) <- abbr | |
for (i in seq_len(length(state_dat))) { |
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(ggplot2) | |
library(dplyr) | |
library(tigris) | |
library(tidycensus) | |
abbr <- state.abb[-c(2, 11)] | |
pop2018 <- vector("list", length(abbr)) | |
names(pop2018) <- abbr | |
for (i in seq_len(length(pop2018))) { |
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(sf) | |
library(dplyr) | |
library(tidyr) | |
library(lubridate) | |
library(readr) | |
library(ggplot2) | |
library(tidycensus) | |
cases <- read_csv("https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_US.csv") %>% | |
pivot_longer(cols = matches("^\\d.*"), names_to = "Date", values_to = "cumulative") %>% |
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(terrainr) | |
library(magrittr) | |
downloaded_tiles <- get_bbox(lat = 44.050604, lng = -74.051024) %>% | |
set_bbox_side_length(8000) %>% | |
get_tiles(services = c("elevation", "ortho")) | |
merged_tiles <- lapply(downloaded_tiles, merge_rasters) | |
raster_to_raw_tiles(merged_tiles[[1]][[1]], "tahawus") |
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(terrainr) # remotes::install.github("mikemahoney218/terrainr") | |
library(raster) | |
library(ggplot2) | |
library(ggridges) | |
library(sf) | |
mt_washington <- tmaptools::geocode_OSM("mt washington") | |
mt_washington <- get_bbox(lat = mt_washington$bbox[c("ymin", "ymax")], | |
lng = mt_washington$bbox[c("xmin", "xmax")]) | |
mt_washington <- set_bbox_side_length(mt_washington, 16000) |
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
### Keybase proof | |
I hereby claim: | |
* I am mikemahoney218 on github. | |
* I am mikemahoney218 (https://keybase.io/mikemahoney218) on keybase. | |
* I have a public key ASDyJEgKGLyyXclb88Qi-XeXGWcUDnbDCG3AJdIsNNHkXgo | |
To claim this, I am signing this object: |
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(terrainr) # remotes::install.github("ropensci/terrainr") | |
library(sf) | |
library(ggplot2) | |
library(progressr) | |
handlers("progress") | |
simulated_data <- data.frame(id = seq(1, 100, 1), | |
lat = runif(100, 44.04905, 44.17609), | |
lng = runif(100, -74.01188, -73.83493)) |
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
from tqdm import trange | |
from big_sleep import Imagine | |
from os import listdir, remove, path | |
gatsby_files = listdir('gatsby') | |
for file in gatsby_files: | |
with open(f'./gatsby/{file}') as f: | |
text = f.readline() | |
OlderNewer