sdtaylor / phenometr Goto Github PK
View Code? Open in Web Editor NEWAn interface to the Phenomet database
Home Page: https://sdtaylor.github.io/phenometR
License: MIT License
An interface to the Phenomet database
Home Page: https://sdtaylor.github.io/phenometR
License: MIT License
inside get_credentials()
if prompted for info:
get info
test_connection (just grab a small table)
failed?
password failure?
re-enter
connection failure?
ping server to check
instead of start and end dates be able to call a single or multiple years.
What if they're are consecutive? ie. years = c(2015,2019)
like the phenophase page
species, pp code, common name, sites
Phenophases with a percent cover are categorical, but need to be mapped to a percent cover.
Need to ensure it's only done on the correct phenophases.
The bins:
Value | Definition (%) |
---|---|
0 | 0 |
1 | 1-4 |
2 | 5-24 |
3 | 25-49 |
4 | 50-74 |
5 | 74-94 |
6 | 95-100 |
Midpoints
percent_cover_values = tribble(
~PHENOPHASE, ~STATUS, ~PERCENT_COVER,
'DS_202', 0, 0,
'DS_202', 1, 2.5,
'DS_202', 2, 14.5,
'DS_202', 3, 37,
'DS_202', 4, 57,
'DS_202', 5, 84,
'DS_202', 6, 97.5
)
dplyr, tidyr, dbplyr, DBI, RMariaDB, yaml
req. for testing with the included sqlite db: RSQLite, testthat
wrote this but didn't end up using it. could be useful at some point.
where functional_groups
can be 'all'
or some combination of c('GR','DS','BE','CA')
some_function = function(functional_groups='all'){
available_fg = c('GR','DS','BE','CA')
if((functional_groups == 'all')[1]){
functional_groups <- available_fg
} else if(!all(functional_groups %in% available_fg)){
stop('unknown functional groups: ', paste(functional_groups, collapse = ','))
}
}
Most are just marked with a -99
. Potentially make the na
or remove entirely.
Potentially different NA values with different phenophases. need to check on that.
Just a single to run. Also emphasize the clear_credential()
function in case of login problems.
in get_site_phenophase
and get_fg_phenophase
get_species_phenophase()
inside
get plant info
filter to species
catch if nothing found/not valid
for each individual
get_plant_phenophase
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.