Opened 6 years ago
Closed 6 years ago
#2075 closed enhancement (fixed)
R modules sp and sf
Reported by: | darkblueb | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | OSGeoLive12.0 |
Component: | OSGeoLive | Keywords: | R |
Cc: | edzer |
Description
12dev alpha1; this ticket tracks the install of R modules sp
and sf
note this ticket supersedes #998
dr. robin lovelace writes:
I would agree with the statement that sf is essential. Further I would say RStudio is all-but essential. I proposed adding it on the osgeolive list over a year ago so am very happy to see this get rejuvenated as a plan. I think a good list of important geo packages is that in the rocker/geospatial container: https://hub.docker.com/r/rocker/geospatial/~/dockerfile/
Hope this is useful, look forward to hearing about (and perhaps installing) osgeolive bionic, can't wait''
Attachments (1)
Change History (14)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Reading the R geospatial writings describing the rocker
project.. it seems like somewhere around 6% of R on linux users show enough interest in geospatial to try the geospatial flavor docker container.. but, geospatial was included very early in the project, proving that geospatial has a special significance, despite low raw numbers of users
The Impressive Growth of R - Stack Overflow Blog (at stackoverflow.blog)
.. academic social sciences, biology .. gotcha
Said another way, it seems like .. a primary reason to learn and use R is population studies in academia, which obviously use maps, but only a small percentage of those users are using maps or trying to use maps, today. Every single thing you do in R is hard.. so it is not because maps are too hard.
(analogy qwerty keyboard and R language syntax)
News flash -- one year ago, the RStudio project made an exact parallel to Jupyter Notebooks, called R Notebooks, and a file format called dot Rmd
detailed review comparing the two:
Advantages of Using R Notebooks For Data Analysis Instead of Jupyter Notebooks (at minimaxir.com)
other notable quotes from the comments section of the R Notebooks review: "... the vast majority of R use from universities is by researchers, which we can tell since it doesn’t dip in the summer." "I think RStudio played an important role for the popularity of R."
comment:3 by , 6 years ago
authoritative reference of R modules for geospatial -LINK- https://cran.r-project.org/web/views/Spatial.html
comment:4 by , 6 years ago
12dev alpha1;
succesfull install of sf
via CRAN using four lines..
requires C++ and gfortran ;
harmlessly links to existing GEOS, GDAL and Proj4 ;
multistage C++ build locally ; improvements welcome
comment:5 by , 6 years ago
Great! You probably also want to include package lwgeom then, as it is needed by sf for all the computations on long/lat coordinates (just like geography in PostGIS). It links either externally to liblwgeom-dev if available, otherwise compiles its own (private) copy of that library.
comment:6 by , 6 years ago
Priority: | normal → major |
---|
comment:7 by , 6 years ago
Tim Appelhans writes:
If I can be of any help let me know.
On 06/29/2018 09:20 PM, Edzer Pebesma wrote:
Hi Brian, most users as far as I know who use R don't use R from Jupyter
- I'm not sure why one would want this, most people use Rstudio these
days (I don't, and that's considered old fashioned).
As of mapview (Cc: Tim), if R package leaflet works in Jupyter, then mapview will.
Well, let's say that 80% of functionality should work if leaflet works. There are some stand-alone htmlwidgets (e.g. cubeview) that may need some attention. I have never tried using R from jupyter, so have no idea what is needed to get things to work...
Edzer, regarding all the web-based rendering such as leaflet / mapview or other htmlwidgets (eg. plotly) you are wise not to work in RStudio, as the viewer usually causes more trouble than being helpful. All that ported js code is written for the browser so will work best there (unless you use IE, but who does that?). I find myself setting optins(viewer = NULL) way more often than I'd like, but it's better than crashing the whole RStudio (and hence R) instance just because you want to render something for quick inspection.
comment:10 by , 6 years ago
Cc: | added |
---|
comment:12 by , 6 years ago
This commit is related:
https://github.com/OSGeo/OSGeoLive/pull/238/commits/1c16dd314071fdd602d27e645edd9e925e95b57c
.. further investigations on the R rocker/geospatial docker world (23 layers, 1.3GB)
sudo docker pull rocker/geospatial;
sudo docker run -ti rocker/geospatial bash
It is a full linux in there, with /libs and /docs As is often the case with R, the docs are quite nice Specifically I found a part where they discuss native performance with gdal and GEOS. gdal provides a postgres connector, and it reads PostGIS directly and, WKT and WKB can be read, and the Shapefile driver. They claim near-native performance on all of those.. 20x of the previous rgdal or whatever
no benchmarks yet.. the important item at osgeolive is installing
sf
with docs that are acceptable to the R team.