Kyle Walker
@kylewalker.bsky.social
2.9K followers 210 following 840 posts
Demographics | Geospatial | Data Science | Open Source
Posts Media Videos Starter Packs
kylewalker.bsky.social
Feeling stuck with data.census.gov unavailable during the government shutdown?

Now's a great time to try out tidycensus.

The decennial Census and American Community Survey are at your fingertips - and get pre-joined geographies for mapping.
Reposted by Kyle Walker
obrien.page
The @maprva.org surveillance map, ported to #Rstats using mapgl, osmdata, sf, and dplyr.

gist.github.com/mhpob/17782b...

Not 1:1 in terms of Ultra/Mapbox GL JS -> R, but pretty close!
Original query: overpass-ultra.us#query=url%3A...

cc @mackaszechno.bsky.social @kylewalker.bsky.social
kylewalker.bsky.social
looking at the code, that's absolutely do-able in mapgl!
kylewalker.bsky.social
Learn about the new {pmtiles} R package, which helps you create, serve, and view PMTiles from R - all starting with the sf objects you're already using.

Paired with {mapgl}, PMTiles puts massive spatial data visualization in the hands of R users - like this interactive 3D map.
kylewalker.bsky.social
New post: mapping 650,000+ Census blocks in Texas in 3D with PMTiles

You've heard me talk about @protomaps.com's PMTiles for a while and how transformative this tech can be for geospatial visualization.

In my latest post, you'll learn how to use PMTiles in R.
kylewalker.bsky.social
Your company's affordable production mapping stack:

- R + Shiny (seriously)
- PMTiles for massive data visualization;
- Cloudflare R2 Workers for serving data securely;
- MapLibre for your maps;
- Docker + a cloud service (I like Fly.io)
kylewalker.bsky.social
In this week's upcoming blog post - learn how to make this visualization!

Follow here, coming soon -
kylewalker.bsky.social
On the blog: enable lasso selection in your R / Shiny web mapping applications.

Learn how: walker-data.com/post...
kylewalker.bsky.social
yeah, I think so.

I don't send anything to conda-forge; that looks like the pmtiles Python package maintained by the PMTiles author
kylewalker.bsky.social
Real-time spatial analysis in your R Shiny apps?

The {mapgl} package - and its TurfJS integration - make it possible.

Watch as Voronoi polygons instantly update on marker drag.

Pick a metro and try it out: gist.github.com/walkerke/f4d...
kylewalker.bsky.social
this is excellent! thanks for sharing!
Reposted by Kyle Walker
chriskenny.bsky.social
redistio now uses @kylewalker.bsky.social's mapgl for interactive redistricting map editing!

redistio is an #rstats package that uses Shiny to draw redistricting maps locally.

Unlike other district editors, this provides access to our simulation algorithms, interactively!

Short demo:
kylewalker.bsky.social
Preview the 2.5 billion buildings from @overturemaps.bsky.social in a single line of R code?

Why not?

Check out the pmtiles package: github.com/walkerke/pmt...
kylewalker.bsky.social
R-Universe by @rOpenSci is an extremely useful project.

My latest R package, {pmtiles}, is not a good fit for CRAN as it bundles a pre-compiled Go library.

With R-Universe, I was able to get installable cross-platform binaries built in hours!

#rstats

walkerke.r-universe....
kylewalker.bsky.social
you'd need tippecanoe installed: github.com/felt/tippeca...

once that's set up, you'll need to convert your shapefile to GeoJSON (QGIS can do that)

Or use R with my package; read in the shapefile with st_read(), then use the pm_create() function
GitHub - felt/tippecanoe: Build vector tilesets from large collections of GeoJSON features.
Build vector tilesets from large collections of GeoJSON features. - felt/tippecanoe
github.com
kylewalker.bsky.social
Many thanks and credit to @protomaps for creating such an empowering tool.

Try out the package and let me know what you think!

Install: `pak::pak("walkerke/pmtiles")`

GitHub:
GitHub - walkerke/pmtiles: An R package for inspecting, viewing, and interacting with PMTiles
An R package for inspecting, viewing, and interacting with PMTiles - walkerke/pmtiles
github.com
kylewalker.bsky.social
- Utilities for serving PMTiles, both directly (for use with PMTiles.js and {mapgl}'s add_pmtiles_source() ) as well as via ZXY endpoints for use with any library that supports it.
kylewalker.bsky.social
- A PMTiles viewer for inspecting PMTiles on an interactive map in your favorite R IDE. View local PMTiles files and remotely-hosted ones with the help of {mapgl}.

- R bindings for the go-pmtiles library; inspect tiles, extract regions from tiles, and a whole lot more.
kylewalker.bsky.social
{pmtiles} is designed to help you get up and running using PMTiles with R. Package features include:

- An R interface to tippecanoe to create PMTiles files directly from sf objects. tippecanoe has a lot of options; {pmtiles} supports you in tileset creation.
kylewalker.bsky.social
Introducing {pmtiles}: an #rstats package to create, view, and interact with PMTiles.

PMTiles is one of the most exciting geospatial innovations in recent years. Map tiles are stored & served from a single file, making massive geospatial data visualization widely accessible.
kylewalker.bsky.social
it looks that way, but try downloading a file - you'll get an error
kylewalker.bsky.social
The US Census website / data.census.gov are down. R users, however, can still access data:

- Geographies (via FTP): tigris github.com/walkerke/...

- Decennial / ACS with geographies: tidycensus walker-data.com/tidy...

- All datasets: censusapi www.hrecht.com/censu...