HARPgroup / r-dh-ecohydro

A set of R scripts for generating Ecological Limit Functions (ELF), storing the modeled output with REST in drupal VAHydro (dH), and a set of scripts for querying and analyzing processed ELF data
0 stars 1 forks source link

Can't get fn_dh_elfstats to return results for Quantreg aqbio_nt_cent and aqbio_nt_benins #23

Open rburghol opened 6 years ago

rburghol commented 6 years ago

Haven't tried anyof the others, but this call WORKS for aqbio_nt_total.

bundle <- 'watershed';
ftype <- 'nhd_huc8';
metric <- 'aqbio_nt_benins';
q_ftype <- "fe_quantreg";
analysis_timespan = "full";
sampres = "species";
selected <- 'all'; # all or hydrocode
quantile <- 0.8;
stat_quantreg_glo <- 0; # use 1 for pwit, 0 for quantreg
# ftype = fe_quantreg, fe_quantreg_pwit, fe_quantreg_ymax, fe_twopoint
# analysis_timespan = full, 1990-2010, 1970-1980, ...
data = fn_dh_elfstats (
    ftype = q_ftype,
    analysis_timespan = analysis_timespan,
    yvar = metric,
    sampres = sampres,
    stat_quantreg_qu = quantile,
    feature_ftype = ftype,
    stat_quantreg_glo = 0
);
rburghol commented 6 years ago

There is definitely data in there, just seems maybe a problem with the glo/ghi or something?

select propcode, count(*) from dh_properties where entity_type = 'dh_adminreg_feature' and varid = 1178 group by propcode;
        propcode        | count
------------------------+-------
 aqbio_nt_cypr_native   |  2087
 aqbio_nt_bival         |   232
 aqbio_nt_total         |  8382
 aqbio_benthic_nt_ephem |  1047
 aqbio_nt_cent_native   |   536
 aqbio_nt_sunfish       |  4748
 aqbio_nt_native        |  2068
 aqbio_nt_benins        |   494
 aqbio_benthic_nt_tol   |   408
 aqbio_benthic_nt_total |  1542
 aqbio_benthic_nt_ept   |  1122
 aqbio_nt_cent          |  3604
 aqbio_nt_darter        |   536
 aqbio_mf_evenness      |   126
 aqbio_nt_minnow        |  2138
 aqbio_ni_total         |     2
 aqbio_nt_native_benth  |   689
 aqbio_benthic_nt_intol |   424