Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leverage sf? #53

Closed
cpsievert opened this issue Feb 8, 2017 · 5 comments
Closed

Leverage sf? #53

cpsievert opened this issue Feb 8, 2017 · 5 comments

Comments

@cpsievert
Copy link

cc @sckott @rmendels

The fairly new sf package is gaining lots of traction and there is even a new geom_sf() coming to ggplot2

Assuming we can represent griddap/tabledap data structures using simple features, we can leverage/augment some already existing "automatic plotting methods" (e.g., plot.sf() and geom_sf()).

I'm thinking that (over the next week or so) I will attempt to write some tabledap/griddap_csv/griddap_nc methods for the sf::st_as_sf() generic, so generating plots could be as simple as:

library(rerddap)
library(sf)
library(ggplot2)

d <- st_as_sf(tabledap('erdCinpKfmBT'))
plot(d)
ggplot() + geom_sf(data = d)

Does this sound reasonable?

@rmendels
Copy link
Collaborator

rmendels commented Feb 8, 2017 via email

@cpsievert
Copy link
Author

@rmendels fyi this has a decent overview of plotting sf objects via the plot() generic -- http://r-spatial.org/r/2017/01/12/newssf.html

To see some geom_sf() examples:

devtools::install_github("tidyverse/ggplot2#1990")
library(ggplot2)
?geom_sf # see examples section

@rmendels
Copy link
Collaborator

rmendels commented Feb 8, 2017 via email

@sckott
Copy link
Contributor

sckott commented Mar 29, 2017

can I close this @cpsievert ?

@cpsievert
Copy link
Author

yep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants