You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -8,160 +8,135 @@ This workshop is designed to be run on your local machine. First, you will need
8
8
9
9
## Data
10
10
11
-
You can download all of the data used in this workshop by clicking
12
-
[this download link](https://ndownloader.figshare.com/articles/2009586/versions/10). The file is 218.2 MB.
11
+
You can download all of the data used in this workshop by clicking [this download link](https://ndownloader.figshare.com/articles/2009586/versions/10). The file is 218.2 MB.
13
12
14
-
Clicking the download link will automatically download all of the files to your default download directory as a single compressed
15
-
(`.zip`) file. To expand this file, double click the folder icon in your file navigator application (for Macs, this is the Finder
16
-
application).
13
+
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).
17
14
18
15
For a full description of the data used in this workshop see the [data page](instructors/data.md).
19
16
20
17
## Option A: Local Installation
21
18
22
19
### Software
23
-
| Software | Install | Manual | Available for | Description |
|[GDAL](https://www.gdal.org)|[Link](https://gdal.org/download.html)|[Link](https://gdal.org)| Linux, MacOS, Windows | Geospatial model for reading and writing a variety of formats |
32
-
|[GEOS](https://trac.osgeo.org/geos)|[Link](https://trac.osgeo.org/geos)|[Link](https://geos.osgeo.org/doxygen/)| Linux, MacOS, Windows | Geometry models and operations |
33
-
|[PROJ.4](https://proj4.org)|[Link](https://proj4.org/install.html)|[Link](https://proj4.org/index.html)| Linux, MacOS, Windows | Coordinate reference system transformations |
34
-
|[UDUNITS](https://www.unidata.ucar.edu/software/udunits/)|[Link](https://www.unidata.ucar.edu/downloads/udunits/index.jsp)|[Link](https://www.unidata.ucar.edu/software/udunits/#documentation)| Linux, MacOS, Windows | Unit conversions |
35
20
36
-
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.
21
+
| Software | Install | Manual | Available for | Description |
|[R](https://www.r-project.org)|[Link](https://cloud.r-project.org)|[Link](https://cloud.r-project.org)| Linux, MacOS | Software environment for statistical and scientific computing |
24
+
|[RStudio](https://www.rstudio.com)|[Link](https://www.rstudio.com/products/rstudio/download/#download)|| Linux, MacOS | GUI for R |
25
+
37
26
38
27
39
-
:::::::::::::::: spoiler
28
+
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.
40
29
30
+
::: spoiler
41
31
## Windows
42
32
43
33
To install the geospatial libraries, install the latest version [RTools](https://cran.r-project.org/bin/windows/Rtools/)
34
+
:::
44
35
45
-
:::::::::::::::::::::::::
46
-
47
-
:::::::::::::::: spoiler
48
-
36
+
::: spoiler
49
37
## macOS - Install with Packages (Beginner)
50
38
51
39
The simplest way to install these geospatial libraries is to install the latest version of [Kyng Chaos's pre-built package](https://www.kyngchaos.com/software/frameworks) for GDAL Complete. Be aware that several other libraries are also installed, including the UnixImageIO, SQLite3, and `NumPy`.
52
40
53
41
After downloading the package in the link above, you will need to double-click the cardbord box icon to complete the installation. Depending on your security settings, you may get an error message about "unidentified developers". You can enable the installation by following [these instructions](https://kb.wisc.edu/page.php?id=25443) for installing programs from unidentified developers.
42
+
:::
54
43
55
-
:::::::::::::::::::::::::
56
-
57
-
:::::::::::::::: spoiler
58
-
44
+
::: spoiler
59
45
## macOS - Install with Homebrew (Advanced)
60
46
61
47
Alternatively, participants who are comfortable with the command line can install the geospatial libraries individually using [homebrew](https://brew.sh):
62
48
63
-
```bash
49
+
```bash
64
50
$ brew tap osgeo/osgeo4mac && brew tap --repair
65
51
$ brew install proj
66
52
$ brew install geos
67
53
$ brew install gdal2
68
54
```
55
+
:::
69
56
70
-
:::::::::::::::::::::::::
71
-
72
-
:::::::::::::::: spoiler
73
-
57
+
::: spoiler
74
58
## Linux
75
59
76
60
Steps for installing the geospatial libraries will vary based on which form of Linux you are using. These instructions are adapted from the [`sf` package's `README`](https://github.com/r-spatial/sf).
For **Debian**: The [rocker geospatial](https://github.com/rocker-org/geospatial) Dockerfiles may be helpful. Ubuntu Dockerfiles are found [here](https://github.com/r-spatial/sf/tree/master/inst/docker). These may be helpful to get an idea of the commands needed to install the necessary dependencies.
99
-
100
-
:::::::::::::::::::::::::
83
+
:::
101
84
102
85
### UDUNITS
103
86
104
87
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.
105
88
106
-
:::::::::::::::: spoiler
107
-
89
+
::: spoiler
108
90
## Linux
109
91
110
92
Steps for installing the geospatial will vary based on which form of Linux you are using. These instructions are adapted from the [`sf` package's `README`](https://github.com/r-spatial/sf).
111
93
112
94
For **Ubuntu**:
113
95
114
-
```bash
96
+
```bash
115
97
$ sudo apt-get install libudunits2-dev
116
98
```
117
99
118
100
For **Fedora**:
119
101
120
-
```bash
102
+
```bash
121
103
$ sudo dnf install udunits2-devel
122
104
```
123
105
124
106
For **Arch**:
125
107
126
-
```bash
108
+
```bash
127
109
$ pacaur/yaourt/whatever -S udunits
128
110
```
129
111
130
112
For **Debian**:
131
113
132
-
```bash
114
+
```bash
133
115
$ sudo apt-get install -y libudunits2-dev
134
116
```
135
-
136
-
:::::::::::::::::::::::::
117
+
:::
137
118
138
119
### R
139
120
140
121
Participants who do not already have `R` installed should download and install it.
141
122
142
-
:::::::::::::::: spoiler
143
-
123
+
::: spoiler
144
124
## Windows
145
125
146
126
To install `R`, Windows users should select "Download R for Windows" from RStudio and CRAN's [cloud download page](https://cloud.r-project.org), which will automatically detect a CRAN mirror for you to use. Select the `base` subdirectory after choosing the Windows download page. A `.exe` executable file containing the necessary components of base R can be downloaded by clicking on "Download R 3.x.x for Windows".
127
+
:::
147
128
148
-
:::::::::::::::::::::::::
149
-
150
-
:::::::::::::::: spoiler
151
-
129
+
::: spoiler
152
130
## macOS
153
131
154
132
To install `R`, macOS users should select "Download R for (Mac) OS X" from RStudio and CRAN's [cloud download page](https://cloud.r-project.org), which will automatically detect a CRAN mirror for you to use. A `.pkg` file containing the necessary components of base R can be downloaded by clicking on the first available link (this will be the most recent), which will read `R-3.x.x.pkg`.
133
+
:::
155
134
156
-
:::::::::::::::::::::::::
157
-
158
-
:::::::::::::::: spoiler
159
-
135
+
::: spoiler
160
136
## Linux
161
137
162
138
To install `R`, Linux users should select "Download R for Linux" from RStudio and CRAN's [cloud download page](https://cloud.r-project.org), which will automatically detect a CRAN mirror for you to use. Instructions for a number of different Linux operating systems are available.
163
-
164
-
:::::::::::::::::::::::::
139
+
:::
165
140
166
141
### RStudio
167
142
@@ -171,29 +146,28 @@ RStudio is a GUI for using `R` that is available for Windows, macOS, and various
171
146
172
147
The following `R` packages are used in the various geospatial lessons.
@@ -222,24 +196,21 @@ This option involves downloading an Docker image that contains an installation o
222
196
223
197
Once up and running - you'll have full access to RStudio right from your browser:
224
198
225
-
{alt='RStudio layout in browser showing similarity to desktop layout'}
199
+
{alt="RStudio layout in browser showing similarity to desktop layout"}
226
200
227
201
Please be aware that the `R` package `rasterVis` is not included in the `rocker/geospatial` Docker image. If your instructor teaches with this package then you will need to install this `R` package yourself. All other `R` packages will already be installed for you.
228
202
229
-
:::::::::::::::: spoiler
230
-
203
+
::: spoiler
231
204
## Downloading and Installing Docker Community Edition
232
205
233
206
To get started with Docker, download the [Docker Community Edition](https://www.docker.com/community-edition) from [Docker's store](https://store.docker.com/search?type=edition&offering=community). Community editions are available for [Windows](https://store.docker.com/editions/community/docker-ce-desktop-windows), [macOS](https://store.docker.com/editions/community/docker-ce-desktop-mac), and Linux operating systems including [Debian](https://store.docker.com/editions/community/docker-ce-server-debian), [Fedora](https://store.docker.com/editions/community/docker-ce-server-fedora), and [Ubuntu](https://store.docker.com/editions/community/docker-ce-server-ubuntu).
234
207
235
208
The download pages for each of these operating systems contain notes about some necessary system requirements and other pre-requisites. Once you download the installer and follow the on-screen prompts.
236
209
237
210
Additional installation notes are available in Docker's documentation for each of these operating systems: [Windows](https://docs.docker.com/docker-for-windows/install/), [macOS](https://docs.docker.com/docker-for-mac/install/), [Debian](https://docs.docker.com/install/linux/docker-ce/debian/), [Fedora](https://docs.docker.com/install/linux/docker-ce/fedora/), and [Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/).
211
+
:::
238
212
239
-
:::::::::::::::::::::::::
240
-
241
-
:::::::::::::::: spoiler
242
-
213
+
::: spoiler
243
214
## Using the `rocker/geospatial` Docker Image via the Command Line
244
215
245
216
#### Download and Set-up
@@ -248,23 +219,23 @@ Once Docker is installed and up and running, you will need to open your computer
248
219
249
220
You need to have already installed Docker Community Edition (see instructions above) before proceeding. Once you have Docker downloaded and installed, make sure Docker is running and then enter the following command into the terminal to download the `rocker/geospatial` image:
250
221
251
-
```bash
222
+
```bash
252
223
$ docker pull rocker/geospatial
253
224
```
254
225
255
226
Once the pull command is executed, the image needs to be run to become accessible as a container. In the following example, the image is named `rocker/geospatial` and the container is named `gis`. The [image](https://docs.docker.com/glossary/?term=image) contains the software you've downloaded, and the [container](https://docs.docker.com/glossary/?term=container) is the run-time instance of that image. New Docker users should need only one named container per image.
256
227
257
228
When `docker run` is used, you can specify a folder on your computer to become accessible inside your RStudio Server instance. The following `docker run` command exposes Jane's `GitHub` directory to RStudio Server. Enter the file path where your workshop resources and data are stored:
When she opens her RStudio instance below, she will see a `GitHub` folder in her file tab in the lower righthand corner of the screen. Windows and Linux users will have to adapt the file path above to follow the standards of their operating systems. More details are available on [rocker's Wiki](https://github.com/rocker-org/rocker/wiki/Sharing-files-with-host-machine).
264
235
265
236
The last step before launching your container in a browser is to identify the port that your Docker container is running in:
266
237
267
-
```bash
238
+
```bash
268
239
$ docker port gis
269
240
```
270
241
@@ -274,30 +245,28 @@ An output, for example, of `8787/tcp -> 0.0.0.0:32768` would indicate that you s
274
245
275
246
When you are done with a Docker session, make sure all of your files are saved locally on your computer **before closing your browser and Docker**. Once you have ensured all of your files are available (they should be saved at the file path designated in `docker run` above), you can stop your Docker container in the terminal:
276
247
277
-
```bash
248
+
```bash
278
249
$ docker stop gis
279
250
```
280
251
281
252
#### Re-starting a Container
282
253
283
254
Once a container has been named and created, you cannot create a container with the same name again using `docker run`. Instead, you can restart it:
284
255
285
-
```bash
256
+
```bash
286
257
$ docker start gis
287
258
```
288
259
289
260
If you cannot remember the name of the container you created, you can use the following command to print a list of all named containers:
290
261
291
-
```bash
262
+
```bash
292
263
$ docker ps -a
293
264
```
294
265
295
266
If you are returning to a session after stopping Docker itself, make sure Docker is running again before re-starting your container!
267
+
:::
296
268
297
-
:::::::::::::::::::::::::
298
-
299
-
:::::::::::::::: spoiler
300
-
269
+
::: spoiler
301
270
## Using the `rocker/geospatial` Docker Image via Kitematic
302
271
303
272
#### Download and Install Kitematic
@@ -327,37 +296,32 @@ Paste that url into your browser and, if prompted, enter `rstudio` for both the
327
296
When you are done with a Docker session, make sure all of your files are saved locally on your computer **before closing your browser and Docker**. Once you have ensured all of your files are available (they should be saved at the file path designated in `docker run` above), you can stop your Docker container by clicking on the `Stop` icon in Kitematic's toolbar.
328
297
329
298
You can restart your container later by clicking the `Restart` button.
299
+
:::
330
300
331
-
:::::::::::::::::::::::::
332
-
333
-
:::::::::::::::: spoiler
334
-
301
+
::: spoiler
335
302
## Managing Docker Containers and Images
336
303
337
304
To obtain a list of all of your current Docker containers:
338
305
339
-
```bash
306
+
```bash
340
307
$ docker ps -a
341
308
```
342
309
343
310
To list all of the currently downloaded Docker images:
344
311
345
-
```bash
312
+
```bash
346
313
$ docker images -a
347
314
```
348
315
349
316
These images can take up system resources, and if you'd like to remove them, you can use the `docker prune` command. To remove any Docker resources not affiliated with a container listed under `docker ps -a`:
350
317
351
-
```bash
318
+
```bash
352
319
$ docker system prune
353
320
```
354
321
355
322
To remove **all** Docker resources, including currently named containers:
0 commit comments