Skip to content

Commit 48bc68a

Browse files
author
Leah Wasser
committed
more url fixes - didn't rebuild html lessons
1 parent ccb5203 commit 48bc68a

File tree

3 files changed

+24
-46
lines changed

3 files changed

+24
-46
lines changed

spatial-data-gis-law/2-mon-intro-to-open-gis-qgis.Rmd

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,6 @@ output:
77
theme: cerulean
88
---
99

10-
## Topic
11-
12-
### Introduction
13-
**Purpose:**
14-
15-
16-
### Background:
17-
Brief overview of topic and relationship to scientific synthesis.
18-
1910

2011
### Learning outcomes
2112

@@ -24,7 +15,7 @@ At the end of this 30 minute overview you will be able to:
2415
* Add vector data to QGIS
2516
* Add raster data to QGIS
2617
* Explore the metadata - CRS, resolution, extent of a spatial data layer in QGIS
27-
* Create a basic map in QGIS ??
18+
* Create a basic map in QGIS
2819

2920

3021
## Intro to Quantum GIS (QGIS)
@@ -69,7 +60,7 @@ then see a list of plugins - similar to the list below.
6960

7061
![QGIS plugins](http://underdark.files.wordpress.com/2014/04/installpluginbuilder.png)
7162

72-
A few of my favorite plugins
63+
A few favorite plugins:
7364

7465
* **Value tool:** A MUST if you work with raster data. use this to view the value of a pixel in a raster dataset like you would the identify tool in ArcMap.
7566
* **MapSwipeTool:** A cool tool if you want to view before/ after rasters and look at differences.
@@ -79,4 +70,4 @@ line access to the tool.
7970

8071
## Challenge
8172

82-
If there's time...create a map of the Gulf of mexico.
73+
Create a map of the Gulf of mexico.

spatial-data-gis-law/2-mon-intro-to-open-gis-qgis.html

Lines changed: 4 additions & 15 deletions
Large diffs are not rendered by default.

spatial-data-gis-law/3-mon-intro-gis-in-r.Rmd

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ At the end of this 30 minute overview you will be able to:
2323

2424
## Work with vector data in R
2525

26-
<a href="https://earthdatascience.org/course-materials/earth-analytics/week-4/intro-vector-data-r/" target="_blank">Intro to vector data in R - Earth Data Science website</a>
26+
<a href="https://earthdatascience.org/courses/earth-analytics/spatial-data-r/intro-vector-data-r/" target="_blank">Introduction to vector data in R - Earth Data Science website</a>
2727

28-
![Point, line OR polygon features can be stored within a vector dataset ](https://earthdatascience.org/images/course-materials/earth-analytics/week-5/pnt_line_poly.png)
28+
![Point, line OR polygon features can be stored within a vector dataset ](https://earthdatascience.org/images/courses/earth-analytics/spatial-data/points-lines-polygons-vector-data-types.png)
2929

3030
There are many ways to import and map vector data in R.
3131

3232
To read the data, you have several options
3333

3434
* `sp`: Import shapefiles and other data using `readOGR()` from the `sp` package
3535
* `sp`: more recently the `sf` package has proved to be both faster and more efficient that `sp`
36-
* if you have geojson data - there are several json packages that you can use - check out <a href="https://earthdatascience.org/course-materials/earth-analytics/week-10/co-water-data-spatial-r/">this tutorial on dealing with geojson imported from API's in R if you're interested in learning more</a>.
36+
* if you have geojson data - there are several json packages that you can use - check out <a href="https://earthdatascience.org/courses/earth-analytics/week-10/co-water-data-spatial-r/">this tutorial on dealing with geojson imported from API's in R if you're interested in learning more</a>.
3737

3838
```{r setup, include=FALSE}
3939
knitr::opts_chunk$set(echo = TRUE, message = FALSE)
@@ -361,8 +361,8 @@ base plot pros: faster maps, more difficult
361361

362362
| Tool | Pros | Cons |
363363
|---|---|---|---|---|
364-
| ggplot() | templated maps, easy to standardize, clean mapping code, simple fast legends | need to convert sp objects from `readOGR()` to a data frame |
365-
| BASE R plot() | faster mapping, supports sp objects natively | legends are tedious to create and customize |
364+
| `ggplot()` | templated maps, easy to standardize, clean mapping code, simple fast legends | need to convert sp objects from `readOGR()` to a data frame |
365+
| BASE R `plot()` | faster mapping, supports sp objects natively | legends are tedious to create and customize |
366366
| | | |
367367
===
368368

@@ -383,7 +383,7 @@ plot(gulf_study_area_wgs84,
383383

384384
Finally it is always nice to create interactive maps. This allows your
385385
colleagues to not only see but also interact with your data.
386-
Let's use mapview() to create a quick interactive map.
386+
Let's use `mapview()` to create a quick interactive map.
387387

388388
To use mapview with multpile layers, you simply create a mapview
389389
object for each layer and then add them together to produce a final plot.
@@ -419,14 +419,14 @@ community around it and is a standard for most raster operations in `R`.
419419

420420
To load a raster layer with a single band - we use `raster()`.
421421

422-
![raster bands](https://earthdatascience.org/images/course-materials/earth-analytics/week-6/single_multi_raster.png)
422+
![raster bands](https://earthdatascience.org/images/courses/earth-analytics/raster-data/single-vs-multi-band-raster-data.png)
423423

424424
A raster layer can have one or depending on the format more than 1 band of information stored within it. Sometimes those bands are for images (see below) and will be RGB or in the case of a multi or hyperspectral
425425
remote sensing instrument - hundreds of bands across the light spectrum.
426426

427427
Sometimes those bands will be time series (for example climate data which we will work with tomorrow).
428428

429-
![RGB raster bands ](https://earthdatascience.org/images/course-materials/earth-analytics/week-6/RGBSTack_1.jpg)
429+
![RGB raster bands ](https://earthdatascience.org/images/course-materials/earth-analytics/raster-data/RGB-bands-raster-stack.jpg)
430430

431431
Below we will simply open a single band. The data format is .asc which
432432
is an ESRI format that is text based. ASC files contain a header where the key metadata are described.
@@ -441,12 +441,12 @@ NODATA_value -9999
441441
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 0 0 0 0 0 0 -2 -2 -2 -2 -2 0 0 -4 0 -2 -2 -3 -2 -2 -3 -6 -5 -9 -12 -10 -7 -2 -2 -3 -3 -2 -4 -6 -8 -7 -8 -9 -9 -8 -9 -10 -10 -10 -11 -12 -12 -13 -12 -12 -12 -12 -13 -13 -13 -13 -14 -15 -14 -14 -14 -15 -14 -15 -14 -14 -15 -16 -16 -16 -16 -16 -16 -16 -17 -18 -19 -20 -20 -20 -20 -22 -22 -22 -22 -22 -21 -22 -23 -23 -23 -22 -23 -24 -25 -25 -25 -26 -26 -26 -26 -26 -25 -25 -24 -24 -24 -24 -24 -24 -23 -24 -25 -26 -26 -26 -27 -28 -27 -28 -28 -27 -27 -27 -27 -27 -28 -29 -29 -29 -29 -29 -28 -29 -30 -31 -31 -32 -32 -33 -33 -33 -34 -34 -34 -35 -36 -36 -36 -36 -36 -36 -36 -36 -36 -34 -36 -37 -37 -38 -38 -39 -39 -39
442442
```
443443

444-
We can open an .asc layer using the raster() function. Note that this
444+
We can open an `.asc` layer using the `raster()` function. Note that this
445445
same process can be used with geotiffs and many other raster formats.
446446
The raster package is adept at figuring out what format of data you are
447447
providing it and using the correct drivers to open and read in the data!
448448

449-
The raster package also has a wrapper around the base plot() function
449+
The raster package also has a wrapper around the base `plot()` function
450450
allowing us to plot data using the same approach that we used above!
451451

452452
```{r}
@@ -516,7 +516,7 @@ plot(coastlines_crop,
516516

517517
## when rasters don't line up
518518

519-
we can use the projectRaster() function to reproject raster data in the same way we use spTransform() with
519+
we can use the `projectRaster()` function to reproject raster data in the same way we use spTransform() with
520520
vector data.
521521

522522

@@ -592,7 +592,7 @@ plot(us_states,
592592

593593
## Static basemaps in R
594594

595-
You can also create static basemaps quickly in R. Below we use ggmap()
595+
You can also create static basemaps quickly in `R`. Below we use `ggmap()`
596596
to create a basemap for a particular lat/long location.
597597

598598
```{r}
@@ -603,8 +603,8 @@ library(ggmap)
603603

604604
Let's create a basemap!
605605

606+
<a href="https://earthdatascience.org/courses/earth-analytics/lidar-raster-data-r/ggmap-basemap/" target="_blank">Create basemaps with ggmap in R - Earth Data Science website </a>
606607

607-
https://earthdatascience.org/course-materials/earth-analytics/week-3/ggmap-basemap/
608608

609609
```{r, eval=FALSE}
610610
# get map
@@ -617,7 +617,7 @@ ggmap(sq_map)
617617

618618
Your turn -- try a different maptype
619619

620-
Hint: use ??get_map to find different options
620+
Hint: use `??get_map` to find different options
621621

622622

623623
```{r, eval=FALSE}
@@ -654,8 +654,6 @@ us_states_data <- left_join(us_states_df,
654654
us_states@data,
655655
by="id")
656656
657-
658-
659657
# convert to numeric
660658
us_states_data$ALAND <- as.numeric(us_states_data$ALAND)
661659
us_states_data$HD01_VD <- as.numeric(us_states_data$HD01_VD)
@@ -727,8 +725,8 @@ library(ggplot2)
727725
grayscale <- grey.colors(100, start = 0.3, end = 0.9, gamma = 2.2)
728726
ggplot() +
729727
geom_tile(data = hillshade_crop_df, aes(x = x, y = y, fill = value)) + scale_fill_distiller(palette = "Greys") +
730-
geom_polygon(data=us_states_df, aes(x = long, y = lat, group = group), fill = NA, color = "black") +
731-
coord_fixed(xlim = c(-100, -70), ylim=c(10, 32))
728+
geom_polygon(data = us_states_df, aes(x = long, y = lat, group = group), fill = NA, color = "black") +
729+
coord_fixed(xlim = c(-100, -70), ylim = c(10, 32))
732730
733731
734732
@@ -741,7 +739,7 @@ ggplot() +
741739
742740
743741
plot(hillshade_crop,
744-
col=grey.colors(100, 0,1))
742+
col = grey.colors(100, 0,1))
745743
746744
```
747745

0 commit comments

Comments
 (0)