Permalink
Browse files

Add RSurvey post

  • Loading branch information...
jfisher-usgs committed Feb 27, 2017
1 parent 18f2a1a commit 4d6713512803fdc861fc0e5545b1934c87f54826
@@ -0,0 +1,120 @@
---
layout: post
title: "RSurvey"
description: ""
category: r
tags: [package, gis]
---
{% include JB/setup %}
Early in my science career I believed that any good piece of software included a graphical user interface (GUI).
That was many years ago, and during that time I delved deep into the art of [Tcl/Tk](https://tcl.tk/) programming;
using the **tcltk** package to create GUI's in [R](https://www.r-project.org/).
Countless hours were spent struggling over the R-Tcl/Tk interface and educating myself on the best practices and principles for GUI design.
After a few years of toil, I finally started feeling proficient with GUI construction.
It was around this time that I also became aware of the importance of reproducible research;
thanks to the many discussions on the topic within the R community.
Rather quickly my GUI development ceased, and all of the GUI-based applications
I relied so heavily on for my research (such as Excel, ArcGIS, and Illustrator) were no longer relevant.
Scripting has become the essential ingredient for making my research reproducible,
and I believe my work has benefited immensely from taking this approach.
More recently I've become a bit of a zealot about preaching the importance of reproducibility to my fellow scientists.
These are career researchers in the earth sciences,
typically with little to no programming experience---smart individuals on a strictly GUI-based diet.
I'm disappointed to report that my efforts have resulted in very few converts.
My colleagues have gone through a couple of R-training workshops,
been made aware of countless online materials for learning to code, and are still having difficulties crossing over.
The biggest complaint I here is that the learning curve is just too steep.
And I get it, learning your first programming language can be extremely difficult,
especially when you're trying to meet publication deadlines.
This may come as blasphemy to some, but perhaps the best way to reach out to these folks is through R-GUI applications
(such as [R Commander](http://www.rcommander.com/)).
Start them with the familiar and let these gateway applications slowly get them hooked on R.
Reasoning such as this have spurred me to dust off one of my old R GUI's,
**RSurvey**, a cross-platform geographic information system (GIS) application.
Perhaps not as feature rich as other GIS applications (such as [QGIS](http://www.qgis.org)),
but completely written in R and fairly simple to use.
The package repository is located on [GitHub](https://github.com/USGS-R/RSurvey).
To install the stable version of **RSurvey** from [CRAN](https://CRAN.R-project.org/package=RSurvey),
open an R session and type the following command
```r
install.packages("RSurvey")
```
If you're running into difficulties with package installation, see the package
[README](https://github.com/USGS-R/RSurvey/blob/master/README.md) file for possible solutions.
To load the package and launch the main GUI, use the command
```r
library("RSurvey")
```
If any of the suggested packages are missing, you will be prompted to install them when it first starts up.
The main GUI should look something like this
![center](/figs/2017-02-27-rsurvey/fig1-gui.png)
No manual currently exists for the **RSurvey** package; its absence is mainly attributed to the authors laziness;
but also from a sense that the software should reach a certain level of maturity before embarking on such an endeavor,
thus avoiding endless document revisions.
That said, please keep in mind that considerable effort was put into making the user interface easy enough to use without instruction.
In the remainder of this post, windows are shown for a typical **RSurvey** session that includes
data import, data wrangling, and data visualization.
This example session illustrates only a small fraction of the package's functionality.
You'll need to explore the package on your own to discover its full potential.
Any comments/guidance would be greatly appreciated, you can contact me via [email](jfisher@usgs.gov).
Bug reports and feature requests can be submitted on the GitHub
[Issues page](https://github.com/USGS-R/RSurvey/issues).
![center](/figs/2017-02-27-rsurvey/fig2-import.png)
![center](/figs/2017-02-27-rsurvey/fig3-editor.png)
![center](/figs/2017-02-27-rsurvey/fig4-variables.png)
![center](/figs/2017-02-27-rsurvey/fig5-polygon.png)
![center](/figs/2017-02-27-rsurvey/fig6-plot2d.png)
![center](/figs/2017-02-27-rsurvey/fig7-plot3d.png)
And let's not forget the R session information.
```r
devtools::session_info()
## Session info ------------------------------------
## setting value
## version R version 3.3.2 (2016-10-31)
## system x86_64, mingw32
## ui Rgui
## language (EN)
## collate English_United States.1252
## tz America/Los_Angeles
## date 2017-02-24
##
## Packages ----------------------------------------
## package * version date source
## devtools 1.12.0 2016-06-24 CRAN (R 3.3.2)
## digest 0.6.12 2017-01-27 CRAN (R 3.3.2)
## htmltools 0.3.5 2016-03-21 CRAN (R 3.3.2)
## htmlwidgets 0.8 2016-11-09 CRAN (R 3.3.2)
## httpuv 1.3.3 2015-08-04 CRAN (R 3.3.2)
## jsonlite 1.2 2016-12-31 CRAN (R 3.3.2)
## knitr 1.15.1 2016-11-22 CRAN (R 3.3.2)
## magrittr 1.5 2014-11-22 CRAN (R 3.3.2)
## memoise 1.0.0 2016-01-29 CRAN (R 3.3.2)
## mime 0.5 2016-07-07 CRAN (R 3.3.2)
## R6 2.2.0 2016-10-05 CRAN (R 3.3.2)
## Rcpp 0.12.9 2017-01-14 CRAN (R 3.3.2)
## rgl 0.97.0 2017-01-10 CRAN (R 3.3.2)
## RSurvey * 0.9.1 2017-02-24 CRAN (R 3.3.2)
## shiny 1.0.0 2017-01-12 CRAN (R 3.3.2)
## withr 1.0.2 2016-06-20 CRAN (R 3.3.2)
## XML 3.98-1.5 2016-11-10 CRAN (R 3.3.2)
## xtable 1.8-2 2016-02-05 CRAN (R 3.3.2)
```
Binary file not shown.
Binary file not shown.

0 comments on commit 4d67135

Please sign in to comment.