{"id":21539426,"url":"https://github.com/bluegreen-labs/hwsdr","last_synced_at":"2025-04-10T03:26:22.582Z","repository":{"id":56934809,"uuid":"379881881","full_name":"bluegreen-labs/hwsdr","owner":"bluegreen-labs","description":"R API interface to the ORNL DAAC Harmonized World Soil Database","archived":false,"fork":false,"pushed_at":"2024-05-28T12:00:04.000Z","size":1681,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T04:43:37.934Z","etag":null,"topics":["api-client","modelling","r-package","rstats","soil","spatial-analyses","spatial-data"],"latest_commit_sha":null,"homepage":"https://bluegreen-labs.github.io/hwsdr/","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/bluegreen-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-24T10:06:57.000Z","updated_at":"2024-05-28T11:56:07.000Z","dependencies_parsed_at":"2024-05-28T14:26:14.863Z","dependency_job_id":"3d502df3-be35-4368-905c-f2e03a6640d0","html_url":"https://github.com/bluegreen-labs/hwsdr","commit_stats":{"total_commits":89,"total_committers":1,"mean_commits":89.0,"dds":0.0,"last_synced_commit":"99c89b0f1041da6cb578ea24e99730dcd02d807e"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluegreen-labs%2Fhwsdr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluegreen-labs%2Fhwsdr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluegreen-labs%2Fhwsdr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluegreen-labs%2Fhwsdr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bluegreen-labs","download_url":"https://codeload.github.com/bluegreen-labs/hwsdr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248097421,"owners_count":21047234,"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":["api-client","modelling","r-package","rstats","soil","spatial-analyses","spatial-data"],"created_at":"2024-11-24T04:15:15.977Z","updated_at":"2025-04-10T03:26:22.565Z","avatar_url":"https://github.com/bluegreen-labs.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hwsdr\n\n[![R-CMD-check](https://github.com/bluegreen-labs/hwsdr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/bluegreen-labs/hwsdr/actions/workflows/R-CMD-check.yaml)\n[![codecov](https://codecov.io/gh/bluegreen-labs/hwsdr/branch/main/graph/badge.svg?token=GQ2TENDJP6)](https://app.codecov.io/gh/bluegreen-labs/hwsdr)\n[![CRAN\\_Status\\_Badge](https://www.r-pkg.org/badges/version/hwsdr)](https://cran.r-project.org/package=hwsdr)\n[![downloads](https://cranlogs.r-pkg.org/badges/grand-total/hwsdr)](https://cranlogs.r-pkg.org/badges/grand-total/hwsdr)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.6527648.svg)](https://doi.org/10.5281/zenodo.6527648)\n\nProgrammatic interface to the Harmonized World Soil Database 'HWSD' web services (\u003chttps://daac.ornl.gov/cgi-bin/dsviewer.pl?ds_id=1247\u003e). Allows for easy downloads of 'HWSD' soil data directly to your R workspace or your computer. Routines for both single pixel data downloads and gridded data are provided.\n\n## How to cite this package in your article\n\n\u003e Koen Hufkens. (2022). bluegreen-labs/hwsdr: CRAN release (v1.0). Zenodo. https://doi.org/10.5281/zenodo.6527648\n\n## Installation\n\n### stable release\n\nTo install the current stable release use a CRAN repository:\n\n```r\ninstall.packages(\"hwsdr\")\nlibrary(\"hwsdr\")\n```\n\n### development release\n\n\u003e Breaking change: as of version 1.1 the order of the coordinates in the\nlocation string has changed from (lat, lon, lat, lon) to (lon, lat, lon, lat)!\n\nTo install the development releases of the package run the following\ncommands:\n\n``` r\nif(!require(remotes)){install.packages(\"remotes\")}\nremotes::install_github(\"bluegreen-labs/hwsdr\")\nlibrary(\"hwsdr\")\n```\n\nVignettes are not rendered by default, if you want to include additional\ndocumentation please use:\n\n``` r\nif(!require(remotes)){install.packages(\"remotes\")}\nremotes::install_github(\"bluegreen-labs/hwsdr\", build_vignettes = TRUE)\nlibrary(\"hwsdr\")\n```\n\n## Use\n\n### HWSD v1.2 (ORNL DAAC API)\n\n#### Single pixel location download\n\nGet world soil values for a single site using the following format, specifying coordinates as a pair of latitude, longitude coordinates. Here all available soil layers are queried.\n\n``` r\nall \u003c- ws_subset(\n    site = \"HWSD\",\n    location = c(-81, 34),\n    param = \"ALL\"\n  )\n```\n\n#### Gridded data\n\nYou can download gridded data by specifying a bounding box c(lat, lon, lat, lon) defined by a bottom left and top right coordinates. Here the call only extracts the top soil fraction of sand (% weight).\n\n``` r\nt_sand \u003c- ws_subset(\n    site = \"HWSD\",\n    location = c(32, -81, 34, -80),\n    param = \"T_SAND\",\n    path = tempdir(),\n    internal = TRUE\n  )\n```\n###  Parameters\n\nBy default all parameters are downloaded, a complete list of the individual parameters is provided on the ORNL webpage (\u003chttps://daac.ornl.gov/SOILS/guides/HWSD.html\u003e). Alternatively you may find a similar list of data in the `hwsd_meta_data` dataset as provided by the package.\n\n### HWSD v2.0 (FAO)\n\nThis is an experimental feature, awaiting an update of the ORNL DAAC API to version 2.0 of the HWSD database. Although functionally complete the procedure is more complex as it includes a bulk download of a base map.\n\n#### Download the base map\n\nThe HWSD v2.0 data is distributed as a gridded spatial map where homogeneous regions are indicated with indices (integers). Although the underlying database is included in the package and can be accessed using `hwsdr::hwsd2`, the spatial data accompanying the database is too large for inclusion in the package. This spatial data needs to be downloaded explicitly to a desired path before any other functions will work.\n\n``` r\n# set the ws_path variable using a FULL path name\npath \u003c- ws_download(\n  ws_path = \"/your/full/path\",\n  verbose = TRUE\n)\n```\n\n### Single pixel location download\n\nGet world soil values for a single site using the following format, specifying coordinates as a pair of longitude, latitude coordinates (longitude, latitude). Here the call only extracts the top soil (layer = \"D1\") fraction of sand and silt (% weight) for one specific location. Note that you will need to specify the correct version to be used in processing.\n\n``` r\nvalues \u003c- ws_subset(\n    site = \"HWSD_V2\",\n    location = c(-81, 34),\n    param = c(\"SAND\",\"SILT\"),\n    layer = \"D1\",\n    version = \"2.0\", # set correct HWSD version\n    ws_path = \"/your/full/path\" # specify grid map directory\n  )\n```\n\n### Gridded data\n\nYou can grab gridded data by specifying a bounding box c(lon, lat, lon, lat) defined by a bottom left and top right coordinates. Here the call only extracts the top soil (D1 layer) fraction of sand (%).\n\n``` r\nsand \u003c- ws_subset(\n    location = c(32, -81, 34, -80),\n    param = \"SAND\",\n    layer = \"D1\",\n    version = \"2.0\",\n    ws_path = Sys.getenv(\"WS_PATH\"),\n    # ws_path = \"/your/full/path\",\n    internal = TRUE\n  )\n```\n\n## References\n\nWieder, W.R., J. Boehnert, G.B. Bonan, and M. Langseth. 2014. Regridded Harmonized World Soil Database v1.2. Data set. Available on-line from Oak Ridge National Laboratory Distributed Active Archive Center, Oak Ridge, Tennessee, USA. (\u003chttps://daac.ornl.gov/cgi-bin/dsviewer.pl?ds_id=1247\u003e).\n\n## Acknowledgements\n\nThe `hwsdr` package is a product of BlueGreen Labs, and has been in part supported by the LEMONTREE project funded through the Schmidt Futures fund, under the umbrella of the Virtual Earth System Research Institute (VESRI).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluegreen-labs%2Fhwsdr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluegreen-labs%2Fhwsdr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluegreen-labs%2Fhwsdr/lists"}