This file contains hidden or 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(tidycensus) | |
| library(ggplot2) | |
| library(dplyr) | |
| acs_pop <- get_acs( | |
| geography = "block group", | |
| variables = "B01003_001", | |
| state = "MA", | |
| year = 2019, |
This file contains hidden or 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(sf) | |
| library(progressr) | |
| handlers("progress") | |
| Washington <- tmaptools::geocode_OSM("Mount Washington") | |
| Washington <- Washington$coords | |
| Washington <- data.frame( | |
| lat = Washington[["y"]], | |
| lng = Washington[["x"]] |
This file contains hidden or 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(raster) | |
| library(sf) | |
| library(ggplot2) | |
| library(scico) | |
| Marcy <- tmaptools::geocode_OSM("Mount Marcy") | |
| Marcy <- st_as_sf(as.data.frame(t(as.data.frame(Marcy$coords))), coords = c("x", "y"), crs = 4326) | |
| site_bbox <- set_bbox_side_length(Marcy, 10, "km") |
This file contains hidden or 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(raster) | |
| library(rayshader) | |
| library(terrainr) | |
| library(sf) | |
| Rainier <- tmaptools::geocode_OSM("Mount Rainier") | |
| Rainier <- st_as_sf(as.data.frame(t(as.data.frame(Rainier$coords))), coords = c("x", "y"), crs = 4326) | |
| zscale <- 5 | |
| Rainier <- set_bbox_side_length( | |
| Rainier, |
This file contains hidden or 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(lidR) | |
| library(raster) | |
| library(rayshader) | |
| # Set the color scale | |
| color_pal <- function(n = 255, bias = 1) { | |
| pal <- colorRampPalette( | |
| RColorBrewer::brewer.pal(9, "Greens"), | |
| bias = bias | |
| ) |
This file contains hidden or 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() | |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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") |