1.4 Why R

1.4.1 CLI vs GUI

  • Command Line Interface (CLI) faster than a GUI

Example: Broadband Analyst checking Networks

Current workflow:

  1. Download Data from gov. agency (web browser)
  2. Check the data in QGIS (eyeball data) 2b. Correct data
  3. Transform to an appropriate CRS (coordinate system)
  4. Create a buffer
  5. Transform buffer to the previous CRS
  6. Send back data to gov. agency

An example of a workflow with R:

# data could be read directly from gov. agency but this is an other topic
my_network <- sf::read_sf("my_data.shp")               # read data into R 
mapview::mapview(my_network)                           # eyeball data 
# 2b still hard in R, but data could be tested 
my_network_planarCRS <- sf::st_transform(my_network
                                         , 32616)      # UTM 
my_buffer <- sf::st_buffer(my_network_planarCRS, 500)  # buffer 500m
my_buffer_4326 <- sf::st_transform(my_buffer, 4326)    # transform back 
# data could also be send directly with R
  • Code above is fully reproducible

  • Volume/velocity of data: GPS/smartphone, UAV, Remote sensing etc..

  • “Interfaces to other software are part of R” (Rcpp, reticulate).

  • Lot of flexibility to produce what you need (your workflow)

  • Great spatial statistics