Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For filtering the records into survey and observation-based the following joins are needed, table name convention would be tern_survey_suspeciessuspeciesY

Code Block
JOIN bdbsa.supatch sp ON sv."PATCHID" = sp."PATCHID" 
join bdbsa.suspecies spp on sv."VISITNR" = spp."VISITNR"

...

  1. survey based data for plant populations which are observed on plots

  2. survey based data for plant individuals which are observed on plots

  3. opportunistic samples of plant occurrences that are plot-less

  4. All records need to be filtered by ISCERTAIN = Y

Because of this and rows in the mapping have a 1:1 relationship with an FoI (i.e. a parameter cannot belong to more than one FoI), the data will be separated into three tables for processing: survey-plant population, survey-plant individual and opportunistic-plant occurrence.

Columns from other tables shared across FOI’s

suplantlfstage has to be join to the suspecies table

Code Block
join bdbsa.suplantlfstage s on s."SPSEQNR"= spp."SPSEQNR" and s."VISITNR" = sv."VISITNR"

This table contains two parameters that are shared across plant opportunistic, population and individual FOI’s.

Notice that the following column need to be created for occurrence, individuals and populations

“LIFESTAGECODE”. The following conversion needs to be done for the “LIFESTAGECODE” included in the database

  1. DE category has to be converted to D

  2. N category has to be converted to V

  3. SP needs to be converted to X

  4. RE to V (Note while the RE category can become either Vegetative or Regenerating the plants listed as RE in the Database only contain many herbaceous annual species suggesting that they must be in a vegetative state, N of record under RE = 15)

Survey columns individuals

  1. Select data for survey only

Code Block
bdbsa.supatch."SITETYPE" = 'SU' 

2. Select data for individuals using DBH as key

Code Block
"DBH" is not null

3 . For individuals the following variables from the suspecies table will be ingested:

...

NUMOBSERVED column

This column whenever present will be separated into two variables:

NUMOBSERVED: all numeric values >0 will be kept in NUMOBSERVED. 0 values and Non-numeric values will be transformed to NULL values

PRESENCE: This column will have two values “none detected“ and “present”. The “present” value will be all numeric values > 0 in the NUMOBSERVED column as well as the several, present but not countedand Present but not counted values. “none detected” will be all the 0 and none detected values in the NUMOBSERVED column.

Columns from other tables shared across FOI’s

suplantlfstage has to be join to the suspecies table

Code Block
join bdbsa.suplantlfstage s on s."SPSEQNR"= spp."SPSEQNR" and s."VISITNR" = sv."VISITNR"

This table contains two parameters that are shared across plant opportunistic, population and individual FOI’s.

Notice that the following column need to be created for occurrence, individuals and populations

“LIFESTAGECODE”. The following conversion needs to be done for the “LIFESTAGECODE” included in the database

  1. DE category has to be converted to D

  2. N category has to be converted to V

  3. SP needs to be converted to X

  4. RE to V (Note while the RE category can become either Vegetative or Regenerating the plants listed as RE in the Database only contain many herbaceous annual species suggesting that they must be in a vegetative state, N of record under RE = 15)

Survey columns individuals

  1. Select data for survey only

Code Block
bdbsa.supatch."SITETYPE" = 'SU' 

2. Select data for individuals using DBH as key

Code Block
"DBH" is not null

3 . For individuals the following variables from the suspecies table will be ingested:

PLANTEDRELEASED_individual, CROWN_EXTENT_PERC, CROWN_EXTENT_SCORE, CROWN_DENSITY_PERC, CROWN_DENSITY_SCORE, DBH, NEW_TIP_GROWTH, EPICORMIC_GROWTH, EXTENT_REPRODUCTION, MISTLETOE_LOAD, LEAF_DIE_OFF, LEAF_DAMAGE, EXTENT_BARK_CRACKING

...

Code Block
select "PATCHID" , sv."VISITNR" , "VISITDATE" ,
 "ISFIRESCARS" , "LASTFIREYEAR" , "ISFIREYRCERTAIN" ,
 sv."STRFORMATIONNR", lstr."STRFORMATIONDESC", 
 lstr."STRLIFEFORMNR" ,lstr."PROJFOLCOVERNR"
 from bdbsa.suvisit sv
 join bdbsa.lustrformation lstr ON lstr."STRFORMATIONNR" = sv."STRFORMATIONNR"

While all these variables will be ingested until review only Only the following variables will be mapped:

LASTFIREYEAR (note that ? values need to be remapped to Y)

ISFIREYRCERTAIN (note that ? values need to be remapped to Y)

STRFORMATIONNR

Plant functional type ingestion

...

  1. Filter to only voucher containing AD in the museumherbmnr column

  2. Generate unique record number (http://rs.tdwg.org/dwc/terms/recordNumber ) using prefix and vouchernr.

  3. create specimen_holder column. Value is State Herbarium of South Australia

  4. museumherbmnr corresponds to state catalogue number. ALA use also this field, but adds a space between alphabetic and numeric characters

  5. Scientific name is the concatenation of following flsp columns fl."GENUS",fl."SP",
    fl."ISP1RANK" , fl."ISP1" , fl."SPAUTHOR"

  6. Get values from DETERMINERNR1 for the determiner column. The values for observer are outside the database see excel sheet at bottom of this list

  7. NOTICE that DETERMINEDATE is not the same as the collection date that happened during VISITDATE

See code below for guidance

...

View file
namebdbsa-data-returns-template-gen.xlsx

See code below for guidance

Code Block
select sp."SITEID", sp."QUADSITE", sp."PATCHID", sv."VISITNR", sv."VISITDATE", 
 svo."PREFIX", svo."VOUCHERNR",--unique identifiers
 svo."MUSEUMHERBMNR", --used by ALA
-- svo."VOUCHERTYPE",svo."SPSEQNR", spp."SPECIESNR", 
 fl."GENUS",fl."SP",
 fl."ISP1RANK" , fl."ISP1" , fl."SPAUTHOR", 
 svo."DETERMINERNR1" , --svo."DETERMINERNR2", determiner 2 is not used
 svo."DETERMINEDATE", --svo."ACCURACYCODE",--this is for the date
 svo."VOUCHERCOMM" 
 from bdbsa.suvoucher svo
 join bdbsa.suspecies spp on spp."SPSEQNR" =svo."SPSEQNR" and
  spp."VISITNR" = svo."VISITNR" 
 join bdbsa.flsp fl on spp."SPECIESNR" = fl."SPECIESNR"
 join bdbsa.suvisit sv on sv."VISITNR" =svo."VISITNR" 
 join bdbsa.supatch sp on sp."PATCHID" = sv."PATCHID" 
 where substring("MUSEUMHERBMNR" , '[A-Z]{1,}') = 'AD'
 order by "VOUCHERTYPE" 

...

These variables are stored at the site-visit level. However, they apply only to particular animal groups,i.e. not all NUMTRAP columns apply to all animal observations done during a site visit. Also create dipnetused variable where the value is YES when DIPNETHRS is not null.

Individuals

  1. Pivot length and lengthmethod columns

First, the length and length method All records have to be pivot to a wider format.

Expand (pivot wider) column LENGTHNR as column names and LENGTH column as values to fill these columns. The column names for the LENTHNR column are below, as well as an example of the query:

1 body length
10 snout to vent length (does not need to be ingested as it already exist as SNOUT)
filtered by ISCERTAIN = Y

NUMOBSERVED column

This column whenever present will be separated into two variables:

NUMOBSERVED: all numeric values >0 will be kept in NUMOBSERVED. 0 values and Non-numeric values will be transformed to NULL values

PRESENCE: This column will have two values “none detected“ and “present”. The “present” value will be all numeric values > 0 in the NUMOBSERVED column as well as the several, present but not countedand Present but not counted values. “none detected” will be all the 0 and none detected values in the NUMOBSERVED column.

Individuals

  1. Pivot length and lengthmethod columns

First, the length and length method have to be pivot to a wider format.

Expand (pivot wider) column LENGTHNR as column names and LENGTH column as values to fill these columns. The column names for the LENTHNR column are below, as well as an example of the query:

1 body length
10 snout to vent length (does not need to be ingested as it already exist as SNOUT)
12 tail Length
14 mantle Length
15 invertebrate carapace length (if species type I)

...

2 fork length
3 lower jaw Fork Length
5 PES Length
6 Head Length
7 Forearm Length

Code Block
SELECT--CREATE *
FROM   crosstab(
   $$SELECTTABLE bdbsa.analysis_length AS
SELECT "VISITNR", "SPECIESTYPE","SPSEQNR","NSXCODE","LENGTHMETHOD", "LENGTH"
from bdbsa.suspecies s
where  FROM  ("LENGTHMETHOD" is not null and "LENGTH" is not null);
--drop TABLE if exists bdbsa.analysis_length;

select distinct "LENGTHMETHOD"
from bdbsa.analysis_length
ORDER  BY 1,2$$;

-- could also just be "ORDER BY 1" here
  , $$select distinct "LENGTHMETHOD"
from bdbsa.analysis_length
ORDER  BY 1$$
   ) AS ("VISITNR" float8, "SPECIESTYPE" text, "NSXCODE" text,
   "total_length" float8,
   "svlength" float8, "tail_length" float8,"disc_length" float8,
   "mantlelength" float8, "carapace_length" float8, "fork" float8,
   "lowerjawfork" float8,"pes_length" float8,"head_length" float8,
   "forearm_length" float8);

2. For individuals the following joins and logic are required, this step differs across species. Invertebrates and birds are excluded as they only comprise 3 records for this FOI.

For mammals :

Code Block
FROM bdbsa.suvisit sv
JOIN bdbsa.supatch sp ON sv."PATCHID" = sp."PATCHID" 
join bdbsa.suspecies spp on sv."VISITNR" = spp."VISITNR"
join bdbsa.vssp vs on vs."NSXCODE" = spp."NSXCODE"
join bdbsa.analyses_length_wide alw on alw."VISITNR"= spp."VISITNR" and alw."SPECIESTYPE"= spp."SPECIESTYPE" and alw."NSXCODE" =spp."NSXCODE" 
full join bdbsa.sutrap str on str."VISITNR" = sv."VISITNR"
where (spp."SPECIESTYPE" = 'M' and 
"LENGTH" is not null 
or "TEATS" is not null 
or "VAGINA" is not null 
or "POUCH" is not null
or "TESTES" is not null
or "WEIGHT" is not null
or "NUMPOUCH" is not null
)
  1. TEATS column: Values in category 3 need to be lumped into category 2.

  2. TESTES column: Values in category 3 need to be lumped into category 2.

  3. Variables to be ingested are the following (note: NUMOBSERVED is not ingested as this FOI by definition is one individual): METHODNR, species_name, tail_length, pes_length, forearm_length, SPCOMM, SEX, TEATS, VAGINA, POUCH, TESTES, WEIGHT, PLANTEDRELEASED, NUMNIGHTS, NUMELLIOTTRAPA, NUMELLIOTNIGHTS, NUMPITTRAPA, NUMPITNIGHTS, NUMCAGETRAPA, NUMCAGENIGHTS, ISHARPTRAP, ISMISTNET, NUMELLIOTTRAPB, NUMPITTRAPB, NUMCAGETRAPB, ISHAIRTUBE, ISBATDETECTOR

For birds: there is no individuals.

Occurrence

For birds the following join is needed:

Code Block
JOIN bdbsa.supatch sp ON sv."PATCHID" = sp."PATCHID" 
join bdbsa.suspecies spp on sv."VISITNR" = spp."VISITNR"
join bdbsa.vssp vs on vs."NSXCODE" = spp."NSXCODE"
fullSELECT concat("VISITNR", '_', "SPECIESTYPE",'_',"SPSEQNR",'_',"NSXCODE")as row_id,"VISITNR", "SPECIESTYPE","SPSEQNR","NSXCODE","LENGTHMETHOD", "LENGTH" 
    FROM   bdbsa.analysis_length
    ORDER  BY 5;
   
   
--CREATE EXTENSION IF NOT EXISTS tablefunc;
--create table bdbsa.analyses_length_wide as   
SELECT *
FROM   crosstab(
   $$SELECT concat("VISITNR", '_', "SPECIESTYPE",'_',"SPSEQNR",'_',"NSXCODE") as row_id,"VISITNR", "SPECIESTYPE","SPSEQNR","NSXCODE","LENGTHMETHOD", "LENGTH" 
    FROM   bdbsa.analysis_length
    ORDER  BY 5$$  
  , $$select distinct "LENGTHMETHOD"
from bdbsa.analysis_length
ORDER  BY 1$$
   ) AS ("row_id" text,"VISITNR" float8, "SPECIESTYPE" text,"SPSEQNR" float8, "NSXCODE" text,
   "total_length" float8,
   "svlength" float8, "tail_length" float8,"disc_length" float8,
   "mantlelength" float8, "carapace_length" float8, "fork" float8,
   "lowerjawfork" float8,"pes_length" float8,"head_length" float8,
   "forearm_length" float8);
--drop TABLE if exists bdbsa.analyses_length_wide;   

2. For individuals the following joins and logic are required, this step differs across species. Invertebrates and birds are excluded as they only comprise 3 records for this FOI.

For mammals :

Code Block
join bdbsa.analyses_length_wide alw on alw."VISITNR"= spp."VISITNR" and alw."SPECIESTYPE"= spp."SPECIESTYPE" and alw."SPSEQNR" = spp."SPSEQNR" and alw."NSXCODE" =spp."NSXCODE"
left join bdbsa.sutrap str on str."VISITNR" = svspp."VISITNR"
where (spp."SPECIESTYPE" = 'B')

and the following columns will be ingested:

...

left join bdbsa.suvisit sv on sv."VISITNR" = spp."VISITNR" 
JOIN bdbsa.supatch sp ON sp."PATCHID" = sv."PATCHID"
where (spp."SPECIESTYPE" = 'M')

  1. TEATS column: Values in category 3 need to be lumped into category 2.

  2. TESTES column: Values in category 3 need to be lumped into category 2.

  3. Variables to be ingested are the following (note: NUMOBSERVED is not ingested as this FOI by definition is one individual): METHODNR, species_name,

...

  1. tail_length, pes_length, forearm_length, SPCOMM, SEX,

...

  1. TEATS,

...

  1. VAGINA,

...

  1. POUCH, TESTES, WEIGHT, PLANTEDRELEASED, NUMNIGHTS, NUMELLIOTTRAPA, NUMELLIOTNIGHTS,

...

  1. NUMPITTRAPA, NUMPITNIGHTS,

...

  1. NUMCAGETRAPA, NUMCAGENIGHTS, ISHARPTRAP, ISMISTNET, NUMELLIOTTRAPB, NUMPITTRAPB, NUMCAGETRAPB, ISHAIRTUBE, ISBATDETECTOR

Most of the variables after PLANTEDRELEASEDmay be removed, this needs to be confirmedFor birds: there are no individuals.

For mammals

...

fish:

The following tables are needed:

Code Block

...

from 

...

suspecies 

...

spp

...

join bdbsa.

...

analyses_length_wide alw on alw."VISITNR"= spp."VISITNR" and alw."SPECIESTYPE"= spp."SPECIESTYPE" and alw."SPSEQNR" = spp."

...

SPSEQNR" 

...

and alw."NSXCODE" =

...

spp."NSXCODE"
left 

...

join bdbsa.sutrap str on str."VISITNR" = 

...

spp."VISITNR"
left 

...

join 

...

Convert 'none detected' value in NUMOBSERVED to 0

...

The following variables are to be ingested STRATANR, MACROHABNR, species_name, NUMOBSERVED, MICROHABNR, SPCOMM, SEX, ACTIVITY, PLANTEDRELEASED, NUMNIGHTS, NUMELLIOTTRAP, NUMELLIOTNIGHTS, NUMPITTRAP, NUMPITNIGHTS, NUMCAGETRAP, NUMCAGENIGHTS, ISHARPTRAP, ISMISTNET, ISHAIRTUBE, ISBATDETECTOR

Ignore me, working notes

occurrence and survey-based records. The following joins are needed for this data (where SITETYPE = ‘OP’ for opportunistic and ‘SU’ for survey-based methods). Only records with certainty confirmed will be exposed, see where statement below.

Code Block
JOIN bdbsa.supatch sp ON sv."PATCHID" = sp."PATCHID" 
join bdbsa.suspecies spp on sv."VISITNRbdbsa.suvisit sv on sv."VISITNR" = spp."VISITNR" 
JOIN bdbsa.supatch sp ON sp."PATCHID" = sv."PATCHID"
where spp."SPECIESTYPE" = 'F';

Variables to be ingested are as follow:

species_name, METHODNR, SPCOMM, SEX, WEIGHT, ACTIVITY, PLANTEDRELEASED, total_length, disc_length, fork, lowerjawfork, FYKENETDUR, FYKENETNR, BAITTRAPHRS, BAITTRAPNUM

For reptiles:

The following tables are needed

Code Block
from suspecies spp
join bdbsa.analyses_length_wide alw on alw."VISITNR"= spp."VISITNR" and alw."SPECIESTYPE"= spp."SPECIESTYPE" and alw."SPSEQNR" = spp."VISITNRSPSEQNR" joinand bdbsa.vssp vs on vs.alw."NSXCODE" = spp."NSXCODE"
left join bdbsa.sutrap str on str."VISITNR" = svspp."VISITNR"
where (sp."SITETYPE" = 'OP' and ISCERTAINleft join bdbsa.suvisit sv on sv."VISITNR" = spp."VISITNR" 
JOIN bdbsa.supatch sp ON sp."PATCHID" = sv."PATCHID"
where spp."SPECIESTYPE" = 'YR')

Separate records into animal individuals and populations

The surveys contain data for animal individuals (tern_survey_suspecies_animal_individual) and populations (tern_survey_suspecies_animal_population). This needs to be separated into two tables.

The following filter can identify animal individuals

Code Block
where ("SEX" is not null or "TEATS" is not null or "VAGINA" is not null
 or "POUCH" is not null or "NUMPOUCH" is not null or "TESTES" is not null or "WEIGHT" is not null
 or "SNOUT" is not null or "ISGRAVID" is not null or "LENGTH" is not null)

Animal populations can be identified by the complement of the filter above (i.e. where the values in the columns above are null).

The following variables will be ingested for individuals, see sections below as NUMTRAP and LENGTH variables need further processing. Also create dipnetused variable where the value is YES when DIPNETHRS is not null.

Code Block
spp."SPECIESTYPE", concat_ws(' ', vs."GENUS", vs."SP") as species_name, 
spp."MACROHABNR",spp."MICROHABNR", spp."SPCOMM" ,
spp."SEX", spp."TEATS",  spp."VAGINA" ,  spp."POUCH" ,  spp."NUMPOUCH" , 
spp."TESTES", spp."WEIGHT" ,  spp."SNOUT" ,  spp."ISGRAVID",
spp."LENGTH",  spp."LENGTHMETHOD", spp."ACTIVITY",
spp."PLANTEDRELEASED", str."NUMNIGHTS",  str."NUMELLIOTTRAPA",
str."NUMELLIOTNIGHTS",  str."NUMPITTRAPA", str."NUMPITNIGHTS",
str."NUMCAGETRAPA",  str."NUMCAGENIGHTS",  str."ISHARPTRAP", str."ISMISTNET",
str."NUMELLIOTTRAPB",  str."NUMPITTRAPB",  str."NUMCAGETRAPB", str."ISHAIRTUBE",
str."ISBATDETECTOR",  str."DIPNETHRS"

For the animal population table, the following variables will be ingested

Code Block
spp."SPECIESTYPE", concat_ws(' ', vs."GENUS", vs."SP") as species_name, 
spp."NUMOBSERVED", spp."MACROHABNR", spp."MICROHABNR",  spp."SPCOMM" , spp."SIGHTINGNR" ,
spp."ACTIVITY", spp."PLANTEDRELEASED", str."NUMNIGHTS",  str."NUMELLIOTTRAPA",
str."NUMELLIOTNIGHTS",  str."NUMPITTRAPA", str."NUMPITNIGHTS",
str."NUMCAGETRAPA",  str."NUMCAGENIGHTS",  str."ISHARPTRAP", str."ISMISTNET",
str."NUMELLIOTTRAPB",  str."NUMPITTRAPB",  str."NUMCAGETRAPB", str."ISHAIRTUBE",
str."ISBATDETECTOR",  str."DIPNETHRS"

BIRDS

For individuals, a single record exists and won’t be ingested.

...

;
  1. Variables to be ingested are the following: METHODNR, STRATANR, MACROHABNR, MICROHABNR, SPCOMM, SEX, WEIGHT, ISGRAVID, PLANTEDRELEASED, total_length, SNOUT, tail_length, turtle_carapace_length, NUMNIGHTS, NUMELLIOTTRAP, NUMELLIOTNIGHTS, NUMPITTRAP, NUMPITNIGHTS, NUMCAGETRAP, NUMCAGENIGHTS, ISHARPTRAP, ISMISTNET, FYKENETDUR, FYKENETNR

For amphibian:

The following tables are needed:

Code Block
str."FYKENETHRS", str."BAITTRAPHRS", str."BAITTRAPNUM", str."DIPNETHRS"
from suspecies spp
join bdbsa.analyses_length_wide alw on alw."VISITNR"= spp."VISITNR" and alw."SPECIESTYPE"= spp."SPECIESTYPE" and alw."SPSEQNR" = spp."SPSEQNR" and alw."NSXCODE" =spp."NSXCODE"
left join bdbsa.sutrap str on str."VISITNR" = spp."VISITNR"
left join bdbsa.suvisit sv on sv."VISITNR" = spp."VISITNR" 
JOIN bdbsa.supatch sp ON sp."PATCHID" = sv."PATCHID"
where spp."SPECIESTYPE" = 'A';

The following variables need to be ingested: METHODNR, SPCOMM, SEX, WEIGHT, PLANTEDRELEASED, total_length, svlength, fork, FYKENETDUR, FYKENETNR

For invertebrates:

The following tables are needed:

Code Block
from suspecies spp
join bdbsa.analyses_length_wide alw on alw."VISITNR"= spp."VISITNR" and alw."SPECIESTYPE"= spp."SPECIESTYPE" and alw."SPSEQNR" = spp."SPSEQNR" and alw."NSXCODE" =spp."NSXCODE"
left join bdbsa.sutrap str on str."VISITNR" = spp."VISITNR"
left join bdbsa.suvisit sv on sv."VISITNR" = spp."VISITNR" 
JOIN bdbsa.supatch sp ON sp."PATCHID" = sv."PATCHID"
where spp."SPECIESTYPE" = 'I';

The following variables need to be ingested: METHODNR, SPCOMM, ACTIVITY, PLANTEDRELEASED, total_length, mantle_length, carapace_length, FYKENETDUR, FYKENETNR, BAITTRAPHRS, BAITTRAPNUM

Occurrence

For birds the following join is needed:

Code Block
JOIN bdbsa.supatch sp ON sv."PATCHID" = sp."PATCHID" 
join bdbsa.suspecies spp on sv."VISITNR" = spp."VISITNR"
join bdbsa.vssp vs on vs."NSXCODE" = spp."NSXCODE"
full join bdbsa.sutrap str on str."VISITNR" = sv."VISITNR"
where (spp."SPECIESTYPE" = 'B')

and the following columns will be ingested:

METHODNR, species_name, STRATANR, NUMOBSERVED, MICROHABNR, MACROHABNR, SPCOMM, SEX, ACTIVITY, PLANTEDRELEASED, NUMNIGHTS, NUMELLIOTTRAP, NUMELLIOTNIGHTS, NUMPITTRAP, NUMPITNIGHTS, NUMCAGETRAP, NUMCAGENIGHTS, ISHARPTRAP, ISMISTNET, ISHAIRTUBE, ISBATDETECTOR

Most of the variables after PLANTEDRELEASEDmay be removed, this needs to be confirmed.

For mammals

  1. For mammals, the following joins and logic are required

    1. Code Block
      FROM bdbsa.suvisit sv JOIN bdbsa.supatch sp ON sv."PATCHID" = sp."PATCHID"  
      join bdbsa.suspecies spp on sv."VISITNR" = spp."VISITNR" 
      join bdbsa.vssp vs on vs."NSXCODE" = spp."NSXCODE" 
      full join bdbsa.sutrap str on str."VISITNR" = sv."VISITNR" 
      where (spp."SPECIESTYPE" = 'M' and
       "TEATS" is null 
      and "VAGINA" is null 
      and "POUCH" is null
      and "TESTES" is null
      and "WEIGHT" is null
      and "NUMPOUCH" is null
      and "LENGTH" is null)
  2. Convert 'none detected' value in NUMOBSERVED to 0

  3. The following variables are to be ingested STRATANR, MACROHABNR, species_name, NUMOBSERVED, MICROHABNR, SPCOMM, SEX, ACTIVITY, PLANTEDRELEASED, NUMNIGHTS, NUMELLIOTTRAP, NUMELLIOTNIGHTS, NUMPITTRAP, NUMPITNIGHTS, NUMCAGETRAP, NUMCAGENIGHTS, ISHARPTRAP, ISMISTNET, ISHAIRTUBE, ISBATDETECTOR

For Fish

  1. The following logic is required for fish

    1. Code Block
      from suspecies spp
      left join bdbsa.sutrap str on str."VISITNR" = spp."VISITNR"
      left join bdbsa.suvisit sv on sv."VISITNR" = spp."VISITNR" 
      left JOIN bdbsa.supatch sp ON sp."PATCHID" = sv."PATCHID"
      where (spp."SPECIESTYPE" = 'F' and "LENGTH" is null and "WEIGHT" is null);
  2. The following variables will be ingested: species_name, NUMOBSERVED, PRESENCE, SPCOMM, SEX, ACTIVITY, PLANTEDRELEASED, FYKENETDUR, FYKENETNR, BAITTRAPHRS, BAITTRAPNUM

For Reptiles

  1. The following logic/joins are required

    1. Code Block
      from suspecies spp
      left join bdbsa.sutrap str on str."VISITNR" = spp."VISITNR"
      left join bdbsa.suvisit sv on sv."VISITNR" = spp."VISITNR" 
      JOIN bdbsa.supatch sp ON sp."PATCHID" = sv."PATCHID"
      where (spp."SPECIESTYPE" = 'R' and "LENGTH" is null and "WEIGHT" is null);
  2. The following variables will be ingested: STRATANR, METHODNR, MACROHABNR, MICROHABNR, MACROHABNR, species_name, NUMOBSERVED, PRESENCE, SPCOMM, SEX, ISGRAVID, PLANTEDRELEASED, NUMNIGHTS, NUMELLIOTTRAP, NUMELLIOTNIGHTS, NUMPITTRAP, NUMPITNIGHTS, NUMCAGETRAP, NUMCAGENIGHTS

For Amphibians

  1. The following logic and joins are required

    1. Code Block
      from suspecies spp
      left join bdbsa.sutrap str on str."VISITNR" = spp."VISITNR"
      left join bdbsa.suvisit sv on sv."VISITNR" = spp."VISITNR" 
      left JOIN bdbsa.supatch sp ON sp."PATCHID" = sv."PATCHID"
      where (spp."SPECIESTYPE" = 'A' and "LENGTH" is null and "WEIGHT" is null);
  2. The following variables will be ingested: NUMOBSERVED, METHODNR, STRATANR, MACROHABNR, MICROHABNR, SPCOMM, PLANTEDRELEASED, NUMNIGHTS, NUMELLIOTTRAP, NUMELLIOTNIGHTS, NUMPITTRAP, NUMPITNIGHTS, NUMCAGETRAP, NUMCAGENIGHTS, FYKENETDUR, FYKENETNR, BAITTRAPHRS, BAITTRAPNUM, DIPNETHRS, dipnetused

For Invertebrates

  1. The following logic and joins are required

    1. Code Block
      from suspecies spp
      left join bdbsa.sutrap str on str."VISITNR" = spp."VISITNR"
      left join bdbsa.suvisit sv on sv."VISITNR" = spp."VISITNR" 
      left JOIN bdbsa.supatch sp ON sp."PATCHID" = sv."PATCHID"
      where (spp."SPECIESTYPE" = 'I' and "LENGTH" is null and "WEIGHT" is null);
  2. The following variables will be ingested: NUMOBSERVED, METHODNR, SPCOMM, ACTIVITY, PLANTEDRELEASED, NUMNIGHTS, NUMELLIOTTRAP, NUMELLIOTNIGHTS, NUMPITTRAP, NUMPITNIGHTS, NUMCAGETRAP, NUMCAGENIGHTS,

...

  1. FYKENETDUR,

...

  1. FYKENETNR,

...

  1. BAITTRAPHRS, BAITTRAPNUM, DIPNETHRS