Visualizing a time-series of Texas mining, quarrying, and oil & gas extraction jobs (NAICS21) by Census tract between 2002 and 2023 in 3D.
Featuring a native slider control for R's mapgl package, currently in development.
Posts by Kyle Walker
A new release of the mapgl R package (0.4.6) is now on CRAN. Get your hands on some major updates:
- Static map helpers for image output / inclusion in Quarto reports;
- Support for categorical rasters;
- The latest @Mapbox GL JS with native PMTiles support
Facility optimization on road network graphs: walker-data.com/spopt-r/arti...
Solving route and fleet optimization problems: walker-data.com/spopt-r/arti...
Set up your own routing graph with a free tool like r5r or OSRM, then solve problems quickly with the package's C++ and Rust backend.
Read these vignettes to get started.
Facility and route optimization on road network graphs can solve countless problems across many industries.
However, these solvers often require expensive software to set up and run them, or expensive, rate-limited travel-time matrix APIs.
The spopt-r R package offers a solution.
🎯 [TIP de R - RECURSO 📚] ¿Mapas interactivos sin servidores externos?
Con {freestiler} creá archivos PMTiles desde R, ¡súper rápido y sin dependencias!
Ideal para Shiny/Quarto.
Más info: walker-data.com/freestiler/a...
✍🏽 @kylewalker.bsky.social
#RStats #RStatsES #Rtips #DataScience
The Huff model is the classic algorithm in retail spatial analysis - and you can now use it in R.
Predict:
- Which store a customer is likely to visit
- Sales potential per location
- How new stores reshape the competitive landscape
Learn more: walker-data.com/spop...
New in spopt-r: optimized corridor routing on cost surfaces.
Vignette: how to optimize a route for a produced water pipeline in Appalachia.
Build a friction raster from inputs like terrain & land cover, then find the least cost path and evaluate diverse scenarios.
walker-data.com/spopt-r/arti...
An important tech use-case for LLMs that isn’t pure coding is deploying and managing cloud services
For example, Google Cloud Platform is powerful but a total maze to navigate
LLMs help me work through the menus, understand the CLIs, and prep deployment scripts
Just implemented: support for categorical {terra} rasters in R's mapgl.
Shown here: 7.6 million 300m x 300m grid cells across Texas derived from the 2024 NLCD, running fast natively in MapLibre.
Closes a 2-year-old issue - was one that was more difficult to figure out than it seemed!
Teaching Gemma 4 (26b MoE) how to map Census data in R via OpenCode & oMLX in the Zed IDE.
It's the first local LLM I've used that gets me real-time responsiveness. Running on a MacBook Pro M2 MAX, 64GB RAM.
Not as smart as the frontier models - but it's running for free on my own hardware.
M2 MAX, 64GB RAM
with that setup, after initial load, I'm getting real-time conversational responses and reasonable speed for harder tasks
Set up Gemma 4 (26b MoE) via OpenCode and omlx for agentic coding on my MacBook
It’s no Opus 4.6, but this is the first local model I’ve used that is actually capable of real work on my laptop
Can AI map land data in survey plats?
Absolutely, if you set it up right.
Shown here: extracting the surface hole, penetration point, and bottom hole coordinates from a permit plat PDF and plotting them with the lateral on an interactive map.
I'm designing it to be future-proof as well: it supports the new MapLibre Tile spec, which will accommodate 3D tiles (LiDAR, perhaps!) down the road.
Give freestiler a look: walker-data.com/freestiler
...and many other demanding jobs in research / client projects where speed is a priority. freestiler reduces time-to-tiles dramatically thanks to its Rust backend.
freestiler simplifies this: tile directly from R / Python objects, DuckDB databases, or even spatial files on your computer.
I'm using it to visualize:
- 146 million US job points;
- 850k NYC parcels;
- 5 million US oil & gas wells...
The freestiler R / Python package has been around for a month now, and it's proving to be one of the most useful tools I've built.
Vector tiles are a must for high-performance visualization of large geospatial datasets, but creating vector tiles has long been tricky without specialized expertise.
For static screenshots directly from an interactive session, use `add_screenshot_control()` and snap a screenshot of the current map state.
I've also included utilities to remove the basemap styles from your maps entirely if you need a clean focus on your data for your reports.
- `save_map()` saves the map view as an image file to your computer;
- `print_map()` prints the map as a static image in your IDE's plot viewer or in your rendered Quarto docs (PDF, Word, presentations, etc.)
Use them in static reporting pipelines as shown here.
New in the R mapgl package: static maps!
I developed mapgl to bring my favorite interactive mapping libraries to R. But - interactive maps are by definition hard to share in non-interactive formats.
I'm rolling out a couple new functions I'm already finding useful:
I'm still working through where the line is.
But I'm pretty sure the answer has changed from where it was two years ago.
I'm still going to keep open sourcing tools to build things - I've released more packages in the past few months than I ever have.
But the value in open sourcing project code itself seems to have diminished.
If I share a project repo, LLMs can often reproduce or adapt it in one shot.
So the question intent changes from "can you teach me how to do this?" to "can I have your work product for free?"
Even if that's not intentional by the question asker.
Before LLMs, I would typically share - as this question was a request to be taught. Even if someone had the code, it would take time to reproduce what I had done.
With LLMs, however, the question feels different.
I'm struggling with an answer to "Can you share the code?"
I've always been a big believer in open source software. I built my career on it.
When I post a cool project / demo, inevitably I get the question "can you share the code?"
850,000 parcels in New York City.
All visualized on an interactive map in 3D by estimated market value per square foot.
Filtered dynamically in the browser with an interactive legend.
Our beloved Claude - even with access in this case to multiple years of conversations with me about mapping - defaults to a year-and-a-half-old release of MapLibre.
A large percentage of people using AI uncritically are actually 18 months behind.
Use this to your advantage.
A personal and professional goal of mine is to always be using and developing tools that Claude doesn’t know about yet by default