Comments (3)
from fgeo.biomass.
This was low priority but needed something doable in a short time.
from fgeo.biomass.
library(tidyverse)
library(fgeo.biomass)
set.seed(1)
census <- dplyr::sample_n(fgeo.biomass::scbi_tree1, 100)
species <- fgeo.biomass::scbi_species
census_species <- add_species(
census, species,
site = "scbi"
)
#> Adding `site`.
#> Overwriting `sp`; it now stores Latin species names.
#> Adding `rowid`.
# Guesses
suppressWarnings(
allo_find(census_species)
)
#> Guessing `dbh` in [mm] (required to find dbh-specific equations).
#> You may provide the `dbh` unit manually via the argument `dbh_unit`.
#> * Matching equations by site and species.
#> * Refining equations according to dbh.
#> * Using generic equations where expert equations can't be found.
#> # A tibble: 100 x 32
#> rowid treeID stemID tag StemTag sp quadrat gx gy DBHID
#> <int> <int> <int> <chr> <chr> <chr> <chr> <dbl> <dbl> <int>
#> 1 1 10696 10696 90447 1 carp~ 0905 180 83.3 15288
#> 2 2 14990 14990 1122~ 1 unid~ 1123 202. 450. 20510
#> 3 3 23076 23076 1607~ 1 quer~ 1607 318. 121. 30505
#> 4 4 36583 NA 1933~ <NA> lind~ 1904 374. 69.2 NA
#> 5 5 8124 8124 70093 1 hama~ 0704 123. 71.3 12097
#> 6 6 36186 NA 1930~ <NA> lind~ 1901 369. 1.40 NA
#> 7 7 38049 NA 2035~ <NA> lind~ 2004 386. 75.4 NA
#> 8 8 26615 26615 1807~ 1 liri~ 1811 355. 211. 34789
#> 9 9 25338 25338 1720~ 1 corn~ 1719 320. 362. 33246
#> 10 10 2489 2489 20242 1 lind~ 0204 27.9 70.9 5228
#> # ... with 90 more rows, and 22 more variables: CensusID <int>, dbh <dbl>,
#> # pom <chr>, hom <dbl>, ExactDate <chr>, DFstatus <chr>, codes <chr>,
#> # nostems <dbl>, date <dbl>, status <chr>, agb <dbl>, site <chr>,
#> # equation_id <chr>, eqn <chr>, eqn_source <chr>, eqn_type <chr>,
#> # anatomic_relevance <chr>, dbh_unit <chr>, bms_unit <chr>,
#> # dbh_min_mm <dbl>, dbh_max_mm <dbl>, is_generic <lgl>
# Uses given units
suppressWarnings(
allo_find(census_species, dbh_unit = "mm")
)
#> # A tibble: 100 x 32
#> rowid treeID stemID tag StemTag sp quadrat gx gy DBHID
#> <int> <int> <int> <chr> <chr> <chr> <chr> <dbl> <dbl> <int>
#> 1 1 10696 10696 90447 1 carp~ 0905 180 83.3 15288
#> 2 2 14990 14990 1122~ 1 unid~ 1123 202. 450. 20510
#> 3 3 23076 23076 1607~ 1 quer~ 1607 318. 121. 30505
#> 4 4 36583 NA 1933~ <NA> lind~ 1904 374. 69.2 NA
#> 5 5 8124 8124 70093 1 hama~ 0704 123. 71.3 12097
#> 6 6 36186 NA 1930~ <NA> lind~ 1901 369. 1.40 NA
#> 7 7 38049 NA 2035~ <NA> lind~ 2004 386. 75.4 NA
#> 8 8 26615 26615 1807~ 1 liri~ 1811 355. 211. 34789
#> 9 9 25338 25338 1720~ 1 corn~ 1719 320. 362. 33246
#> 10 10 2489 2489 20242 1 lind~ 0204 27.9 70.9 5228
#> # ... with 90 more rows, and 22 more variables: CensusID <int>, dbh <dbl>,
#> # pom <chr>, hom <dbl>, ExactDate <chr>, DFstatus <chr>, codes <chr>,
#> # nostems <dbl>, date <dbl>, status <chr>, agb <dbl>, site <chr>,
#> # equation_id <chr>, eqn <chr>, eqn_source <chr>, eqn_type <chr>,
#> # anatomic_relevance <chr>, dbh_unit <chr>, bms_unit <chr>,
#> # dbh_min_mm <dbl>, dbh_max_mm <dbl>, is_generic <lgl>
# Converting dbh to cm
census_species2 <- mutate(census_species, dbh = dbh / 1000)
# Guesses cm
suppressWarnings(
allo_find(census_species2)
)
#> Guessing `dbh` in [cm] (required to find dbh-specific equations).
#> You may provide the `dbh` unit manually via the argument `dbh_unit`.
#> * Matching equations by site and species.
#> * Refining equations according to dbh.
#> * Using generic equations where expert equations can't be found.
#> # A tibble: 100 x 32
#> rowid treeID stemID tag StemTag sp quadrat gx gy DBHID
#> <int> <int> <int> <chr> <chr> <chr> <chr> <dbl> <dbl> <int>
#> 1 1 10696 10696 90447 1 carp~ 0905 180 83.3 15288
#> 2 2 14990 14990 1122~ 1 unid~ 1123 202. 450. 20510
#> 3 3 23076 23076 1607~ 1 quer~ 1607 318. 121. 30505
#> 4 4 36583 NA 1933~ <NA> lind~ 1904 374. 69.2 NA
#> 5 5 8124 8124 70093 1 hama~ 0704 123. 71.3 12097
#> 6 6 36186 NA 1930~ <NA> lind~ 1901 369. 1.40 NA
#> 7 7 38049 NA 2035~ <NA> lind~ 2004 386. 75.4 NA
#> 8 8 26615 26615 1807~ 1 liri~ 1811 355. 211. 34789
#> 9 9 25338 25338 1720~ 1 corn~ 1719 320. 362. 33246
#> 10 10 2489 2489 20242 1 lind~ 0204 27.9 70.9 5228
#> # ... with 90 more rows, and 22 more variables: CensusID <int>, dbh <dbl>,
#> # pom <chr>, hom <dbl>, ExactDate <chr>, DFstatus <chr>, codes <chr>,
#> # nostems <dbl>, date <dbl>, status <chr>, agb <dbl>, site <chr>,
#> # equation_id <chr>, eqn <chr>, eqn_source <chr>, eqn_type <chr>,
#> # anatomic_relevance <chr>, dbh_unit <chr>, bms_unit <chr>,
#> # dbh_min_mm <dbl>, dbh_max_mm <dbl>, is_generic <lgl>
Created on 2019-03-28 by the reprex package (v0.2.1)
from fgeo.biomass.
Related Issues (20)
- Simplify README.Rmd HOT 1
- Remove or hide `allo_order()`
- Unnest the output of allo_find()
- Interface enhancements HOT 1
- Warn (once) if dead trees are detected in the census data HOT 1
- Evaluate allodb equations at dbh 1, 50, and 100
- Understand why some species have missing biomass HOT 3
- include failing ecuations and evaluate them safely()
- Move `convert_units()` out of `allo_find()`.
- Basic support for dbh-specific equations (other more specific issues follow this up) HOT 6
- Temporarily exclude generic equations until we can support them
- Support for custom_eqn
- Match species names given as Genus sp. (as in Homo sp. instead of Homo sapiens) HOT 2
- Convert `site = any temperate NA` to `<current site>`
- Let users define an unknown species to be matched with a generic equation
- Explore the biomass functions of the "CTFS R package"
- Flowchart overview
- Add full URLs to the website location of Information files
- installing fgeo.biomass error: https://forestgeo.github.io/drat/ not found HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fgeo.biomass.