-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
47 lines (34 loc) · 1.57 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
date: "Last updated `r Sys.Date()`"
output: github_document
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# MDCSpatialData
MDCSpatialData provides spatial data sets in tabular or other R-compatible forms (sf, terra) for easy access by MDC staff or others. All data objects are projected in NAD83 UTM15N unless otherwise noted. Measurement attriubutes in spatial objects (e.g., sf, terra) may not be based on the projected coordinate system. All tabular data calculations have been performed on spatial data using NAD83 UTM15N.
## Installation
You can install the MDChelp from [GitHub](https://github.com/) with:
``` {r, eval=FALSE}
# install.packages("devtools")
devtools::install_github("tlyons253/MDCSpatialData")
```
## Examples
On advantage to having these spatial data sets in a separate package is they do not need to be read into memory to be processed; they don't need to take up RAM in their raw format.
For example, if you wanted to clip flowlines to Boone County you might normally try:
```{r, eval=FALSE}
MDCSpatialData::nhd.flowline.mo->flowlines
MDCSpatialData::counties.mo->counties
sf::st_intersection(flowlines,counties)->boone.flow
rm(flowlines) # remove the raw flowlines file
```
But that reads in all flowlines in the state. A more memory friendly version that doesn't keep the raw flowlines file in the environment is:
```{r,eval=FALSE}
sf::st_intersection(MDCSpatialData::nhd.flowline.mo,
MDCSpatialData::counties.mo)->boone.flow
```