dreamRs / esquisse

RStudio add-in to make plots interactively with ggplot2
https://dreamrs.github.io/esquisse
Other
1.78k stars 229 forks source link

Is the sf graphic type working already? #147

Closed kweinert closed 3 years ago

kweinert commented 3 years ago

Hi, I recently found this amazing package and I am delighted. However, I could not get the sf graphic type working. When I read an sf object using sf::read_sf and than start esquisser(), the loaded dataset is not available in the data dropdown menu. I skimmed through the source code but I could not really understand how the charts are produced.

Is sf supported already?

Update: Using sf::st_read instead of sf::read_sf, the dataset actually appears in the data dropdown menu. However, I still cannot produce a chart, the sf icon is always deactivated.

Kind regards from Berlin Karsten

pvictor commented 3 years ago

Hello,

Yes there was some bugs, you need to install dev version of esquisse and datamods to make it work:

remotes::install_github("dreamRs/datamods")
remotes::install_github("dreamRs/esquisse")

library(sf)
nc <- st_read(system.file("shape/nc.shp", package="sf"))
esquisse::esquisser(nc)

This should display:

image

I have only tested simple choropleth maps, let me know how it works for you and how you want to use sf here.

Victor

kweinert commented 3 years ago

Works great, thanks! Awesome package!