Comments (6)
You can replace all of them if you want, but will the csv file also be updated? Otherwise I will do it.
No, the kind of fix I would do in code is downstream from the .csv files. In my opinion, the more you can do directly the better. Every new code statement increases the chance of bugs.
from fgeo.biomass.
(Now following up at ropensci/allodb#83.)
I'm assuming that the limits imposed by dbh_min/max
are inclusive (see example below). Is my assumption correct?
# Inclusive limits
fgeo.biomass:::is_in_range(1, 1, 10)
#> [1] TRUE
fgeo.biomass:::is_in_range(10, 1, 10)
#> [1] TRUE
# Out of bounds
fgeo.biomass:::is_in_range(11, 1, 10)
#> [1] FALSE
fgeo.biomass:::is_in_range(0, 1, 10)
#> [1] FALSE
# Well within the limit
fgeo.biomass:::is_in_range(5, 1, 10)
#> [1] TRUE
Created on 2019-03-20 by the reprex package (v0.2.1)
from fgeo.biomass.
there are 23 equations in equation
table with some type of missing dbh range value (NRA, NI, NA)..
You can replace all of them if you want, but will the csv file also be updated? Otherwise I will do it.
I will make sure to mention that not just in the code but in our methods.
from fgeo.biomass.
(Now following up at ropensci/allodb#84.)
The dbh
ranges are different for different parts of a tree (e.g. dbh_min_mm
is 142 and 25 for rowid
6 and 7). If a row is within the range some but not all the equations that make up the entire body of a tree, then the biomass will be sum for only the body parts in the adequate range. In other words, some partes of a tree will not be represented at all and this could result in underestimating biomass. There is currently no way for the code to know if a crucial equaiton has been lost.
@teixeirak, Maybe a new column should record parts of a whole? E.g. a set of equations with 3 parts should be labelled like "1/3", "2/3", and "3/3"?
- Example: Notice that
rowid
1and 2 have a different range dbh range. Of course, the actualdbh
value (i.e. 194) falls within the range, but maybe other equations were dropped because they represented a range that doesn't includedbh = 194
.
#> rowid anatomic_relevance dbh dbh_min_mm dbh_max_mm
#> 6 228 stem (wood and bark) 194. 142. 267.
#> 7 228 foliage total 194. 25 400
...
from fgeo.biomass.
This can be disregarded. I had suspected that some rowid
s might have more than one equation that covered the entire tree-body. This came from observing something like the following:
#> rowid anatomic_relevance dbh dbh_min_mm dbh_max_mm
#> 8 266 total aboveground biomass 37.6 30 640
#> 9 266 total aboveground biomass 37.6 3.7 68.3
But I confirm that this is NOT the case, when expert/generic and dbh ranges are considered.
Reprex:
library(tidyverse)
library(allodb)
master_tidy() %>%
select(
site,
equation_group,
species,
equation_id,
dependent_variable_biomass_component,
matches("dbh")
) %>%
filter(site == "scbi") %>%
filter(str_detect(dependent_variable_biomass_component, "Total|Whole")) %>%
unique() %>%
arrange(species, dbh_min_cm) %>%
group_by(equation_group) %>%
filter(
str_detect(
"^Expert$", paste0(sort(unique(equation_group)), collapse = ", ")
)
) %>%
add_count(species) %>%
filter(n > 1) %>%
select(-n)
from fgeo.biomass.
I'm closing this now. Althought some issues remain, they have been extracted as independent issues of their own.
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
- Guess dbh units HOT 3
- 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()`.
- 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.