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) | |
| #> Linking to GEOS 3.13.1, GDAL 3.11.4, PROJ 9.7.0; sf_use_s2() is TRUE | |
| library(dplyr) | |
| #> | |
| #> Attaching package: 'dplyr' | |
| #> The following objects are masked from 'package:stats': | |
| #> | |
| #> filter, lag | |
| #> The following objects are masked from 'package:base': | |
| #> |
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(bench) | |
| library(dplyr) | |
| library(arrow) | |
| library(polars) | |
| library(duckdb) | |
| # 1. Define Paths | |
| csv_path <- "C:/Users/Pukar.Bhandari/Downloads/REMM_Parcels_2023.csv" | |
| parquet_path <- "C:/Users/Pukar.Bhandari/Downloads/REMM_Parcels_2023.parquet" |
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(tidyverse) | |
| library(jsonlite) | |
| get_data_context <- function(df) { | |
| rows <- nrow(df) | |
| cols <- ncol(df) | |
| # 1. Detect Object Type(s) | |
| # Returns something like "sf, tbl_df, tbl, data.frame" | |
| obj_class_full <- class(df) |
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
| if (!require("rvest")) install.packages("rvest") | |
| if (!require("xml2")) install.packages("xml2") | |
| if (!require("httr2")) install.packages("httr2") | |
| library(rvest) | |
| library(xml2) | |
| library(httr2) | |
| # 1. Dynamic Download Path | |
| # Tries to find Windows User Profile first, falls back to generic HOME |
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(tidyverse) | |
| library(tidycensus) | |
| library(mapgl) | |
| library(spopt) | |
| library(sf) | |
| library(spdep) | |
| options(tigris_use_cache = TRUE) | |
| project_crs <- "EPSG:26912" # NAD83 / Utah North |
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
| # install.packages(c("sf", "arcgislayers", "xml2", "dplyr", "stringr", "purrr", "httr2")) | |
| library(sf) | |
| library(arcgislayers) | |
| library(xml2) | |
| library(dplyr) | |
| library(stringr) | |
| library(purrr) | |
| library(httr2) | |
| # Configuration |
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
| setwd("D:/GitHub/MAP-Housing-ATO-Calculator-Updated") | |
| library(fs) | |
| library(sf) | |
| library(arrow) | |
| library(here) | |
| library(purrr) | |
| library(jsonlite) | |
| here::here() |
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 (Original Colors, Dynamic Time) | |
| # Shows current time in each timezone, colors based on local time of day | |
| # Uses original hex palette: Blue (Midnight) -> White (Dawn/Dusk) -> Brown (Noon) | |
| library(mapgl) | |
| library(sf) | |
| library(dplyr) | |
| library(lubridate) | |
| # Get user's current timezone and time |
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
Show hidden characters
| { | |
| // General | |
| // Create a debug channel in the Output view. | |
| "todo-tree.general.debug": false, | |
| // Set to true to enable automatic updates when files in the workspace are created, changed or deleted. | |
| "todo-tree.general.enableFileWatcher": false, | |
| // Path to use when exporting the tree. Environment variables will be expanded, e.g `${HOME}` and the path is passed through strftime (see <https://github.com/samsonjs/strftime>). Set the extension to `.json` to export as a JSON record. | |
| "todo-tree.general.exportPath": "~/todo-tree-%Y%m%d-%H%M.txt", |
NewerOlder