Skip to content

Commit 8406076

Browse files
committed
adjusted fenced divs to fix display issues in plotting tip and challenges
1 parent df1f784 commit 8406076

File tree

1 file changed

+28
-31
lines changed

1 file changed

+28
-31
lines changed

episodes/01-raster-structure.Rmd

Lines changed: 28 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -176,22 +176,23 @@ ggplot() +
176176
coord_quickmap()
177177
```
178178

179-
::::::::::::::::::::::::::::::::::::::::: callout
179+
:::::::::::::::: callout
180180

181181
## Plotting Tip
182182

183183
More information about the Viridis palette used above at
184184
[R Viridis package documentation](https://cran.r-project.org/web/packages/viridis/vignettes/intro-to-viridis.html).
185185

186+
::::::::::::::::::
186187

187-
::::::::::::::::::::::::::::::::::::::::::::::::::
188188

189-
::::::::::::::::::::::::::::::::::::::::: callout
189+
::::::::::::::::::::::::::::::::::::::::: challenge
190190

191191
## Plotting Tip
192192

193193
For faster, simpler plots, you can use the `plot` function from the `terra` package.
194194

195+
195196
::::::::::::::: solution
196197

197198
## Show plot
@@ -202,9 +203,10 @@ See `?plot` for more arguments to customize the plot
202203
plot(DSM_HARV)
203204
```
204205

205-
:::::::::::::::::::::::::
206+
:::::::::::::::::
207+
208+
:::::::::::::::::::::::::::::::::::::::::::
206209

207-
::::::::::::::::::::::::::::::::::::::::::::::::::
208210

209211
This map shows the elevation of our study site in Harvard Forest. From the
210212
legend, we can see that the maximum elevation is ~400, but we can't tell whether
@@ -238,8 +240,6 @@ What units are our data in?
238240

239241
`+units=m` tells us that our data is in meters.
240242

241-
242-
243243
:::::::::::::::::::::::::
244244

245245
::::::::::::::::::::::::::::::::::::::::::::::::::
@@ -443,7 +443,7 @@ raster's metadata. If a `NoDataValue` was stored in the GeoTIFF tag, when R
443443
opens up the raster, it will assign each instance of the value to `NA`. Values
444444
of `NA` will be ignored by R as demonstrated above.
445445

446-
::::::::::::::::::::::::::::::::::::::::: callout
446+
::::::::::::::::::::::::::::::::::::::::: challenge
447447

448448
## Challenge
449449

@@ -460,8 +460,6 @@ describe(sources(DSM_HARV))
460460

461461
`NoDataValue` are encoded as -9999.
462462

463-
464-
465463
:::::::::::::::::::::::::
466464

467465
::::::::::::::::::::::::::::::::::::::::::::::::::
@@ -547,41 +545,40 @@ was created using the default of 30 bins. The distribution of elevation values
547545
for our `Digital Surface Model (DSM)` looks reasonable. It is likely there are
548546
no bad data values in this particular raster.
549547

550-
> ## Challenge: Explore Raster Metadata
551-
>
552-
> Use `describe()` to determine the following about the `NEON-DS-Airborne-Remote-Sensing/HARV/DSM/HARV_DSMhill.tif` file:
553-
>
554-
> 1. Does this file have the same CRS as `DSM_HARV`?
555-
> 2. What is the `NoDataValue`?
556-
> 3. What is resolution of the raster data?
557-
> 4. How large would a 5x5 pixel area be on the Earth's surface?
558-
> 5. Is the file a multi- or single-band raster?
559-
>
560-
> Notice: this file is a hillshade. We will learn about hillshades in the [Working with[Multi-band Rasters in R](05-raster-multi-band-in-r/) episode.
561-
>
562-
> > ## Answers
563-
> >
564-
> > ```{r challenge-code-attributes}
565-
> > ```
566-
567-
describe("data/NEON-DS-Airborne-Remote-Sensing/HARV/DSM/HARV\_DSMhill.tif")
568-
569548
::::::::::::::::::::::::::::::::::::::: challenge
570549

550+
## Challenge: Explore Raster Metadata
551+
552+
Use `describe()` to determine the following about the `NEON-DS-Airborne-Remote-Sensing/HARV/DSM/HARV_DSMhill.tif` file:
553+
554+
1. Does this file have the same CRS as `DSM_HARV`?
555+
2. What is the `NoDataValue`?
556+
3. What is resolution of the raster data?
557+
4. How large would a 5x5 pixel area be on the Earth's surface?
558+
5. Is the file a multi- or single-band raster?
559+
560+
Notice: this file is a hillshade. We will learn about hillshades in the [Working with Multi-band Rasters in R](05-raster-multi-band-in-r/) episode.
561+
571562
::::::::::::::: solution
572563

564+
## Answers
565+
566+
```{r challenge-code-attributes}
567+
describe("data/NEON-DS-Airborne-Remote-Sensing/HARV/DSM/HARV_DSMhill.tif")
573568
```
569+
570+
574571
1. If this file has the same CRS as DSM_HARV? Yes: UTM Zone 18, WGS84, meters.
575572
2. What format `NoDataValues` take? -9999
576573
3. The resolution of the raster data? 1x1
577574
4. How large a 5x5 pixel area would be? 5mx5m How? We are given resolution of 1x1 and units in meters, therefore resolution of 5x5 means 5x5m.
578575
5. Is the file a multi- or single-band raster? Single.
579-
```
580576

581-
:::::::::::::::::::::::::
577+
:::::::::::::::
582578

583579
::::::::::::::::::::::::::::::::::::::::::::::::::
584580

581+
585582
::::::::::::::::::::::::::::::::::::::::: callout
586583

587584
## More Resources

0 commit comments

Comments
 (0)