Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (16.2%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
Basic Info
- Host: GitHub
- Owner: digital-landscapes
- License: gpl-3.0
- Language: R
- Default Branch: master
- Size: 10.8 MB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Created about 1 year ago
· Last pushed about 1 year ago
Metadata Files
Readme
License
Code of conduct
Codemeta
README.Rmd
---
output: github_document
---
[](https://www.r-pkg.org/pkg/viewscape)
[](https://opensource.org/licenses/)
[](https://github.com/land-info-lab/viewscape/actions/workflows/R-CMD-check.yaml)
[](https://CRAN.R-project.org/package=viewscape)

```{r setup, include=FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# viewscape
## Introduction
The goal of viewscape package is to provide an accessible method of carrying out landscape spatial analysis based on the viewshed within the R environment. The viewscape R pacakge can currently be installed via github.
```{r eval=FALSE}
library(devtools)
install_github("land-info-lab/viewscape", dependencies=TRUE)
```
The basic viewshed analysis can be accessed through calling the `compute_viewshed`. The two needed objects are a digital surface model (DSM) and a viewpoint. It provides flexibility for single or multi-viewpoint analyses
and allows options for parallel processing, raster output, and plotting.
Based on the viewshed, a set of configuration metrics can be calculated using `calculate_viewmetrics`, `calculate_diversity`, and `calculate_feature`.
The metrics are including:
* Extent: The total area of the viewshed, calculated as the number of visible grid cells multiplied by the grid resolution.
* Depth: The furthest visible distance within the viewshed from the viewpoint.
* Vdepth: The standard deviation of distances to visible points, providing a measure of the variation in visible distances.
* Horizontal: The total visible horizontal or terrestrial area within the viewshed.
* Relief: The standard deviation of elevations of the visible ground surface.
* Skyline: Variation of (Standard deviation) of the vertical viewscape (visible canopy and buildings).
* Shannon diversity index: Based on the number of land use/cover classes and the proportion of distribution.
* Proportion of other object: Building, trees, or paved surface.
```{r eval=FALSE}
#Load in DSM
test_dsm <- terra::rast(system.file("test_dsm.tif",
package ="viewscape"))
#Load in the viewpoint
test_viewpoint <- sf::read_sf(system.file("test_viewpoint.shp",
package = "viewscape"))
#Compute viewshed
output <- viewscape::compute_viewshed(dsm = test_dsm,
viewpoints = test_viewpoint,
offset_viewpoint = 6,
plot=TRUE)
# Load DTM
test_dtm <- terra::rast(system.file("test_dtm.tif",
package ="viewscape"))
# load landuse raster
test_landcover <- terra::rast(system.file("test_landuse.tif",
package ="viewscape"))
# Load canopy raster
test_canopy <- terra::rast(system.file("test_canopy.tif",
package ="viewscape"))
# Load building footprints raster
test_building <- terra::rast(system.file("test_building.tif",
package ="viewscape"))
# calculate metrics given the viewshed
test_metrics <- viewscape::calculate_viewmetrics(output,
test_dsm,
test_dtm,
list(test_canopy, test_building))
# the Shannon Diversity Index (SDI)
test_diversity <- calculate_diversity(test_landcover, output, proportion = TRUE)
```
From viewshed analysis, the visible area of a viewpoint is presented by visible points. There are several viewshed metrics such as can be calculated based on the visible points. For further information on these metrics and the rest of the functions available in this package please refer to the [package website](https://billbillbilly.github.io/viewscape/). For more information and examples of the functions check out the [package vignette](needs to be created).
## Issues and bugs
This package may take a long time to run if using spatially large or high resolution digital elevation models.
If you discover a bug not associated with connection to the API that is not already a [reported issue](https://github.com/billbillbilly/viewscape/issues), please [open a new issue](https://github.com/billbillbilly/viewscape/issues/new) providing a reproducible example.
Owner
- Name: digital-landscapes
- Login: digital-landscapes
- Kind: organization
- Repositories: 1
- Profile: https://github.com/digital-landscapes
CodeMeta (codemeta.json)
{
"@context": [
"https://doi.org/10.5063/schema/codemeta-2.0",
"http://schema.org"
],
"@type": "SoftwareSourceCode",
"identifier": "viewscape",
"description": "Calculates the viewable area for given a point and a digital elevation model.",
"name": "viewscape: Calculate Viewshed Analysis",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.1.0",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 4.1.1 (2021-08-10)",
"author": {},
"contributor": {},
"copyrightHolder": {},
"funder": {},
"maintainer": [
{
"@type": "Organization",
"name": "NA"
}
],
"softwareSuggestions": [
{
"@type": "SoftwareApplication",
"identifier": "testthat",
"name": "testthat",
"version": ">= 3.0.0",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=testthat"
}
],
"softwareRequirements": [],
"codeRepository": "https://github.com/land-info-lab/viewscape",
"readme": "https://github.com/land-info-lab/viewscape/blob/master/README.md",
"fileSize": "188.492KB"
}
GitHub Events
Total
- Create event: 1
Last Year
- Create event: 1
Dependencies
.github/workflows/R-CMD-check.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION
cran
- R >= 4.2 depends
- ForestTools >= 1.0.1 imports
- Rcpp * imports
- dplyr * imports
- methods * imports
- parallel * imports
- pbmcapply * imports
- rlang * imports
- sf * imports
- sp * imports
- terra * imports
- knitr * suggests
- rmarkdown * suggests
- testthat >= 3.0.0 suggests