Skip to content

Instantly share code, notes, and snippets.

View stupidpupil's full-sized avatar
💭
I may be slow to respond.

A Watkins stupidpupil

💭
I may be slow to respond.
View GitHub Profile
@stupidpupil
stupidpupil / terrain_50_vrt.R
Last active May 9, 2022 18:37
Generate a GDAL VRT for OS Terrain 50
library(magrittr)
library(tibble)
library(dplyr)
# https://api.os.uk/downloads/v1/products/Terrain50/downloads?area=GB&format=ASCII+Grid+and+GML+%28Grid%29&redirect
vrt_sources_from_paths <- function(source_paths){
sources_tibble <- tibble()
@stupidpupil
stupidpupil / r5r_and_h3.R
Last active June 11, 2022 14:40
R5R + H3 TTM
library(tidyverse)
my_h3s <- tibble(id = unlist(h3jsr::polyfill(WalesIshOTPGraph:::bounds(), 8))) %>%
rowwise() %>% mutate(
pnt = h3jsr::h3_to_point(id),
plygn = h3jsr::h3_to_polygon(id)
)
sf::st_geometry(my_h3s) <- my_h3s$pnt
@stupidpupil
stupidpupil / nhs_osm.md
Last active June 30, 2022 23:16
NHS OSM thoughts

What is the problem?

It is quite difficult to reliably identify:

  • NHS GP surgeries
  • Accident & Emergency Departments
  • Minor Injury Units

in UK OpenStreetMap data.

It would be useful to be able to identify these things for a) more clearly exposing the purpose of a site for general mapping or search purposes and b) producing travel time/accessibility analyses.

@stupidpupil
stupidpupil / products.json
Created February 8, 2023 18:04
Example products.json for Blood Test Finder
[
{
"biomarkers": [
"1022191000000100",
"994351000000103",
"1006191000000106",
"1005691000000109",
"1001371000000100",
"1003671000000109",
"1010611000000107",