Project

General

Profile

« Previous | Next » 

Revision 6746

inputs/VegBank/: Joined together taxonimportance and stemcount tables to create stemcount_, because stemcount actually stores stem abundance by size, rather than grouping stems by organism (http://vegbankdev.nceas.ucsb.edu/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemcount&entity=dba_tabledescription&where=where_tablename)

View differences:

inputs/VegBank/taxonimportance/map.csv
1
VegBank,VegCore,Filter,Comments
2
taxonimportance_id,aggregateOccurrenceID,,
3
taxonobservation_id,taxonOccurrenceID,,"Note that taxonimportance is not 1:1 with taxonobservation [1].
4

  
5
[1] The following query returns rows:
6
-----
7
SELECT taxonobservation_id, count(distinct taxonimportance_id)
8
FROM ""VegBank"".taxonimportance
9
GROUP BY taxonobservation_id
10
HAVING count(distinct taxonimportance_id) > 1
11
-----"
12
stratum_id,*stratum_id,,
13
cover,coverPercent,,
14
basalarea,*basalarea,,
15
biomass,*biomass,,
16
inferencearea,*inferencearea,,
17
stratumbase,*stratumbase,,
18
stratumheight,*stratumheight,,
19
emb_taxonimportance,*emb_taxonimportance,,
20
covercode,*covercode,,
inputs/VegBank/taxonimportance/test.xml.ref
1
Put template:
2
<VegBIEN>
3
    <_setDefault id="-1">
4
        <source_id><source><shortname>VegBank</shortname></source></source_id>
5
        <path>
6
            <_simplifyPath>
7
                <next>parent_id</next>
8
                <path>
9
                    <location>
10
                        <locationevent>
11
                            <taxonoccurrence>
12
                                <aggregateoccurrence>
13
                                    <cover_fraction><_percent_to_fraction><value>$cover</value></_percent_to_fraction></cover_fraction>
14
                                    <sourceaccessioncode>$taxonimportance_id</sourceaccessioncode>
15
                                </aggregateoccurrence>
16
                                <sourceaccessioncode>$taxonobservation_id</sourceaccessioncode>
17
                            </taxonoccurrence>
18
                        </locationevent>
19
                    </location>
20
                </path>
21
            </_simplifyPath>
22
        </path>
23
    </_setDefault>
24
</VegBIEN>
25
Inserted 4 new rows into database
inputs/VegBank/taxonimportance/VegBIEN.csv
1
VegBank,VegBIEN:/_setDefault:[source_id/source/shortname/_env:[name=source]]/path/_simplifyPath:[next=parent_id]/path,Comments
2
taxonobservation_id,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists","Note that taxonimportance is not 1:1 with taxonobservation [1].
3

  
4
[1] The following query returns rows:
5
-----
6
SELECT taxonobservation_id, count(distinct taxonimportance_id)
7
FROM ""VegBank"".taxonimportance
8
GROUP BY taxonobservation_id
9
HAVING count(distinct taxonimportance_id) > 1
10
-----"
11
cover,/location/locationevent/taxonoccurrence/aggregateoccurrence/cover_fraction/_percent_to_fraction/value,
12
taxonimportance_id,/location/locationevent/taxonoccurrence/aggregateoccurrence/sourceaccessioncode,
13
taxonobservation_id,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists","Note that taxonimportance is not 1:1 with taxonobservation [1].
14

  
15
[1] The following query returns rows:
16
-----
17
SELECT taxonobservation_id, count(distinct taxonimportance_id)
18
FROM ""VegBank"".taxonimportance
19
GROUP BY taxonobservation_id
20
HAVING count(distinct taxonimportance_id) > 1
21
-----"
22
taxonobservation_id,/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/1,"Note that taxonimportance is not 1:1 with taxonobservation [1].
23

  
24
[1] The following query returns rows:
25
-----
26
SELECT taxonobservation_id, count(distinct taxonimportance_id)
27
FROM ""VegBank"".taxonimportance
28
GROUP BY taxonobservation_id
29
HAVING count(distinct taxonimportance_id) > 1
30
-----"
31
taxonimportance_id,"/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/2/_if[@name=""if organism in AggregateOccurrence""]/cond/_exists",
32
basalarea,,** No join mapping for *basalarea ** 
33
biomass,,** No join mapping for *biomass ** 
34
covercode,,** No join mapping for *covercode ** 
35
emb_taxonimportance,,** No join mapping for *emb_taxonimportance ** 
36
inferencearea,,** No join mapping for *inferencearea ** 
37
stratum_id,,** No join mapping for *stratum_id ** 
38
stratumbase,,** No join mapping for *stratumbase ** 
39
stratumheight,,** No join mapping for *stratumheight ** 
inputs/VegBank/taxonimportance/new_terms.csv
1
taxonimportance_id,aggregateOccurrenceID,,
2
taxonobservation_id,taxonOccurrenceID,,"Note that taxonimportance is not 1:1 with taxonobservation [1].
3

  
4
[1] The following query returns rows:
5
-----
6
SELECT taxonobservation_id, count(distinct taxonimportance_id)
7
FROM ""VegBank"".taxonimportance
8
GROUP BY taxonobservation_id
9
HAVING count(distinct taxonimportance_id) > 1
10
-----"
11
cover,coverPercent,,
inputs/VegBank/taxonimportance/unmapped_terms.csv
1
*stratum_id
2
*basalarea
3
*biomass
4
*inferencearea
5
*stratumbase
6
*stratumheight
7
*emb_taxonimportance
8
*covercode
inputs/VegBank/taxonimportance/header.csv
1
taxonimportance_id,taxonobservation_id,stratum_id,cover,basalarea,biomass,inferencearea,stratumbase,stratumheight,emb_taxonimportance,covercode
inputs/VegBank/stemcount/header.csv
1
stemcount_id,taxonimportance_id,stemdiameter,stemdiameteraccuracy,stemheight,stemheightaccuracy,stemcount,stemtaxonarea,emb_stemcount
inputs/VegBank/stemcount/map.csv
1
VegBank,VegCore,Filter,Comments
2
stemcount_id,individualID,,
3
taxonimportance_id,aggregateOccurrenceID,,
4
stemdiameter,diameterBreastHeight_cm,,"""The diameter of the stem in centimeters"" (stemDiameter definition at <http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemcount&entity=dba_tabledescription&where=where_tablename>)"
5
stemdiameteraccuracy,*stemdiameteraccuracy,,
6
stemheight,height_m,,"""The measured height of the stem in meters"" (stemHeight definition at <http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemcount&entity=dba_tabledescription&where=where_tablename>)"
7
stemheightaccuracy,*stemheightaccuracy,,
8
stemcount,stemCount,,
9
stemtaxonarea,*stemtaxonarea,,
10
emb_stemcount,*emb_stemcount,,
inputs/VegBank/stemcount/test.xml.ref
1
Put template:
2
<VegBIEN>
3
    <_setDefault id="-1">
4
        <source_id><source><shortname>VegBank</shortname></source></source_id>
5
        <path>
6
            <_simplifyPath>
7
                <next>parent_id</next>
8
                <path>
9
                    <location>
10
                        <locationevent>
11
                            <taxonoccurrence>
12
                                <aggregateoccurrence>
13
                                    <plantobservation>
14
                                        <sourceaccessioncode>$stemcount_id</sourceaccessioncode>
15
                                        <stemcount>$stemcount</stemcount>
16
                                        <stemobservation>
17
                                            <diameterbreastheight_m><_cm_to_m><value>$stemdiameter</value></_cm_to_m></diameterbreastheight_m>
18
                                            <height_m>$stemheight</height_m>
19
                                        </stemobservation>
20
                                    </plantobservation>
21
                                    <sourceaccessioncode>$taxonimportance_id</sourceaccessioncode>
22
                                </aggregateoccurrence>
23
                            </taxonoccurrence>
24
                        </locationevent>
25
                    </location>
26
                </path>
27
            </_simplifyPath>
28
        </path>
29
    </_setDefault>
30
</VegBIEN>
31
Inserted 4 new rows into database
inputs/VegBank/stemcount/VegBIEN.csv
1
VegBank,VegBIEN:/_setDefault:[source_id/source/shortname/_env:[name=source]]/path/_simplifyPath:[next=parent_id]/path,Comments
2
stemcount_id,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
3
stemcount_id,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/sourceaccessioncode,
4
stemcount,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemcount,
5
stemdiameter,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/diameterbreastheight_m/_cm_to_m/value,"""The diameter of the stem in centimeters"" (stemDiameter definition at <http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemcount&entity=dba_tabledescription&where=where_tablename>)"
6
stemheight,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/height_m,"""The measured height of the stem in meters"" (stemHeight definition at <http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemcount&entity=dba_tabledescription&where=where_tablename>)"
7
taxonimportance_id,/location/locationevent/taxonoccurrence/aggregateoccurrence/sourceaccessioncode,
8
stemcount_id,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
9
taxonimportance_id,"/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/2/_if[@name=""if organism in AggregateOccurrence""]/cond/_exists",
10
stemcount_id,"/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/2/_if[@name=""if organism in AggregateOccurrence""]/else",
11
emb_stemcount,,** No join mapping for *emb_stemcount ** 
12
stemdiameteraccuracy,,** No join mapping for *stemdiameteraccuracy ** 
13
stemheightaccuracy,,** No join mapping for *stemheightaccuracy ** 
14
stemtaxonarea,,** No join mapping for *stemtaxonarea ** 
inputs/VegBank/stemcount/new_terms.csv
1
stemcount_id,individualID,,
2
taxonimportance_id,aggregateOccurrenceID,,
3
stemdiameter,diameterBreastHeight_cm,,"""The diameter of the stem in centimeters"" (stemDiameter definition at <http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemcount&entity=dba_tabledescription&where=where_tablename>)"
4
stemheight,height_m,,"""The measured height of the stem in meters"" (stemHeight definition at <http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemcount&entity=dba_tabledescription&where=where_tablename>)"
inputs/VegBank/stemcount/unmapped_terms.csv
1
*stemdiameteraccuracy
2
*stemheightaccuracy
3
*stemtaxonarea
4
*emb_stemcount
inputs/VegBank/stemcount_/create.sql
1
SELECT *
2
FROM taxonimportance
3
LEFT JOIN stemcount USING (taxonimportance_id)
4
;
inputs/VegBank/stemcount_/header.csv
1
taxonimportance_id,taxonobservation_id,stratum_id,cover,basalarea,biomass,inferencearea,stratumbase,stratumheight,emb_taxonimportance,covercode,stemcount_id,stemdiameter,stemdiameteraccuracy,stemheight,stemheightaccuracy,stemcount,stemtaxonarea,emb_stemcount
inputs/VegBank/stemcount_/map.csv
1
VegBank,VegCore,Filter,Comments
2
taxonimportance_id,OMIT,,Omitted because stemcount_id is more specific
3
taxonobservation_id,taxonOccurrenceID,,"Note that taxonimportance is not 1:1 with taxonobservation [1].
4

  
5
[1] The following query returns rows:
6
-----
7
SELECT taxonobservation_id, count(distinct taxonimportance_id)
8
FROM ""VegBank"".taxonimportance
9
GROUP BY taxonobservation_id
10
HAVING count(distinct taxonimportance_id) > 1
11
-----"
12
stratum_id,*stratum_id,,
13
cover,coverPercent,,
14
basalarea,*basalarea,,
15
biomass,*biomass,,
16
inferencearea,*inferencearea,,
17
stratumbase,*stratumbase,,
18
stratumheight,*stratumheight,,
19
emb_taxonimportance,*emb_taxonimportance,,
20
covercode,*covercode,,
21
stemcount_id,aggregateOccurrenceID,,
22
stemdiameter,diameterBreastHeight_cm,,"""The diameter of the stem in centimeters"" (stemDiameter definition at <http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemcount&entity=dba_tabledescription&where=where_tablename>)"
23
stemdiameteraccuracy,*stemdiameteraccuracy,,
24
stemheight,height_m,,"""The measured height of the stem in meters"" (stemHeight definition at <http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemcount&entity=dba_tabledescription&where=where_tablename>)"
25
stemheightaccuracy,*stemheightaccuracy,,
26
stemcount,individualCount,,
27
stemtaxonarea,*stemtaxonarea,,
28
emb_stemcount,*emb_stemcount,,
inputs/VegBank/stemcount_/VegBIEN.csv
1
VegBank,VegBIEN:/_setDefault:[source_id/source/shortname/_env:[name=source]]/path/_simplifyPath:[next=parent_id]/path,Comments
2
taxonobservation_id,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists","Note that taxonimportance is not 1:1 with taxonobservation [1].
3

  
4
[1] The following query returns rows:
5
-----
6
SELECT taxonobservation_id, count(distinct taxonimportance_id)
7
FROM ""VegBank"".taxonimportance
8
GROUP BY taxonobservation_id
9
HAVING count(distinct taxonimportance_id) > 1
10
-----"
11
stemcount,/location/locationevent/taxonoccurrence/aggregateoccurrence/count,
12
cover,/location/locationevent/taxonoccurrence/aggregateoccurrence/cover_fraction/_percent_to_fraction/value,
13
stemdiameter,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/diameterbreastheight_m/_cm_to_m/value,"""The diameter of the stem in centimeters"" (stemDiameter definition at <http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemcount&entity=dba_tabledescription&where=where_tablename>)"
14
stemheight,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/height_m,"""The measured height of the stem in meters"" (stemHeight definition at <http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemcount&entity=dba_tabledescription&where=where_tablename>)"
15
stemcount_id,/location/locationevent/taxonoccurrence/aggregateoccurrence/sourceaccessioncode,
16
taxonobservation_id,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists","Note that taxonimportance is not 1:1 with taxonobservation [1].
17

  
18
[1] The following query returns rows:
19
-----
20
SELECT taxonobservation_id, count(distinct taxonimportance_id)
21
FROM ""VegBank"".taxonimportance
22
GROUP BY taxonobservation_id
23
HAVING count(distinct taxonimportance_id) > 1
24
-----"
25
taxonobservation_id,/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/1,"Note that taxonimportance is not 1:1 with taxonobservation [1].
26

  
27
[1] The following query returns rows:
28
-----
29
SELECT taxonobservation_id, count(distinct taxonimportance_id)
30
FROM ""VegBank"".taxonimportance
31
GROUP BY taxonobservation_id
32
HAVING count(distinct taxonimportance_id) > 1
33
-----"
34
stemcount_id,"/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/2/_if[@name=""if organism in AggregateOccurrence""]/cond/_exists",
35
basalarea,,** No join mapping for *basalarea ** 
36
biomass,,** No join mapping for *biomass ** 
37
covercode,,** No join mapping for *covercode ** 
38
emb_stemcount,,** No join mapping for *emb_stemcount ** 
39
emb_taxonimportance,,** No join mapping for *emb_taxonimportance ** 
40
inferencearea,,** No join mapping for *inferencearea ** 
41
stemdiameteraccuracy,,** No join mapping for *stemdiameteraccuracy ** 
42
stemheightaccuracy,,** No join mapping for *stemheightaccuracy ** 
43
stemtaxonarea,,** No join mapping for *stemtaxonarea ** 
44
stratum_id,,** No join mapping for *stratum_id ** 
45
stratumbase,,** No join mapping for *stratumbase ** 
46
stratumheight,,** No join mapping for *stratumheight ** 
47
taxonimportance_id,,** No non-empty join mapping for OMIT ** Omitted because stemcount_id is more specific
inputs/VegBank/stemcount_/test.xml.ref
1
Put template:
2
<VegBIEN>
3
    <_setDefault id="-1">
4
        <source_id><source><shortname>VegBank</shortname></source></source_id>
5
        <path>
6
            <_simplifyPath>
7
                <next>parent_id</next>
8
                <path>
9
                    <location>
10
                        <locationevent>
11
                            <taxonoccurrence>
12
                                <aggregateoccurrence>
13
                                    <count>$stemcount</count>
14
                                    <cover_fraction><_percent_to_fraction><value>$cover</value></_percent_to_fraction></cover_fraction>
15
                                    <plantobservation>
16
                                        <stemobservation>
17
                                            <diameterbreastheight_m><_cm_to_m><value>$stemdiameter</value></_cm_to_m></diameterbreastheight_m>
18
                                            <height_m>$stemheight</height_m>
19
                                        </stemobservation>
20
                                    </plantobservation>
21
                                    <sourceaccessioncode>$stemcount_id</sourceaccessioncode>
22
                                </aggregateoccurrence>
23
                                <sourceaccessioncode>$taxonobservation_id</sourceaccessioncode>
24
                            </taxonoccurrence>
25
                        </locationevent>
26
                    </location>
27
                </path>
28
            </_simplifyPath>
29
        </path>
30
    </_setDefault>
31
</VegBIEN>
32
Inserted 8 new rows into database
inputs/VegBank/stemcount_/new_terms.csv
1
taxonimportance_id,OMIT,,Omitted because stemcount_id is more specific
2
taxonobservation_id,taxonOccurrenceID,,"Note that taxonimportance is not 1:1 with taxonobservation [1].
3

  
4
[1] The following query returns rows:
5
-----
6
SELECT taxonobservation_id, count(distinct taxonimportance_id)
7
FROM ""VegBank"".taxonimportance
8
GROUP BY taxonobservation_id
9
HAVING count(distinct taxonimportance_id) > 1
10
-----"
11
cover,coverPercent,,
12
stemcount_id,aggregateOccurrenceID,,
13
stemdiameter,diameterBreastHeight_cm,,"""The diameter of the stem in centimeters"" (stemDiameter definition at <http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemcount&entity=dba_tabledescription&where=where_tablename>)"
14
stemheight,height_m,,"""The measured height of the stem in meters"" (stemHeight definition at <http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemcount&entity=dba_tabledescription&where=where_tablename>)"
inputs/VegBank/stemcount_/unmapped_terms.csv
1
*stratum_id
2
*basalarea
3
*biomass
4
*inferencearea
5
*stratumbase
6
*stratumheight
7
*emb_taxonimportance
8
*covercode
9
*stemdiameteraccuracy
10
*stemheightaccuracy
11
*stemtaxonarea
12
*emb_stemcount
inputs/VegBank/import_order.txt
2 2
plot_
3 3
observation_
4 4
taxonobservation_
5
taxonimportance
6
stemcount
5
stemcount_
7 6
stemlocation

Also available in: Unified diff