{"id":22463740,"url":"https://github.com/poissonconsulting/fwapgr","last_synced_at":"2025-08-02T05:32:29.757Z","repository":{"id":38747552,"uuid":"263405534","full_name":"poissonconsulting/fwapgr","owner":"poissonconsulting","description":"An R Client for BC Freshwater Atlas Web API","archived":false,"fork":false,"pushed_at":"2024-03-25T23:50:27.000Z","size":23849,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-03-26T00:35:14.797Z","etag":null,"topics":["bc","freshwater-atlas","fwapg","r"],"latest_commit_sha":null,"homepage":"https://poissonconsulting.github.io/fwapgr","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/poissonconsulting.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-05-12T17:30:09.000Z","updated_at":"2024-01-01T12:41:44.000Z","dependencies_parsed_at":"2024-02-15T03:27:47.947Z","dependency_job_id":"a8e03941-681b-4341-9ce3-f8c3b9a2b7ee","html_url":"https://github.com/poissonconsulting/fwapgr","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poissonconsulting%2Ffwapgr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poissonconsulting%2Ffwapgr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poissonconsulting%2Ffwapgr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poissonconsulting%2Ffwapgr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poissonconsulting","download_url":"https://codeload.github.com/poissonconsulting/fwapgr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228439452,"owners_count":17920026,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bc","freshwater-atlas","fwapg","r"],"created_at":"2024-12-06T09:13:56.321Z","updated_at":"2025-08-02T05:32:29.746Z","avatar_url":"https://github.com/poissonconsulting.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\nlibrary(ggplot2)\nlibrary(sf)\nlibrary(fwapgr)\n```\n\n# fwapgr \u003cimg src=\"man/figures/logo.png\" align=\"right\" /\u003e\n\n\u003c!-- badges: start --\u003e\n[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)\n[![R-CMD-check](https://github.com/poissonconsulting/fwapgr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/poissonconsulting/fwapgr/actions/workflows/R-CMD-check.yaml)\n[![Codecov test coverage](https://codecov.io/gh/poissonconsulting/fwapgr/graph/badge.svg)](https://app.codecov.io/gh/poissonconsulting/fwapgr)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/license/mit/)\n\u003c!-- badges: end --\u003e\n\n`fwapgr` is an R package that uses the [fwapg API](https://features.hillcrestgeo.ca/fwa/index.html) to query the [Freshwater Atlas](https://www2.gov.bc.ca/gov/content/data/geographic-data-services/topographic-data/freshwater) (FWA) of British Columbia (BC).\nThe functions and arguments in `fwapgr` match those available in the API.\n\nIf you are looking for a higher-level R package to query the FWA of BC see [`fwatlasbc`](https://github.com/poissonconsulting/fwatlasbc) which wraps `fwapgr`.\n\n## Installation\n\nTo install the lastest version from [GitHub](https://github.com/poissonconsulting/fwapgr)\n```{r, eval=FALSE}\n# install.packages(\"devtools\")\ndevtools::install_github(\"poissonconsulting/pgfeatureserv\")\ndevtools::install_github(\"poissonconsulting/fwapgr\")\n```\n\n## Introduction\n\n`fwapgr` allows you to perform three types of operation.\n\n### Get Information on Collections\n\nGet information about the [collections](https://features.hillcrestgeo.ca/fwa/collections.html) or a collection's properties:  \n\n* [`fwa_collections()`](https://poissonconsulting.github.io/fwapgr/reference/fwa_collections.html)  \n* [`fwa_collection_properties()`](https://poissonconsulting.github.io/fwapgr/reference/fwa_collection_properties.html)  \n\n### Query a Collection\n\nQuery features from a [collection](https://features.hillcrestgeo.ca/fwa/collections.html):  \n\n* [`fwa_query_collection()`](https://poissonconsulting.github.io/fwapgr/reference/fwa_query_collection.html)  \n\n### Execute Spatial Functions\n\nExecute spatial [functions](https://features.hillcrestgeo.ca/fwa/functions.html):  \n\n* [`fwa_index_point()`](https://poissonconsulting.github.io/fwapgr/reference/fwa_index_point.html)\n* [`fwa_locate_along()`](https://poissonconsulting.github.io/fwapgr/reference/fwa_locate_along.html)\n* [`fwa_locate_along_interval()`](https://poissonconsulting.github.io/fwapgr/reference/fwa_locate_along_interval.html)\n* [`fwa_watershed_at_measure()`](https://poissonconsulting.github.io/fwapgr/reference/fwa_watershed_at_measure.html)\n* [`fwa_watershed_hex()`](https://poissonconsulting.github.io/fwapgr/reference/fwa_watershed_hex.html)\n* [`fwa_watershed_stream()`](https://poissonconsulting.github.io/fwapgr/reference/fwa_watershed_stream.html)\n* [`hydroshed()`](https://poissonconsulting.github.io/fwapgr/reference/hydroshed.html)\n\n## Demonstration\n\nGet Sangan River from `whse_basemapping.fwa_stream_networks_sp` collection:\n```{r}\ncoll \u003c- \"whse_basemapping.fwa_stream_networks_sp\"\nriver \u003c- fwapgr::fwa_query_collection(coll, filter = list(gnis_name = \"Sangan River\"))\nriver\n```\n\nGet simplified Yakoun River watershed starting 10km upstream:\n```{r}\nblk \u003c- river$blue_line_key[1]\nwshed \u003c- fwapgr::fwa_watershed_at_measure(\n  blk,\n  downstream_route_measure = 10000,\n  transform = c(\"ST_Simplify\", 2000)\n)\n```\n\n```{r dpi=300, fig.width=7, fig.height=7}\nggplot2::ggplot() +\n  ggplot2::geom_sf(data = wshed, lwd = 0.15, fill = \"steelblue\", alpha = 0.5) +\n  ggplot2::geom_sf(data = river, lwd = 0.15)\n```\n\n## Creditation\n\n`fwapgr` relies on [fwapg API](https://features.hillcrestgeo.ca/fwa/index.html) which is created, maintained and hosted by [Simon Norris](https://github.com/smnorris/fwapg) at [Hillcrest Geographics](https://hillcrestgeo.ca/). \n\n## Contribution\n\nPlease report any [issues](https://github.com/poissonconsulting/fwapgr/issues).\n\n[Pull requests](https://github.com/poissonconsulting/fwapgr/pulls) are always welcome.\n\n### Code of Conduct\n\nPlease note that `fwapgr` is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). \nBy contributing to this project, you agree to abide by its terms.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoissonconsulting%2Ffwapgr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoissonconsulting%2Ffwapgr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoissonconsulting%2Ffwapgr/lists"}