Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jsta/nhdR
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.5.1
Choose a base ref
...
head repository: jsta/nhdR
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Mar 4, 2019

  1. stash logo generating code

    jsta committed Mar 4, 2019
    Copy the full SHA
    0762cba View commit details
  2. towards logo arrangement

    jsta committed Mar 4, 2019
    Copy the full SHA
    518d967 View commit details
  3. image distortion

    jsta committed Mar 4, 2019
    Copy the full SHA
    0639e66 View commit details
  4. logo infrastructure

    jsta committed Mar 4, 2019
    Copy the full SHA
    b518a2c View commit details

Commits on Mar 27, 2019

  1. add failing query test for #57

    jsta committed Mar 27, 2019
    Copy the full SHA
    af6dc88 View commit details
  2. Copy the full SHA
    7e92121 View commit details
  3. Copy the full SHA
    a16d99d View commit details
  4. Copy the full SHA
    acc2355 View commit details
  5. Copy the full SHA
    f4aa7c3 View commit details

Commits on Mar 28, 2019

  1. callout bugfix

    jsta committed Mar 28, 2019
    Copy the full SHA
    723d577 View commit details
  2. stash logo progress

    jsta committed Mar 28, 2019
    Copy the full SHA
    513626b View commit details
  3. glphy cutout

    jsta committed Mar 28, 2019
    Copy the full SHA
    62518f2 View commit details
  4. add logo badge

    jsta committed Mar 28, 2019
    Copy the full SHA
    5290a6d View commit details
  5. stash logo

    jsta committed Mar 28, 2019
    Copy the full SHA
    1578846 View commit details
  6. stash vpu image

    jsta committed Mar 28, 2019
    Copy the full SHA
    832b928 View commit details
  7. typo fix

    jsta committed Mar 28, 2019
    Copy the full SHA
    df03292 View commit details

Commits on Mar 29, 2019

  1. towards case fixes

    jsta committed Mar 29, 2019
    Copy the full SHA
    1aa7144 View commit details

Commits on Apr 27, 2019

  1. case fixes for logo

    jsta committed Apr 27, 2019
    Copy the full SHA
    1706cb6 View commit details
  2. lighten logo background

    jsta committed Apr 27, 2019
    Copy the full SHA
    d6442b4 View commit details
  3. rm internal stream lines

    jsta committed Apr 27, 2019
    Copy the full SHA
    9b441a3 View commit details
  4. reorganize

    jsta committed Apr 27, 2019
    Copy the full SHA
    9be7c2a View commit details
  5. zoom in for logo

    jsta committed Apr 27, 2019
    Copy the full SHA
    fa7e18e View commit details
  6. try bold face for logo

    jsta committed Apr 27, 2019
    Copy the full SHA
    a067891 View commit details
  7. adjust text spacing

    jsta committed Apr 27, 2019
    Copy the full SHA
    e01b569 View commit details
  8. stash gh card image

    jsta committed Apr 27, 2019
    Copy the full SHA
    8b6dbc1 View commit details

Commits on May 1, 2019

  1. Copy the full SHA
    114c2d8 View commit details
  2. prep for CRAN release

    jsta committed May 1, 2019
    Copy the full SHA
    5a422ee View commit details
  3. spell check sesson typo

    jsta committed May 1, 2019
    Copy the full SHA
    baffaaa View commit details
  4. build roxygen

    jsta committed May 1, 2019
    Copy the full SHA
    9008f09 View commit details
  5. make logo a hyperlink

    jsta committed May 1, 2019
    Copy the full SHA
    feb4a1d View commit details

Commits on May 24, 2019

  1. drop RCurl, closes #59

    jsta committed May 24, 2019
    Copy the full SHA
    7afdf4b View commit details

Commits on May 25, 2019

  1. fight with tic

    jsta committed May 25, 2019
    Copy the full SHA
    ccf4859 View commit details
  2. fight with tic

    jsta committed May 25, 2019
    Copy the full SHA
    84ea7a9 View commit details
  3. fight with pkgdown

    jsta committed May 25, 2019
    Copy the full SHA
    c80f9fc View commit details
  4. fight with tic

    jsta committed May 25, 2019
    Copy the full SHA
    c9cca90 View commit details

Commits on Aug 6, 2019

  1. stash load testing file

    jsta committed Aug 6, 2019
    Copy the full SHA
    d409742 View commit details

Commits on Aug 8, 2019

  1. Copy the full SHA
    b6077f6 View commit details
  2. skip cran/travis

    jsta committed Aug 8, 2019
    Copy the full SHA
    1bab483 View commit details

Commits on Nov 19, 2019

  1. add citation file

    jsta committed Nov 19, 2019
    Copy the full SHA
    23cf8c1 View commit details

Commits on Nov 20, 2019

  1. typo fix

    jsta committed Nov 20, 2019
    Copy the full SHA
    c759014 View commit details

Commits on Jan 9, 2020

  1. upgrade roxygen

    jsta committed Jan 9, 2020
    Copy the full SHA
    e1ee5b9 View commit details

Commits on Jan 16, 2020

  1. attempt osx travis

    jsta committed Jan 16, 2020
    Copy the full SHA
    fef6c61 View commit details
  2. Copy the full SHA
    49a031f View commit details
  3. Copy the full SHA
    697f944 View commit details
  4. memoise onload, closes #60

    jsta committed Jan 16, 2020
    Copy the full SHA
    1b96c85 View commit details

Commits on Mar 23, 2020

  1. update url endpoint for nhdplus

    jsta committed Mar 23, 2020
    Copy the full SHA
    d6cae2b View commit details
  2. more link fixes

    jsta committed Mar 23, 2020
    Copy the full SHA
    a831846 View commit details
  3. Copy the full SHA
    3b63645 View commit details
  4. prep for release

    jsta committed Mar 23, 2020
    Copy the full SHA
    afb5916 View commit details
  5. dl data for tests

    jsta committed Mar 23, 2020
    Copy the full SHA
    55dd881 View commit details
Showing with 2,119 additions and 849 deletions.
  1. +13 −0 .Rbuildignore
  2. +93 −0 .github/workflows/R-CMD-check.yml
  3. +10 −0 .gitignore
  4. +0 −50 .travis.yml
  5. +13 −13 DESCRIPTION
  6. +6 −3 NAMESPACE
  7. +56 −8 NEWS.md
  8. +35 −32 R/get.R
  9. +11 −11 R/info.R
  10. +13 −14 R/list.R
  11. +233 −131 R/load.R
  12. +198 −95 R/network.R
  13. +185 −74 R/query.R
  14. +194 −97 R/utils.R
  15. +10 −3 R/zzz.R
  16. +86 −62 README.Rmd
  17. +96 −63 README.md
  18. +3 −2 cran-comments.md
  19. +9 −5 data-raw/get-vpu-shp.R
  20. +52 −0 data-raw/get-vpu_key.R
  21. BIN data/vpu_shp.rda
  22. +17 −0 inst/CITATION
  23. BIN inst/vpu_key.rds
  24. BIN logo/gh-card.png
  25. +120 −0 logo/logo_hex-streams.R
  26. +5 −2 man/bbox2poly.Rd
  27. +25 −6 man/extract_network.Rd
  28. BIN man/figures/README-unnamed-chunk-4-1.png
  29. BIN man/figures/logo.png
  30. +22 −0 man/find_state.Rd
  31. +8 −5 man/find_vpu.Rd
  32. +4 −0 man/great_lakes.Rd
  33. +25 −5 man/leaf_reaches.Rd
  34. +43 −0 man/nhd_dl_state.Rd
  35. +7 −1 man/nhd_get.Rd
  36. +3 −0 man/nhd_info.Rd
  37. +3 −0 man/nhd_list.Rd
  38. +22 −2 man/nhd_load.Rd
  39. +13 −2 man/nhd_plus_get.Rd
  40. +3 −0 man/nhd_plus_info.Rd
  41. +3 −1 man/nhd_plus_list.Rd
  42. +25 −5 man/nhd_plus_load.Rd
  43. +23 −12 man/nhd_plus_query.Rd
  44. +37 −5 man/nhd_query.Rd
  45. +9 −6 man/select_point_overlay.Rd
  46. +3 −0 man/select_poly_overlay.Rd
  47. +27 −11 man/terminal_reaches.Rd
  48. +29 −0 man/tip_reaches.Rd
  49. +4 −1 man/toUTM.Rd
  50. +0 −21 nhdR.Rproj
  51. +3 −1 tests/testthat.R
  52. +7 −0 tests/testthat/test-7z.R
  53. +73 −8 tests/testthat/test-get.R
  54. +7 −5 tests/testthat/test-info.R
  55. +11 −8 tests/testthat/test-list.R
  56. +96 −0 tests/testthat/test-load.R
  57. +25 −20 tests/testthat/test-network.R
  58. +68 −14 tests/testthat/test-query.R
  59. +9 −6 tests/testthat/test-utils.R
  60. +0 −15 tic.R
  61. +4 −3 vignettes/demo.Rmd
  62. +14 −14 vignettes/flow.Rmd
  63. +6 −7 vignettes/network.Rmd
13 changes: 13 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -15,3 +15,16 @@ docs
postgis_vs_shp.R
rosm.cache
.V8history
logo
^\.ccache$
^\.github$
test_file
test.R
.vscode
README.html
^.*\.gpkg$
pkgdown
Makefile
^CRAN-SUBMISSION$
^doc$
^Meta$
93 changes: 93 additions & 0 deletions .github/workflows/R-CMD-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
workflow_dispatch:
schedule:
- cron: '0 0 4 * *'

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}

- uses: r-lib/actions/setup-pandoc@v2

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install system dependencies
if: runner.os == 'Linux'
run: |
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
- name: Install Python dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3-virtualenv
sudo apt-get install python3-venv
shell: /bin/bash {0}

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -11,3 +11,13 @@ rosm.cache/
.V8history
data-raw/get-huc-shp.R
CRAN-RELEASE
docs/
test.R
.vscode/
README.html
*.gpkg
logo
pkgdown
CRAN-SUBMISSION
/doc/
/Meta/
50 changes: 0 additions & 50 deletions .travis.yml

This file was deleted.

26 changes: 13 additions & 13 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
Package: nhdR
Title: Tools for working with the National Hydrography Dataset
Version: 0.5.1
Authors@R: person("Joseph", "Stachelek", email = "stachel2@msu.edu", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-5924-2464"))
Title: Tools for Working with the National Hydrography Dataset
Version: 0.6.1
Authors@R: person("Jemma", "Stachelek", email = "jemma.stachelek@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-5924-2464"))
Description: Tools for working with the National Hydrography Dataset, with
functions for querying, downloading, and networking both the NHD
<https://www.usgs.gov/core-science-systems/ngp/national-hydrography>
and NHDPlus <http://www.horizon-systems.com/nhdplus> datasets.
<https://www.usgs.gov/national-hydrography>
and NHDPlus <https://www.epa.gov/waterdata/nhdplus-national-hydrography-dataset-plus> datasets.
URL: https://github.com/jsta/nhdR
BugReports: https://github.com/jsta/nhdR/issues
Depends:
R (>= 3.3),
R (>= 3.5.0),
maps
License: GPL
Imports:
rappdirs,
rgdal,
sf,
httr,
rvest,
xml2,
foreign,
ggplot2,
gdalUtils,
rlang,
dplyr,
curl,
units,
stringr,
memoise,
purrr
purrr,
digest
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.1.1
RoxygenNote: 7.2.3
Suggests:
knitr,
rmarkdown,
wikilake,
sp,
rgeos,
testthat,
testthat (>= 2.1.0),
covr,
RCurl
crul,
lwgeom,
s2
VignetteBuilder: knitr
SystemRequirements: 7-zip command line tool (7z)
Language: en-US
9 changes: 6 additions & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ export(extract_network)
export(find_vpu)
export(great_lakes)
export(leaf_reaches)
export(nhd_dl_state)
export(nhd_get)
export(nhd_info)
export(nhd_list)
@@ -18,29 +19,29 @@ export(nhd_query)
export(select_point_overlay)
export(select_poly_overlay)
export(terminal_reaches)
export(tip_reaches)
export(toUTM)
import(datasets)
import(maps)
importFrom(curl,has_internet)
importFrom(digest,digest)
importFrom(dplyr,select)
importFrom(dplyr,src_sqlite)
importFrom(dplyr,tbl)
importFrom(foreign,read.dbf)
importFrom(gdalUtils,ogr2ogr)
importFrom(ggplot2,map_data)
importFrom(httr,GET)
importFrom(httr,progress)
importFrom(httr,write_disk)
importFrom(memoise,cache_memory)
importFrom(memoise,memoise)
importFrom(purrr,transpose)
importFrom(rgdal,ogrInfo)
importFrom(rgdal,ogrListLayers)
importFrom(rlang,.data)
importFrom(rlang,quo)
importFrom(rvest,html_attrs)
importFrom(rvest,html_nodes)
importFrom(sf,"st_crs<-")
importFrom(sf,gdal_utils)
importFrom(sf,st_area)
importFrom(sf,st_as_sf)
importFrom(sf,st_as_sfc)
@@ -53,6 +54,7 @@ importFrom(sf,st_distance)
importFrom(sf,st_drivers)
importFrom(sf,st_intersects)
importFrom(sf,st_join)
importFrom(sf,st_layers)
importFrom(sf,st_point)
importFrom(sf,st_read)
importFrom(sf,st_sfc)
@@ -64,3 +66,4 @@ importFrom(units,as_units)
importFrom(utils,capture.output)
importFrom(utils,unzip)
importFrom(xml2,read_html)
importFrom(xml2,read_xml)
64 changes: 56 additions & 8 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,73 @@
# nhdR 0.5.1
## nhdR 0.6.1

* Update nhdplus download endpoint (#92)

## nhdR 0.6.0

* Dropped use of the retiring `rgdal` package (#91)

* Added NHD support for AK, missing territories (#90), thanks @hrecht !

## nhdR 0.5.9

* Fix upstream dependency issue with the `digest` package (#89)

## nhdR 0.5.8

* Updated nhd and nhdplus downloading endpoints

## nhdR 0.5.7

* `nhd_query` now accepts polygon queries (#85)
* Enabled speedier `nhd_load`(ing) with `wkt_filter` and `query` arguments (#85)

## nhdR 0.5.6

* CRAN maintenance release
* Added support for recent `sf` package versions depending on `s2` geometry

## nhdR 0.5.5

* Drop automatic conversion to Geopackage for NHD (non-plus) products
* Massive (~30x) speed improvement for `nhd_plus` query operations (#63)
* Bug fix for loading `NHDReachCrossReference` layers (#72)
* Bug fix to make `vpu_shp` geometries "valid" (#70)

## nhdR 0.5.4

* Update URL endpoint for NHDPlus (#64)
* Bug fix for `nhd_plus_get` unzipping to enable the `force_unzip` argument

## nhdR 0.5.3

* Update URL endpoint for NHDPlus
* Fix crs tests for upcoming sf release

## nhdR 0.5.2

* Bug fix for multi-vpu data loading with mismatched columns (#57)
* Bug fix for character VPUs that match multiple remote data sources (#58)
* Added package logo

## nhdR 0.5.1

* Critical bug fix for `nhd_get` recursive folder creation (# 56)
* Bug fixes for `extract_network` enabling propagation of `approve_all_dl` flag
* Improved documentation of non-geographic buffer extraction

# nhdR 0.5.0
## nhdR 0.5.0

* Improve `extract_network` to handle headwater lakes
* Improve `extract_network` to handle headwater lakes
* Add function to return Great Lakes polygons
* Enable non-geographic query buffers
* Fix broken NHD download endpoint
* Bug fixes for `nhd_plus_query` on multi vpu queries

# nhdR 0.4
## nhdR 0.4

* Confirmed working operation on MacOS
* Results of load functions are now cached (memoized) for massive increase in package speed

# nhdR 0.3
## nhdR 0.3

* Added a `NEWS.md` file to track changes to the package.



Loading