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
| # Day 25: Hexagons - US Wind Energy Infrastructure | |
| # Multi-resolution H3 hexagonal aggregation of 76,000+ wind turbines | |
| # Aggregating total installed capacity (MW) per hexagon | |
| # Points fade in at high zoom for individual turbine exploration | |
| library(mapgl) | |
| library(h3o) | |
| library(sf) | |
| library(dplyr) | |
| library(readr) |
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
| # Day 26: Transport - US Electric Power Transmission Lines | |
| # Visualizing America's invisible highway: 700,000+ miles of power lines | |
| # Dynamic line widths by voltage class, glowing effect for the energy flow | |
| library(mapgl) | |
| library(sf) | |
| library(dplyr) | |
| # Load transmission lines from HIFLD (Homeland Infrastructure Foundation-Level Data) | |
| # This is a large dataset - we'll use direct URL for the GeoJSON |
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
| # Day 27: Boundaries - World Time Zones | |
| # Shows current time in each timezone | |
| library(mapgl) | |
| library(sf) | |
| library(dplyr) | |
| library(lubridate) | |
| # Get user's current timezone and time | |
| user_tz <- Sys.timezone() |
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
| # DuckDB Vector Tiles with mapgl Example | |
| # This script demonstrates how to serve vector tiles from DuckDB using ST_AsMVT() | |
| # and display them in a mapgl map using httpuv | |
| library(mapgl) | |
| library(duckdb) # Requires the latest DuckDB version (>= 1.4.0) | |
| library(httpuv) | |
| library(sf) | |
| library(duckspatial) | |
| library(tigris) |
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
| ``` r | |
| # Setup ------------------------------------------------------------------- | |
| library(tidyverse) | |
| library(reprex) | |
| library(tictoc) | |
| #> Warning: package 'tictoc' was built under R version 4.0.2 |
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
| # Setup ------------------------------------------------------------------- | |
| library(tidyverse) | |
| library(sf) | |
| library(elevatr) | |
| library(rgdal) | |
| library(raster) | |
| library(rasterVis) | |
| library(rayshader) |