Grilled Cheese

ExploreLog inSign up

dieghernan

@dieghernan.bsky.social

168 Following24 Followers

PostsRepliesMedia
@dieghernan.bsky.socialDec 4, 2026, 3:36 PM

Hey, map lovers! Now that the #30DayMapChallenge is over, sorry to rain on your parade, but never trust a map.

Want to know why? I put the same circles on twelve world maps. See what happens 👇

#rstats #rspatial #maps
dieghernan.github.io/202612_never...

dieghernan.github.ioNever trust a map | One WorldPut the same circles on twelve world maps and see what each projection does to them.
@dieghernan.bsky.socialDec 4, 2026, 3:36 PM

¡Buenas, amantes de los mapas! Ahora que ha terminado el #30DayMapChallenge, siento aguaros la fiesta, pero nunca os fiéis de un mapa.

¿Queréis saber por qué? Puse los mismos círculos en doce mapas del mundo. Mirad qué les pasa 👇

#rstats #rspatial #maps
dieghernan.github.io/202612_never...

dieghernan.github.ioNever trust a map | One WorldPut the same circles on twelve world maps and see what each projection does to them.
@drxeo.euNov 21, 2026, 11:54 AMReposted by @dieghernan.bsky.social

Thanks to the response to this #dataviz, I've added new options: zoom, filters by length and sinuosity, river search, distance rings in real length, and a new "fixed ends" mode (every river starts and ends at the same points).

Try it 👉 dominicroye.github.io/shapes-of-ri...

#rivers #maps #gis

@drxeo.euNov 15, 2026, 10:52 AMReposted by @dieghernan.bsky.social

When data meets art 🎨 . What if every river on Earth started at the same point? 💧

I took 1,294 rivers longer than 200 km, placed every source at the origin, and scaled each course to the same length. Different rivers, one shared silhouette.

#dataviz #rivers #rstats #30DayMapChallenge

Photo, no descriptionPhoto, no descriptionPhoto, no description
@dieghernan.bsky.socialNov 6, 2026, 8:11 PM

New {tidyterra} release on CRAN! 📦

✨ Improvements and bug fixes
🤖 Experimental AI chatbot on the pkgdown site

Huge thanks to @mdsumner.bsky.social for the contributions!

Give the chatbot a spin, ask it about {tidyterra}, and share your feedback!

dieghernan.github.io/tidyterra/

#rstats #rspatial

dieghernan.github.iotidyterra | methods from tidyverse packages and ggplot2 helpers for Spat* objectsProvides methods from tidyverse packages for SpatRaster and SpatVector objects created with terra, plus ggplot2 geoms and scales for plotting those objects. It is designed to let users manipulate spat...
@dieghernan.bsky.socialNov 5, 2026, 11:41 PM

From postal code points to polygons!

Can we estimate postal code boundaries using open data and R?

In my latest post, I explore Voronoi diagrams with {sf}, {giscoR} and {ggplot2}, using Slovenia as a case study.

#rstats #rspatial #maps

dieghernan.github.io/202611_posta...

dieghernan.github.ioPostal codes and tessellations | One WorldBuild Voronoi polygons with R, then estimate postal code areas in Slovenia using giscoR and sf, with checks and a discussion of the data limitations.
@dieghernan.bsky.socialNov 5, 2026, 11:41 PM

¡De puntos a polígonos postales!

ÂżPodemos estimar los lĂ­mites de los cĂłdigos postales con datos abiertos y R?

En mi nuevo post exploro los diagramas de Voronoi con {sf}, {giscoR} y {ggplot2}, usando Eslovenia como ejemplo.

#rstats #rspatial #maps

dieghernan.github.io/202611_posta...

dieghernan.github.ioPostal codes and tessellations | One WorldBuild Voronoi polygons with R, then estimate postal code areas in Slovenia using giscoR and sf, with checks and a discussion of the data limitations.
?Unknown authorOct 23, 2026, 10:00 PMReposted by @dieghernan.bsky.social

Do you know the interrupted Goode homolosine projection?

dieghernan.github.ioLet’s peel the worldWhat would happen if we peeled the Earth like an orange? The interrupted Goode homolosine projection gives us something close to that! This equal-area projection preserves relative areas while splitting the world map into lobes. Add a few shades of orange and our world is ready to peel. Let’s make it with **sf** , **giscoR** and **ggplot2**. First, we get the coastlines and draw the outline, following the cuts between the lobes. library(sf) library(ggplot2) library(giscoR) library(showtext) world <- gisco_get_coastal_lines(resolution = 10) goode_crs <- "+proj=igh" lat <- c(90:-90, rep(c(-90:0, 0:-90), 3), -90:90, 90:0, 0:90, 90) lon <- c( rep(180, 181), rep(c(80.01, 79.99, -19.99, -20.01, -99.99, -100.01), each = 91), rep(-180, 181), rep(c(-40.01, -39.99), each = 91), 180 ) outline <- st_sfc(st_polygon(list(cbind(lon, lat))), crs = 4326) |> st_transform(goode_crs) rectangle <- st_as_sfc(st_bbox(outline) * 1.1) mask <- st_difference(rectangle, outline) Next, we draw the meridians and parallels within each lobe so that they do not connect across the cuts. lobes <- list( c(-180, -40, 0, 90), c(-40, 180, 0, 90), c(-180, -100, -90, 0), c(-100, -20, -90, 0), c(-20, 80, -90, 0), c(80, 180, -90, 0) ) lines <- lapply(lobes, function(b) { west <- b[1] + 0.01 east <- b[2] - 0.01 south <- max(b[3], -89.99) north <- min(b[4], 89.99) meridians <- seq(-180, 180, 30) meridians <- meridians[meridians > west & meridians < east] parallels <- seq(-60, 60, 30) parallels <- parallels[parallels >= south & parallels <= north] c( lapply(meridians, function(x) { st_linestring(cbind(x, seq(south, north, length.out = 181))) }), lapply(parallels, function(y) { st_linestring(cbind(seq(west, east, length.out = 361), y)) }) ) }) grat <- st_sfc(do.call(c, lines), crs = 4326) |> st_transform(goode_crs) Finally, we add the orange palette. The mask hides anything outside the outline and keeps the edges of our peel tidy. font_add_google("Coiny", family = "coiny") showtext_auto() ggplot() + geom_sf(data = outline, fill = "#FFF0D9", colour = NA) + geom_sf( data = world, fill = "#F9B566", colour = "#B34D08", linewidth = 0.25 ) + geom_sf(data = grat, fill = NA, colour = "#E8A45B", linewidth = 0.25) + geom_sf(data = mask, fill = "#fcf1e7", colour = NA) + geom_sf(data = outline, fill = NA, colour = "#E87516", linewidth = 0.4) + coord_sf( crs = goode_crs, xlim = st_bbox(outline)[c("xmin", "xmax")], ylim = st_bbox(outline)[c("ymin", "ymax")], expand = FALSE, datum = NA ) + theme_void() + theme( text = element_text(family = "coiny"), plot.background = element_rect(fill = "#fcf1e7", colour = NA), plot.title = element_text( color = "#E87516", face = "bold", size = rel(1.5), margin = margin(b = 10) ), plot.margin = margin(10, 10, 10, 10), plot.caption = element_text( color = "#E87516", size = rel(0.75), margin = margin(t = 10) ) ) + labs( title = "Let's peel the world", caption = "Interrupted Goode homolosine projection" ) Open Heal the World by Michael Jackson on Spotify ## ReferencesPermalink to References * Panaïotis, T. (2026, September 29). Projections cartographiques : Le guide pour ne pas y laisser sa santé mentale. _Pyranhia_. Article * Wilke, C. O. (n.d.). _Interrupted Goode homolosine_. practicalgg. URL (Source for the outline and masking approach.)
?Unknown authorNov 28, 2026, 9:30 PMReposted by @dieghernan.bsky.social

Plugin for Leaflet.js

dieghernan.github.ioLeaflet-providersESP**Leaflet-providersESP** is a plugin for Leaflet that contains configurations for various tile layers provided by public agencies in Spain. ## DemoPermalink to Demo Full docs and examples are available at dieghernan.github.io/leaflet-prov…. This code generates a Leaflet map with a layer provided by Leaflet-providersESP. <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Minimal page | leaflet-providersESP</title> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <!-- Load Leaflet --> <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" /> <script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script> <!-- Install leaflet-providersESP --> <script src="https://cdn.jsdelivr.net/gh/dieghernan/leaflet-providersESP/dist/leaflet-providersESP.min.js"></script> <!-- Display map full page --> <style> html { height: 100%; } body { height: 100%; margin: 0; padding: 0; } #mapid { height: 100%; width: 100%; } </style> </head> <body> <!-- Create map --> <div id="mapid"></div> <!-- Puerta del Sol - IDErioja server --> <script> var mymap = L.map("mapid").setView([40.4166, -3.70384], 18); L.tileLayer.providerESP("IDErioja").addTo(mymap); </script> </body> </html> ## All providersPermalink to All providers Open the map in a full window Documentation
?Unknown authorNov 28, 2026, 9:31 PMReposted by @dieghernan.bsky.social

A compilation of celestial data files

dieghernan.github.ioCelestial dataThis project provides several datasets of celestial objects as of the J2000 epoch in GeoJSON and GeoPackage formats. The original files were provided by the d3-celestial plugin (Frohn 2015) under BSD 3-Clause. The datasets produced by this project consist of the same data provided by the d3-celestial plugin processed with the **R** package **sf** (Pebesma 2018) to ensure its validity: * The spatial data objects are bounded by \\([-180, -90, 180, 90]\\). * The coordinates represent J2000 celestial directions in degrees. EPSG:4326 is assigned for compatibility with GIS software. The angles are right ascension and declination. * All geometries are valid as per ST_IsValid (GEOS **3.9.3**). ## DistributionPermalink to Distribution These URLs serve the same minified GeoJSON file from the main branch. <!-- From GitHub --> https://raw.githubusercontent.com/dieghernan/celestial_data/main/data/mw.min.geojson <!-- From the website --> https://dieghernan.github.io/celestial_data/data/mw.min.geojson <!-- From jsDelivr --> https://cdn.jsdelivr.net/gh/dieghernan/celestial_data@main/data/mw.min.geojson ## DataPermalink to Data Data are provided in GeoJSON (`*.geojson`) and GeoPackage (`*.gpkg`) formats. Additionally, for GeoJSON files a minified version (`*.min.geojson`) is also provided. The data source can be found in the corresponding GitHub repo. List of files provided: * `asterisms.geojson` * `asterisms.gpkg` * `asterisms.min.geojson` * `constellations.borders.cn.geojson` * `constellations.borders.cn.gpkg` * `constellations.borders.cn.min.geojson` * `constellations.borders.geojson` * `constellations.borders.gpkg` * `constellations.borders.min.geojson` * `constellations.borders.min.min.geojson` * `constellations.bounds.cn.geojson` * `constellations.bounds.cn.gpkg` * `constellations.bounds.cn.min.geojson` * `constellations.bounds.geojson` * `constellations.bounds.gpkg` * `constellations.bounds.min.geojson` * `constellations.cn.csv` * `constellations.cn.geojson` * `constellations.cn.gpkg` * `constellations.cn.min.geojson` * `constellations.csv` * `constellations.geojson` * `constellations.gpkg` * `constellations.lines.cn.geojson` * `constellations.lines.cn.gpkg` * `constellations.lines.cn.min.geojson` * `constellations.lines.geojson` * `constellations.lines.gpkg` * `constellations.lines.min.geojson` * `constellations.min.geojson` * `dsonames.cn.csv` * `dsonames.csv` * `dsos.14.geojson` * `dsos.14.gpkg` * `dsos.14.min.geojson` * `dsos.20.geojson` * `dsos.20.gpkg` * `dsos.20.min.geojson` * `dsos.6.geojson` * `dsos.6.gpkg` * `dsos.6.min.geojson` * `dsos.bright.geojson` * `dsos.bright.gpkg` * `dsos.bright.min.geojson` * `lg.geojson` * `lg.gpkg` * `lg.min.geojson` * `messier.geojson` * `messier.gpkg` * `messier.min.geojson` * `mw.geojson` * `mw.gpkg` * `mw.min.geojson` * `starnames.cn.csv` * `starnames.csv` * `stars.14.geojson` * `stars.14.gpkg` * `stars.14.min.geojson` * `stars.6.geojson` * `stars.6.gpkg` * `stars.6.min.geojson` * `stars.8.geojson` * `stars.8.gpkg` * `stars.8.min.geojson` See additional details in the data description. ## CitationPermalink to Citation Please cite these datasets as: Frohn, O., & Hernangómez, D. (2023). Celestial Data [Data set]. doi.org/10.5281/zeno… A BibTeX entry: @misc{frohnhernangomez:2023, title = {Celestial Data}, author = {Olaf Frohn and Diego Hernangómez}, year = 2023, doi = {10.5281/zenodo.7561601}, url = {https://dieghernan.github.io/celestial_data/}, } ## ReferencesPermalink to References * Frohn, O. (2015). _d3-celestial_ [Computer software]. GitHub. github.com/ofrohn/d3-ce… * Pebesma, E. (2018). Simple features for R: Standardized support for spatial vector data. _The R Journal, 10_(1), 439–446. doi.org/10.32614/RJ-…
?Unknown authorNov 28, 2026, 9:31 PMReposted by @dieghernan.bsky.social

Estimated postal code areas from open data

dieghernan.github.ioPostal codes of Spain**Códigos postales de España** provides estimated postal code areas for Spain, built from open address data from CartoCiudad and administrative boundaries. Explore the results on interactive maps and download the data for use in **R** , **Python** or **QGIS**. ## BackgroundPermalink to Background Postal code polygons are useful for linking addresses and statistics to areas on a map. According to Goerlich (2022), the Correos polygons available through CartoCiudad stopped being offered for download in early 2017. This project explores a reproducible alternative based on open address data. An early reference is José Ignacio Sánchez’s 2020 article in NoSoloSIG, which describes how to estimate postal areas from CartoCiudad addresses using GIS tools. This project applies the approach developed in Francisco José Goerlich’s 2022 work, with its own choices for selecting addresses and handling areas without an assignment. ## Maps and dataPermalink to Maps and data The project website includes interactive maps and two GeoPackage downloads: a full version for spatial analysis and a simplified version for visualization. Both include postal code areas and administrative areas pending assignment. The data is shared under a Creative Commons Attribution 4.0 International license. ### Interactive mapPermalink to Interactive map Search for a postal code or address, select a two-digit prefix and compare the estimated areas with CartoCiudad. The viewer uses the simplified data and does not display areas pending assignment. Its controls are in Spanish. Open the map in a full window Viewer guide ## MethodologyPermalink to Methodology Following Goerlich’s approach, the workflow treats each separate component of an administrative area independently. When the selected addresses share a single postal code, it assigns that code to the whole component. When several codes are present, it builds Voronoi polygons around the address locations, clips them to the administrative boundary and merges areas with the same code. The final polygons are dissolved by postal code across provinces. This implementation selects addresses using an inward buffer of 200 m, with a second attempt at 50 m if none are found, rather than the 20 m described by Goerlich. Components without selected addresses remain unassigned unless the municipality has a single postal code recovered from its other components. The administrative boundaries come from LAU2boundaries4Spain, by Francisco José Goerlich and Pedro Pérez Vázquez. These are estimated areas, not official postal boundaries. Coverage depends on the source addresses and some areas remain unassigned. The repository documents the sources, methodology, limitations and steps to reproduce the data. ## ReferencesPermalink to References * Centro Nacional de Información Geográfica. (n.d.). _CartoCiudad_ [Data set]. www.cartociudad.es/web/portal/ * Correos. (n.d.). _Base de datos de códigos postales y capa cartográfica_ [Product information]. Product page * Goerlich, F. J. (2022). _Elaboración de un mapa de códigos postales de España con recursos libres: Cómo evitar pagar por disponer de información de referencia_ (Working Paper No. 2022-3). Ivie. doi.org/10.12842/WPI… (Updated online version) * Goerlich, F. J., & Pérez Vázquez, P. (2025). _Base de datos histórica de contornos municipales de España –LAU2boundaries4Spain–_ (Version 2) [Data set]. Zenodo. doi.org/10.5281/zeno… * Hernangómez, D. (2026). _Códigos postales de España_ (Version 1.0.0) [Data set]. Zenodo. doi.org/10.5281/zeno… (Project documentation) * Instituto Geográfico Nacional. (n.d.). _Servicios de visualización de CartoCiudad: Direcciones y códigos postales_ [WMS documentation]. Service documentation * Sánchez, J. I. (2020, November 13). Así hice el mapa de los códigos postales de España con SIG y datos abiertos. _Nosolosig_. Article
?Unknown authorNov 28, 2026, 9:30 PMReposted by @dieghernan.bsky.social

EGIF reports, reconciled fire records and cartography with R

dieghernan.github.ioLarge forest fires in Spain**GIFs** brings together structured data on large forest fires in Spain and **R** code for an infographic inspired by Dominic Royé’s firefly cartography. Here, GIF means _gran incendio forestal_ : a fire with at least 500 hectares of forest area burned. The project combines exports from MITECO’s General Forest Fire Statistics (EGIF) with its annual reports and provisional updates. It preserves source information and reconciliation notes so that users can trace how records were selected, grouped and located. ## Two related data productsPermalink to Two related data products The collection currently provides two complementary views: * **EGIF reports:** 329 selected reports from 2010–2023. Each row has a unique `egif_part_id` and includes source fields, burned areas, cause, provenance, notes and coordinates where they can be interpreted. * **Reconciled fires:** 455 fire records from 2010–2026, used by the infographic. Each fire has a stable `fire_id`; a fire may bring together several EGIF reports. These are different units of observation. Do not add the two tables’ row counts or burned areas together. The 500-hectare threshold is applied after explicitly documented groupings of reports belonging to the same fire. EGIF takes priority when a documented match exists. Records without a match retain their original MITECO annual report or provisional update. Reports awaiting reconciliation keep an empty `fire_id` and are not automatically added as new fires, which helps avoid double counting. ## Coverage and limitationsPermalink to Coverage and limitations The fire-level records span February 27, 2010 to September 26, 2026. These are the first and last dates in the file, not evidence of complete annual coverage. The project is not a real-time monitoring service. The documented reconciliation still has nine earlier fire records and eight selected EGIF reports awaiting a match. Two additional records retain their provisional source because their province has no reports in the 2023 EGIF export. That export contains no records for seven provinces, so an absence from these files should not be interpreted as an absence of fires. The methodology explains source priority, explicit groupings and unresolved cases. The data guide documents the source exports and processing. The original ZIP files are preserved with SHA-256 checksums. ## Coordinates and the infographicPermalink to Coordinates and the infographic Geographic coordinates use EPSG:4326, keeping the Canary Islands in their actual location. EGIF coordinates are transformed only when their coordinate system can be interpreted. Missing coordinates or an unknown datum leave the geographic coordinates empty rather than producing an invented point. The fire-level view uses interpretable EGIF coordinates where available and an identified municipal reference location otherwise. `location_method` distinguishes these sources. For fires with several reports, the view records which report supplies its reference point. Declared municipality codes and municipalities obtained through a spatial join are retained separately. The points are reference locations, not fire perimeters. Municipal reference locations come from IGN through SIANE and **mapSpain**. The infographic reads the reconciled fire view and uses circle sizes to show forest area burned. ## Downloads, citation and reusePermalink to Downloads, citation and reuse Both products are available in **CSV** , **JSON** and **GeoJSON** from the project website. Read identifiers and municipality codes as text to preserve their representation. JSON supplies explicit types and null values; GeoJSON retains records without usable coordinates with `geometry: null`. Machine-readable field descriptions are provided separately in the EGIF report Croissant metadata and the fire-level Croissant metadata. For reproducible analyses, cite the DOI of the version used. The collection’s version 2.0.0 DOI identifies the archived release; the
@dieghernan.bsky.socialOct 24, 2026, 12:57 PM

Let’s peel the world dieghernan.github.io/202610_orang... #r_bloggers #beautiful_maps #rstats #rspatial #maps #ggplot2 #sf #giscoR

dieghernan.github.ioLet’s peel the world | One WorldDo you know the interrupted Goode homolosine projection? - What would happen if we peeled the Earth like an orange? The interrupted Goode homolosine projection gives us something close to that! This e...
@dieghernan.bsky.socialOct 16, 2026, 8:46 PM

Conversations across the web with Webmentions dieghernan.github.io/202610_webme... #jekyll #html #chulapa #indieweb

@dieghernan.bsky.socialOct 16, 2026, 8:31 PM

Building a documentation chatbot for Chulapa dieghernan.github.io/202610_build... #jekyll #html #chulapa

Terms of UsePrivacy PolicyCommunity StandardsHelpGet the app

Grilled Cheese is a product of Village Compute

Version devBuilt at: 2026-12-03 22:42:33 EST