Project

General

Profile

« Previous | Next » 

Revision 7791

Added inputs/CTFS/AggregateObservation/ from BIEN2 data

View differences:

inputs/CTFS/import_order.txt
5 5
SubplotObservation
6 6
TaxonOccurrence
7 7
StemObservation
8
AggregateObservation
inputs/CTFS/AggregateObservation/map.csv
1
CTFS,VegCore,Filter,Comments
2
DWstagingID,occurrenceID,,
3
Country,country,,
4
Province,stateProvince,,
5
Plot,locationName,,
6
CensusName,authorEventCode,,
7
Latitude ,decimalLatitude,,
8
Longitude ,decimalLongitude,,
9
Elevation ,elevationInMeters,,Assuming units based on the range and precision of values
10
Genus ,genus,,
11
speciesname,specificEpithet,,
12
subspecies,subspecies,,
13
StartDate,startDate,,
14
EndDate,endDate,,
15
MeanDate,*MeanDate,,
16
Abund,individualCount,,
17
VegCategory,growthForm,,
18
maxDBHcm,diameterBreastHeight_cm,/_avg/1,
19
minDBHcm,diameterBreastHeight_cm,/_avg/2,
20
PlotSize,plotArea_ha,,Assuming units based on the range and precision of values compared to the PlotShape values
21
PlotShape,footprintWKT,,
inputs/CTFS/AggregateObservation/VegBIEN.csv
1
CTFS,VegBIEN:/_setDefault:[source_id/source/shortname/_env:[name=source]]/path/_simplifyPath:[next=parent_id]/path,Comments
2
DWstagingID,"/_if[@name=""if specimen""]/cond/_exists",
3
Plot,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/1",
4
CensusName,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/2/_if[@name=""if locationID""]/else",
5
DWstagingID,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/3/_if[@name=""if plot""]/else/_alt/1",
6
DWstagingID,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/3/_if[@name=""if plot""]/else/_alt/2/_if[@name=""if catalogNumber""]/then/_join/1/_if[@name=""if specimen""]/cond/_exists",
7
Plot,"/location/_if[@name=""if subplot""]/then/parent_id/location/authorlocationcode",
8
PlotSize,/location/area_m2/_ha_to_m2/value,Assuming units based on the range and precision of values compared to the PlotShape values
9
Elevation ,/location/elevation_m/_alt/1,Assuming units based on the range and precision of values
10
DWstagingID,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
11
CensusName,"/location/locationevent/_if[@name=""if subplot""]/else/authoreventcode",
12
CensusName,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/cond/_exists",
13
EndDate,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/cond/_exists",
14
StartDate,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/cond/_exists",
15
Plot,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/*_id/location/authorlocationcode/_if[@name=""if subplot""]/then",
16
CensusName,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/authoreventcode",
17
EndDate,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/obsenddate/_alt/1",
18
StartDate,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/obsstartdate/_alt/1",
19
EndDate,/location/locationevent/obsenddate/_alt/1,
20
StartDate,/location/locationevent/obsstartdate/_alt/1,
21
Abund,/location/locationevent/taxonoccurrence/aggregateoccurrence/count,
22
DWstagingID,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/cond/_exists",
23
DWstagingID,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/sourceaccessioncode,
24
maxDBHcm,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/diameterbreastheight_m/_cm_to_m/value/_avg/1,
25
minDBHcm,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/diameterbreastheight_m/_cm_to_m/value/_avg/2,
26
CensusName,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/cond/_exists",
27
Plot,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/cond/_exists",
28
VegCategory,/location/locationevent/taxonoccurrence/growthform,
29
DWstagingID,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
30
DWstagingID,/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/3,
31
subspecies,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=subspecies]/taxonepithet",
32
speciesname,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=species]/taxonepithet",
33
Genus ,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=genus]/taxonepithet",
34
Genus ,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/2,
35
speciesname,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/1,
36
subspecies,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/4,
37
Genus ,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/genus,
38
speciesname,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/specific_epithet,
39
PlotShape,/location/locationplace/*_id/place/*_id/coordinates/footprintgeometry_dwc,
40
Latitude ,"/location/locationplace/*_id/place/*_id/coordinates/latitude_deg/_nullIf:[null=0,type=float]/value",
41
Longitude ,"/location/locationplace/*_id/place/*_id/coordinates/longitude_deg/_nullIf:[null=0,type=float]/value",
42
Country,/location/locationplace/*_id/place/country,
43
Latitude ,"/location/locationplace/*_id/place/matched_place_id/place:[.,source_id/source/shortname=geoscrub]/*_id/coordinates:[source_id/source/shortname=geoscrub]/_first/2/latitude_deg/_nullIf:[null=0,type=float]/value",""".,"" sorts it with other coordinates mappings"
44
Longitude ,"/location/locationplace/*_id/place/matched_place_id/place:[.,source_id/source/shortname=geoscrub]/*_id/coordinates:[source_id/source/shortname=geoscrub]/_first/2/longitude_deg/_nullIf:[null=0,type=float]/value",""".,"" sorts it with other coordinates mappings"
45
Country,/location/locationplace/*_id/place/matched_place_id/place:[source_id/source/shortname=geoscrub]/country/_first/2,
46
Province,/location/locationplace/*_id/place/matched_place_id/place:[source_id/source/shortname=geoscrub]/stateprovince/_first/2,
47
Province,/location/locationplace/*_id/place/stateprovince,
48
MeanDate,,** No join mapping for *MeanDate ** 
inputs/CTFS/AggregateObservation/test.xml.ref
1
Put template:
2
<VegBIEN>
3
    <_setDefault id="-1">
4
        <source_id><source><shortname>CTFS</shortname></source></source_id>
5
        <path>
6
            <_simplifyPath>
7
                <next>parent_id</next>
8
                <path>
9
                    <location>
10
                        <authorlocationcode>$Plot</authorlocationcode>
11
                        <area_m2><_ha_to_m2><value>$PlotSize</value></_ha_to_m2></area_m2>
12
                        <elevation_m>$Elevation </elevation_m>
13
                        <locationevent>
14
                            <authoreventcode>$CensusName</authoreventcode>
15
                            <obsenddate>$EndDate</obsenddate>
16
                            <obsstartdate>$StartDate</obsstartdate>
17
                            <taxonoccurrence>
18
                                <aggregateoccurrence>
19
                                    <count>$Abund</count>
20
                                    <plantobservation>
21
                                        <specimenreplicate><sourceaccessioncode>$DWstagingID</sourceaccessioncode></specimenreplicate>
22
                                        <stemobservation>
23
                                            <diameterbreastheight_m>
24
                                                <_cm_to_m>
25
                                                    <value>
26
                                                        <_avg>
27
                                                            <1>$maxDBHcm</1>
28
                                                            <2>$minDBHcm</2>
29
                                                        </_avg>
30
                                                    </value>
31
                                                </_cm_to_m>
32
                                            </diameterbreastheight_m>
33
                                        </stemobservation>
34
                                    </plantobservation>
35
                                </aggregateoccurrence>
36
                                <growthform>$VegCategory</growthform>
37
                                <sourceaccessioncode>$DWstagingID</sourceaccessioncode>
38
                                <taxondetermination>
39
                                    <taxonverbatim_id>
40
                                        <taxonverbatim>
41
                                            <taxonlabel_id>
42
                                                <taxonlabel>
43
                                                    <parent_id>
44
                                                        <taxonlabel>
45
                                                            <parent_id>
46
                                                                <taxonlabel>
47
                                                                    <rank>cultivar</rank>
48
                                                                    <parent_id>
49
                                                                        <taxonlabel>
50
                                                                            <rank>forma</rank>
51
                                                                            <parent_id>
52
                                                                                <taxonlabel>
53
                                                                                    <rank>variety</rank>
54
                                                                                    <parent_id>
55
                                                                                        <taxonlabel>
56
                                                                                            <rank>subspecies</rank>
57
                                                                                            <taxonepithet>$subspecies</taxonepithet>
58
                                                                                            <parent_id>
59
                                                                                                <taxonlabel>
60
                                                                                                    <rank>species</rank>
61
                                                                                                    <taxonepithet>$speciesname</taxonepithet>
62
                                                                                                    <parent_id>
63
                                                                                                        <taxonlabel>
64
                                                                                                            <rank>genus</rank>
65
                                                                                                            <taxonepithet>$Genus </taxonepithet>
66
                                                                                                        </taxonlabel>
67
                                                                                                    </parent_id>
68
                                                                                                </taxonlabel>
69
                                                                                            </parent_id>
70
                                                                                        </taxonlabel>
71
                                                                                    </parent_id>
72
                                                                                </taxonlabel>
73
                                                                            </parent_id>
74
                                                                        </taxonlabel>
75
                                                                    </parent_id>
76
                                                                </taxonlabel>
77
                                                            </parent_id>
78
                                                        </taxonlabel>
79
                                                    </parent_id>
80
                                                    <taxonomicname>
81
                                                        <_join_words>
82
                                                            <2>$Genus </2>
83
                                                            <3>$speciesname</3>
84
                                                            <4>$subspecies</4>
85
                                                        </_join_words>
86
                                                    </taxonomicname>
87
                                                </taxonlabel>
88
                                            </taxonlabel_id>
89
                                            <genus>$Genus </genus>
90
                                            <specific_epithet>$speciesname</specific_epithet>
91
                                        </taxonverbatim>
92
                                    </taxonverbatim_id>
93
                                </taxondetermination>
94
                            </taxonoccurrence>
95
                        </locationevent>
96
                        <locationplace>
97
                            <place_id>
98
                                <place>
99
                                    <coordinates_id>
100
                                        <coordinates>
101
                                            <footprintgeometry_dwc>$PlotShape</footprintgeometry_dwc>
102
                                            <latitude_deg>
103
                                                <_nullIf>
104
                                                    <null>0</null>
105
                                                    <type>float</type>
106
                                                    <value>$Latitude </value>
107
                                                </_nullIf>
108
                                            </latitude_deg>
109
                                            <longitude_deg>
110
                                                <_nullIf>
111
                                                    <null>0</null>
112
                                                    <type>float</type>
113
                                                    <value>$Longitude </value>
114
                                                </_nullIf>
115
                                            </longitude_deg>
116
                                        </coordinates>
117
                                    </coordinates_id>
118
                                    <country>$Country</country>
119
                                    <matched_place_id>
120
                                        <place>
121
                                            <source_id><source><shortname>geoscrub</shortname></source></source_id>
122
                                            <coordinates_id>
123
                                                <coordinates>
124
                                                    <source_id><source><shortname>geoscrub</shortname></source></source_id>
125
                                                    <latitude_deg>
126
                                                        <_nullIf>
127
                                                            <null>0</null>
128
                                                            <type>float</type>
129
                                                            <value>$Latitude </value>
130
                                                        </_nullIf>
131
                                                    </latitude_deg>
132
                                                    <longitude_deg>
133
                                                        <_nullIf>
134
                                                            <null>0</null>
135
                                                            <type>float</type>
136
                                                            <value>$Longitude </value>
137
                                                        </_nullIf>
138
                                                    </longitude_deg>
139
                                                </coordinates>
140
                                            </coordinates_id>
141
                                            <country>$Country</country>
142
                                            <stateprovince>$Province</stateprovince>
143
                                        </place>
144
                                    </matched_place_id>
145
                                    <stateprovince>$Province</stateprovince>
146
                                </place>
147
                            </place_id>
148
                        </locationplace>
149
                    </location>
150
                </path>
151
            </_simplifyPath>
152
        </path>
153
    </_setDefault>
154
</VegBIEN>
155
Inserted 29 new rows into database
inputs/CTFS/AggregateObservation/new_terms.csv
1
DWstagingID,occurrenceID,,
2
Province,stateProvince,,
3
Plot,locationName,,
4
CensusName,authorEventCode,,
5
Abund,individualCount,,
6
VegCategory,growthForm,,
7
maxDBHcm,diameterBreastHeight_cm,/_avg/1,
8
minDBHcm,diameterBreastHeight_cm,/_avg/2,
9
PlotSize,plotArea_ha,,Assuming units based on the range and precision of values compared to the PlotShape values
10
PlotShape,footprintWKT,,
inputs/CTFS/AggregateObservation/unmapped_terms.csv
1
*MeanDate

Also available in: Unified diff