Skip to content

Instantly share code, notes, and snippets.

View elipousson's full-sized avatar

Eli Pousson elipousson

View GitHub Profile
library(d2r)
one_many <- c(
"Agency -> Service",
"Service -> Cost Center",
"Fund -> Cost Center",
"Award -> Grant",
"Revenue Category -> Budget Plan"
)
library(arcgislayers)
library(ggplot2)
county_vac <- arc_read(
"https://services.arcgis.com/njFNhDsUCentVYJW/arcgis/rest/services/MD_COVID19_VaccinationByCounty/FeatureServer/0"
)
county_vac |>
ggplot() +
geom_sf(
library(arcgislayers)
layer <- arc_open(
"https://geodata.md.gov/imap/rest/services/PlanningCadastre/MD_ComputerAssistedMassAppraisal/MapServer/1"
)
bldg_layer <- arc_open(
"https://geodata.md.gov/imap/rest/services/PlanningCadastre/MD_ComputerAssistedMassAppraisal/MapServer/0"
)
library(sharepointr)
drive <- get_sp_drive("<document library url>")
drive_files <- sp_dir_info(
drive = drive
)
drive_file_paths <- str_remove(drive_files[drive_files$isdir,]$name, "^/")
library(tidyverse)
library(gt)
library(sharepointr)
# url <- "https://<tenant>.sharepoint.com/:f:/r/sites/<site name>/<document library>/<path>"
file_list <- sp_dir_info(
url,
info = "all",
recurse = TRUE
@elipousson
elipousson / minixcali-d2r.R
Created April 4, 2024 02:55
Example script for converting an excalidraw diagram to a d2 diagram
library(dplyr)
library(rlang)
library(purrr)
# library(d2r)
library(minixcali)
path <- "Untitled-2024-03-28-1327.excalidraw"
file <- xkd_read(path, simplifyVector = TRUE)
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix terms: <http://sample-site/politicalgeography/vocabularies/terms#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix sharepoint-taxonomy: <http://aka.ms/sp-taxonomy-syntax/> .
<http://sample-site/politicalgeography/vocabularies/terms> a owl:Ontology .
terms:politicalgeography a sharepoint-taxonomy:TermSet;
sharepoint-taxonomy:description "A sample term set, describing a simple political geography."@en-us;
sharepoint-taxonomy:termSetName "Political Geography"@en-us;
library(marylandedu)
library(baltimoreplanning)
library(bcpss)
library(ggplot2)
program_enrollment <- get_md_enrollment(
c(164, 159),
grade_range = "All Grades",
race = "All")
---
format: typst
---
```{r}
library(tinytable)
x <- mtcars[1:4, 1:5]
```
```{r}
vague_dt_interval <- function(start,
end = NULL,
use_now = TRUE,
unit = "second",
format = c("default", "short", "terse")) {
if (!is.interval(start)) {
if (use_now) {
end <- end %||% lubridate::now()
}