albersusa icon indicating copy to clipboard operation
albersusa copied to clipboard

Use sf instead of sp?

Open hadley opened this issue 7 years ago • 6 comments

It's the way of the future!

hadley avatar Jan 25 '17 23:01 hadley

This would be very nice. sf made this little example much easier to accomplish. Happy to help if I can. It might be as simple as converting everything and resaving the data files. Or, we could add an argument for class of returned data.

timelyportfolio avatar Jan 26 '17 03:01 timelyportfolio

How about initially along with (these are "live")?

  • counties_sf: Retreive a U.S. county composite map, optionally with a projection, as a simplefeature
  • usa_sf: Retreive a U.S. state composite map, optionally with a projection, as a simplefeature

Granted this isn't on CRAN so wiping & loading would be possible. Has a geom_sf() stabilized somewhere?

hrbrmstr avatar Jan 27 '17 04:01 hrbrmstr

https://github.com/tidyverse/ggplot2/pull/1990

hadley avatar Jan 27 '17 13:01 hadley

lemme add some examples for that to the README and if there is still work to be done in the geom I can try to poke at but it turns out having a full time job and teaching two different college courses is actually a major time eradicator #whoknew?! :-)

On Fri, Jan 27, 2017 at 8:12 AM, Hadley Wickham [email protected] wrote:

tidyverse/ggplot2#1990 https://github.com/tidyverse/ggplot2/pull/1990

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hrbrmstr/albersusa/issues/3#issuecomment-275662164, or mute the thread https://github.com/notifications/unsubscribe-auth/AAfHtscHwl2EVBYeDEuN9pxf6P_R11ueks5rWe1FgaJpZM4LuJBZ .

hrbrmstr avatar Jan 27 '17 13:01 hrbrmstr

@hrbrmstr sure, no problems. I might also have time to contribute some fixes as I'm using this in a class that I'm co-teaching.

hadley avatar Jan 27 '17 13:01 hadley

And generally, I'd be tempted to just drop sp support altogether — sf is so much easier, and since this is not on CRAN yet, you're unlikely to break much existing code.

hadley avatar Jan 27 '17 13:01 hadley