ATFutures / geoplumber

Serve geographic data from R and consume with scalable front end.
https://atfutures.github.io/geoplumber/
59 stars 7 forks source link

Add more example datasets #45

Closed Robinlovelace closed 5 years ago

Robinlovelace commented 5 years ago

Allow different layers to be shown.

layik commented 5 years ago

Will get to this at some point!

Robinlovelace commented 5 years ago

I'm up for giving it a bash (or should I say a crash ; )

Robinlovelace commented 5 years ago

I'm up for giving it a bash (or should I say a crash ; )

layik commented 5 years ago

Will be great Robin.

layik commented 5 years ago

I have prep'ed this using osmdata, happy to add it in. Screen shot from gp_sf() of course, which is related to the traffic data already in geoplumber. screenshot from 2018-10-10 21-25-27

layik commented 5 years ago

Of course subset it with road names. screenshot from 2018-10-10 21-27-55

Robinlovelace commented 5 years ago

Looks quite disconnected. But yes, that will provide at least 3 layers. Only missing layer type is polygons when that goes in an there's open data on that.

layik commented 5 years ago

I think the disconnect is more to do with the roads where sample was taken, yes I can see potential within road disconnects, too.

layik commented 5 years ago

Just remembered, I have done this rather big (13mb only geometry) network using awesome osmdata @Robinlovelace, not sure if that is what you mean in the other thread with @mpadge. screenshot from 2018-10-12 11-17-43

Robinlovelace commented 5 years ago

It's too big to fit on CRAN as an example dataset (5MB limit). Suggest creating a 'core network', e.g. only A and B roads and ones with traffic counts on and ones that connect between them. Creating a minimal (~100 kB) core network in a small area of London is not as simple as it first may seem!

layik commented 5 years ago

Creating a minimal (~100 kB) core network in a small area of London is not as simple as it first may seem!

Correct.

layik commented 5 years ago

Primary roads only, 1,107,896 bytes screenshot from 2018-10-12 17-03-38

layik commented 5 years ago

Better say: 244,496 bytes "only" geometry for above network of primary roads. I will leave it there, I have these saved in a separate project if we need them.

Robinlovelace commented 5 years ago

Looking good, suitable example dataset. Worth including with usethis::use_data("traffic_network") and documenting in data.R? I suspect so!

layik commented 5 years ago

Will do!

layik commented 5 years ago

If you are happy we can tick the second check box @Robinlovelace :)

Note: this type of data (one column geom sf objects) currently not "properly" rendered by geoplumber pending a slight change in #51 related to an underlying package.

Robinlovelace commented 5 years ago

Fantastic work, job done!

Related issue is that I cannot get it to show with gp_sf() even after coercing it to sf class. can you reproduce this? Job done in any case!

devtools::install_github("ATFutures/geoplumber")
library(geoplumber)
sf:::plot.sfc_LINESTRING(traffic_network)
gp_create()
setwd("geoplumber/")
gp_sf(traffic_network) # error
tn = sf::st_sf(traffic_network)
gp_sf(tn) # not showing
layik commented 5 years ago

Note: this type of data (one column geom sf objects) currently not "properly" rendered by geoplumber pending a slight change in #51 related to an underlying package.

Robinlovelace commented 5 years ago

Aha yes thanks for the clarification!