Overview
This workshop is designed to be run on your local machine. First, you will need to download the data we use in the workshop. Then, you need to set up your machine to analyze and process geospatial data. We provide instructions below to either install all components manually. If applicable: before you install the software, please log out of any external drives (e.g. google drive, onedrive, dropbox, etc.) on your device.
Install Test
After you have finished installing the data and software: To check that you have everything configured correctly, and that you are prepared for the workshop, please download this zip archive. The Install Test is meant to help check if you have all the required R packages.
- Extract the files to your local computer
- RESTART RStudio.
- Doubleclick on InstallTest.r
- If your computer is properly configured, you should be able to execute the script from top to bottom without errors. After the script runs, you should have five objects in your environment and a map in your plots pane. The map will take a few seconds to draw.
- If you don’t know how to run the script, you should spend time reviewing R before attending this workshop. The folder ‘InstallTest’ does NOT contain the data we will be using during the workshop.
Data
You can download the data we will use during the workshop by clicking this download link. The file is 218.2 MB.
Clicking the download link will automatically download all of the files to your default download directory as a single compressed
(.zip
) file. To expand this file, double click the folder icon in your file navigator application (for Macs, this is the Finder application).
For a full description of the data used in this workshop see the data page.
Software
Software | Install | Manual | Available for | Description |
---|---|---|---|---|
GDAL | Link | Link | Linux, MacOS, Windows | Geospatial model for reading and writing a variety of formats |
GEOS | Link | Link | Linux, MacOS, Windows | Geometry models and operations |
PROJ.4 | Link | Link | Linux, MacOS, Windows | Coordinate reference system transformations |
R | Link | Link | Linux, MacOS, Windows | Software environment for statistical and scientific computing |
RStudio | Link | Linux, MacOS, Windows | GUI for R | |
UDUNITS | Link | Link | Linux, MacOS, Windows | Unit conversions |
We provide quick instructions below for installing the various software needed for this workshop. At points, they assume familiarity with the command line and with installation in general. As there are different operating systems and many different versions of operating systems and environments, these may not work on your computer. If an installation doesn’t work for you, please refer to the installation instructions for that software listed in the table above.
GDAL, GEOS, and PROJ.4
The installation of the geospatial libraries GDAL, GEOS, and PROJ.4 varies significantly based on operating system. These are all dependencies for sf
, the R
package that we will be using for spatial data operations throughout this workshop.
Windows
macOS - Install with Packages (Beginner)
macOS - Install with Homebrew (Advanced)
Linux
UDUNITS
Linux users will have to install UDUNITS separately. Like the geospatial libraries discussed above, this is a dependency for the R
package sf
. Due to conflicts, it does not install properly on Linux machines when installed as part of the sf
installation process. It is therefore necessary to install it using the command line ahead of time.
Linux
R
Participants who do not already have R
installed should download and install it.
Windows
macOS
Linux
RStudio
RStudio is a GUI for using R
that is available for Windows, macOS, and various Linux operating systems. It can be downloaded here. You will need the free Desktop version for your computer. In order to address issues with ggplot2
, learners and instructors should run a recent version of RStudio (v1.2 or greater).
R Packages
The following R
packages are used in the various geospatial lessons.
To install these packages in RStudio, do the following:
1. Open RStudio by double-clicking the RStudio application icon. You should see
something like this:
2. Type the following into the console and hit enter.
install.packages(c("dplyr", "ggplot2", "raster", "rgdal", "rasterVis", "sf"))
You should see a status message starting with:
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/dplyr_0.7.6.tgz'
Content type 'application/x-gzip' length 5686536 bytes (5.4 MB)
==================================================
downloaded 5.4 MB
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/ggplot2_3.0.0.tgz'
Content type 'application/x-gzip' length 3577658 bytes (3.4 MB)
==================================================
downloaded 3.4 MB
When the installation is complete, you will see a status message like:
The downloaded binary packages are in
/var/folders/7g/r8_n81y534z0vy5hxc6dx1t00000gn/T//RtmpJECKXM/downloaded_packages
You are now ready for the workshop!