Scott Chamberlain
Scott Chamberlain
congressional district boundaries https://github.com/JeffreyBLewis/congressional-district-boundaries
us cities in geojson https://gist.github.com/sckott/97c28209169d64938714
There's a PR to rgbif pkg that i maintain https://github.com/ropensci/rgbif/pull/284 integrating with GBIF API for maps https://www.gbif.org/developer/maps and one format option they give back is MVT, map vector tiles, which...
You can get GBIF mvt data e.g, like ```r install.packages("rgbif") library(rgbif) x
there looks to be some c++ stuff in here for parsing mvt https://github.com/mapbox/awesome-vector-tiles - though i imagine it's easy enough for you to do from scratch
there's some good examples here https://github.com/NYCPlanning/labs-geojson2mvt/tree/master/example - run `npm install` in the root of the repo, then `node script.js` within the `example` dir, and it generates a bunch of .mvt...
sweet, trying it out now
This isn't working as expected: ```r read_mvt_data("../labs-geojson2mvt/example/tiles/17/38589/49274.mvt")[[1]]$features[[1]]$geometry #> [,1] [,2] [,3] #> [1,] 8100 1958 1 ``` Using this node cli tool https://github.com/mapbox/vt2geojson ``` vt2geojson example/tiles/17/38589/49274.mvt ``` ``` { "type":...
Ah, i guess all of them turn out like above. I assume there's another step required to convert the matrix to coordinates?
while testing this, seems like the read_mvt methods should allow query parameters beyond the .mvt ending, e.g., ```r read_mvt_sf('https://api.gbif.org/v2/map/occurrence/density/9/81/183.mvt') #> works fine read_mvt_sf('https://api.gbif.org/v2/map/occurrence/density/9/81/183.mvt?year=2010') #> Error in parse_mvt_params(data) : #> Input...