Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejohnson51 committed May 22, 2024
1 parent e5eae57 commit 8257b60
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 15 deletions.
28 changes: 19 additions & 9 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,34 @@ devtools::install_github("lynker-spatial/hfsubsetR")

## Remote Access

This is a basic example which shows you how to solve a common problem:
This is a basic example showing how to access hydrofabric data (reference v2.2) upstream of COMID 101 from remote parquet datasets hosted by [lynker-spatial](https://staging.lynker-spatial.com/).

```{r remote}
## basic example code
```{r remote, eval = FALSE}
library(hfsubsetR)
get_subset(comid = 101,
source = "s3://lynker-spatial/hydrofabric",
type = 'reference',
hf_version = "2.2")
```

## Local

This is a basic example which shows you how to solve a common problem:
This is a basic example showing how to access the same hydrofabric data from local parquet datasets:

```{r local}
## basic example code
```{r local, eval = FALSE}
get_subset(comid = 101, source = "/Volumes/MyBook/conus-hydrofabric")
```

## Hydrolocation Extraction

This is a basic example which shows you how to solve a common problem:
This is a basic example showing how to access the same hydrolocation data from a local parquet dataset. A remote source could be used identically:

```{r hydrolocation, eval = FALSE}
# Could use remote source too!
source <- '/Volumes/MyBook/conus-hydrofabric'
```{r hydrolocation}
## basic example code
pois <- arrow::open_dataset(glue::glue("{source}/v2.2/conus_hl")) |>
dplyr::filter(hl_source == 'GFv20') |>
dplyr::collect()
```
27 changes: 21 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,39 @@ devtools::install_github("lynker-spatial/hfsubsetR")

## Remote Access

This is a basic example which shows you how to solve a common problem:
This is a basic example showing how to access hydrofabric data
(reference v2.2) upstream of COMID 101 from remote parquet datasets
hosted by [lynker-spatial](https://staging.lynker-spatial.com/).

``` r
## basic example code
library(hfsubsetR)

get_subset(comid = 101,
source = "s3://lynker-spatial/hydrofabric",
type = 'reference',
hf_version = "2.2")
```

## Local

This is a basic example which shows you how to solve a common problem:
This is a basic example showing how to access the same hydrofabric data
from local parquet datasets:

``` r
## basic example code
get_subset(comid = 101, source = "/Volumes/MyBook/conus-hydrofabric")
```

## Hydrolocation Extraction

This is a basic example which shows you how to solve a common problem:
This is a basic example showing how to access the same hydrolocation
data from a local parquet dataset. A remote source could be used
identically:

``` r
## basic example code
# Could use remote source too!
source <- '/Volumes/MyBook/conus-hydrofabric'

pois <- arrow::open_dataset(glue::glue("{source}/v2.2/conus_hl")) |>
dplyr::filter(hl_source == 'GFv20') |>
dplyr::collect()
```

0 comments on commit 8257b60

Please sign in to comment.