Revision 10385
Added by Aaron Marcuse-Kubitza over 11 years ago
inputs/BRIT/specimen_flat/postprocess.sql | ||
---|---|---|
26 | 26 |
|
27 | 27 |
SELECT mk_derived_col((:table_str, 'diameterBreastHeight_cm'), $$_avg("DBH_Min" , "DBH_Max" )$$); -- runtime: 0.3 s ("Time: 326.615 ms") @starscream |
28 | 28 |
SELECT mk_derived_col((:table_str, 'height_m'), $$_avg("Height_Min", "Height_Max")$$); -- runtime: 0.3 s ("Time: 346.548 ms") @starscream |
29 |
|
|
30 |
SELECT mk_derived_col((:table_str, 'recordedBy'), |
|
31 |
$$_join("Collector_Abbrev_Name", "Collection_Team")$$) |
|
32 |
; -- runtime: 0.3 s ("Time: 281.817 ms") @starscream |
|
33 |
SELECT mk_derived_col((:table_str, 'locality'), |
|
34 |
$$_join("Locality_Summary", "Locality_Description", "Locality_Site_Specific")$$) |
|
35 |
; -- runtime: 0.3 s ("Time: 254.771 ms") @starscream |
inputs/BRIT/specimen_flat/map.csv | ||
---|---|---|
2 | 2 |
specimen_id,dataProviderRecordID,, |
3 | 3 |
Institution_Code,specimenHolderInstitutions,, |
4 | 4 |
Global_Unique_Identifier,UNUSED#Global_Unique_Identifier,, |
5 |
Collector_Abbrev_Name,recordedBy,/_join/1,
|
|
6 |
Collection_Team,recordedBy,/_join/2,
|
|
5 |
Collector_Abbrev_Name,recordedBy_primary,,the primary collector
|
|
6 |
Collection_Team,recordedBy_additional,,additional collectors
|
|
7 | 7 |
Collection_Number,collectorNumber,, |
8 | 8 |
Date_of_Collection,dateCollected,, |
9 | 9 |
Year_Collected,yearCollected,, |
... | ... | |
30 | 30 |
Closest_Town,UNUSED#Closest_Town,, |
31 | 31 |
Research_Site_Name,*Research_Site_Name,, |
32 | 32 |
Project_Name,projectName,, |
33 |
Locality_Summary,locality,/_join/1,
|
|
34 |
Locality_Description,locality,/_join/2,
|
|
35 |
Locality_Site_Specific,locality,/_join/3,
|
|
33 |
Locality_Summary,locality__area__prefix,,rarely populated
|
|
34 |
Locality_Description,locality__area__main,,
|
|
35 |
Locality_Site_Specific,locality__spot,,"location within area, including landmarks"
|
|
36 | 36 |
Habitat_Description,habitat,, |
37 | 37 |
Habitat_Summary,UNUSED#Habitat_Summary,, |
38 | 38 |
Soil_Description,*Soil_Description,, |
... | ... | |
66 | 66 |
occurrenceRemarks,occurrenceRemarks,, |
67 | 67 |
diameterBreastHeight_cm,diameterBreastHeight_cm,, |
68 | 68 |
height_m,height_m,, |
69 |
recordedBy,recordedBy,, |
|
70 |
locality,locality,, |
inputs/BRIT/specimen_flat/VegBIEN.csv | ||
---|---|---|
11 | 11 |
Elevation_Min,/location/elevation_m/_alt/2/_avg/1,Assuming units based on the range and precision of values |
12 | 12 |
Elevation_Max,/location/elevation_m/_alt/2/_avg/2,Assuming units based on the range and precision of values |
13 | 13 |
Collection_Number,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists", |
14 |
Locality_Summary,/location/iscultivated/_or/2/_locationnarrative_is_cultivated/locationnarrative/_join/1/_join/1, |
|
15 |
Locality_Description,/location/iscultivated/_or/2/_locationnarrative_is_cultivated/locationnarrative/_join/1/_join/2, |
|
16 |
Locality_Site_Specific,/location/iscultivated/_or/2/_locationnarrative_is_cultivated/locationnarrative/_join/1/_join/3, |
|
14 |
locality,/location/iscultivated/_or/2/_locationnarrative_is_cultivated/locationnarrative/_join/1, |
|
17 | 15 |
Habitat_Description,/location/iscultivated/_or/2/_locationnarrative_is_cultivated/locationnarrative/_join/3, |
18 | 16 |
Collection_Method,/location/locationevent/*_id/method/name, |
19 | 17 |
Project_Name,/location/locationevent/*_id/project/projectname, |
... | ... | |
39 | 37 |
height_m,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/height_m, |
40 | 38 |
Collection_Number,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/2/_first/3", |
41 | 39 |
Scientific_Name,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/3/_first/2", |
42 |
Collector_Abbrev_Name,/location/locationevent/taxonoccurrence/collector_id/party/fullname/_join/1, |
|
43 |
Collection_Team,/location/locationevent/taxonoccurrence/collector_id/party/fullname/_join/2, |
|
40 |
recordedBy,/location/locationevent/taxonoccurrence/collector_id/party/fullname, |
|
44 | 41 |
Collection_Number,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists", |
45 | 42 |
specimen_id,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists", |
46 | 43 |
specimen_id,/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/3, |
... | ... | |
71 | 68 |
Year_Identified,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/determinationdate/_alt/2/_date/year/_nullIf:[null=0,type=float]/value", |
72 | 69 |
Catalog_Number,"/location/locationevent/taxonoccurrence/voucher/*_id/specimenreplicate/catalognumber_dwc/_if[@name=""if indirect voucher""]/then", |
73 | 70 |
Collection_Number,"/location/locationevent/taxonoccurrence/voucher/*_id/specimenreplicate/collectionnumber/_if[@name=""if indirect voucher""]/then", |
74 |
Locality_Summary,/location/locationnarrative/_merge/1/_join/1, |
|
75 |
Locality_Description,/location/locationnarrative/_merge/1/_join/2, |
|
76 |
Locality_Site_Specific,/location/locationnarrative/_merge/1/_join/3, |
|
71 |
locality,/location/locationnarrative/_merge/1, |
|
77 | 72 |
Habitat_Description,"/location/locationnarrative/_merge/3/_label[label=""habitat""]/value","Brad: Free-text description of vegetation community where collected, frequently redundane wrt 'Vegetation'. Bob, Nick: keep as user defined or create special element?" |
78 | 73 |
Coordinate_Uncertainity,/location/locationplace/*_id/place/*_id/coordinates/coordsaccuracy_m/_noCV/value,Assuming units based on the range and precision of values |
79 | 74 |
Latitude,"/location/locationplace/*_id/place/*_id/coordinates/latitude_deg/_nullIf:[null=0,type=float]/value", |
... | ... | |
90 | 85 |
Auxilirary_Collections,,** No non-empty join mapping for UNUSED#Auxilirary_Collections ** |
91 | 86 |
Basis_Of_Specimen,,** No join mapping for basisOfRecord ** |
92 | 87 |
Closest_Town,,** No non-empty join mapping for UNUSED#Closest_Town ** |
88 |
Collection_Team,,** No join mapping for recordedBy_additional ** additional collectors |
|
89 |
Collector_Abbrev_Name,,** No join mapping for recordedBy_primary ** the primary collector |
|
93 | 90 |
DBH_Max,,** No join mapping for diameterBreastHeight_max_cm_verbatim ** Assuming units based on the range and precision of values |
94 | 91 |
DBH_Min,,** No join mapping for diameterBreastHeight_min_cm_verbatim ** Assuming units based on the range and precision of values |
95 | 92 |
Dubpliate_Herbarium,,** No non-empty join mapping for UNUSED#Dubpliate_Herbarium ** |
... | ... | |
100 | 97 |
Height_Min,,** No join mapping for height_min_m_verbatim ** Assuming units based on the range and precision of values |
101 | 98 |
Infra_Rank,,** No join mapping for infraspecificRank ** |
102 | 99 |
Local_Name,,** No join mapping for vernacularName ** |
100 |
Locality_Description,,** No join mapping for locality__area__main ** |
|
101 |
Locality_Site_Specific,,"** No join mapping for locality__spot ** location within area, including landmarks" |
|
102 |
Locality_Summary,,** No join mapping for locality__area__prefix ** rarely populated |
|
103 | 103 |
Notes_Plant,,** No join mapping for occurrenceRemarks_verbatim ** |
104 | 104 |
Research_Site_Name,,** No join mapping for *Research_Site_Name ** |
105 | 105 |
Soil_Description,,** No join mapping for *Soil_Description ** |
inputs/BRIT/specimen_flat/test.xml.ref | ||
---|---|---|
28 | 28 |
<_locationnarrative_is_cultivated> |
29 | 29 |
<locationnarrative> |
30 | 30 |
<_join> |
31 |
<1> |
|
32 |
<_join> |
|
33 |
<1>$Locality_Summary</1> |
|
34 |
<2>$Locality_Description</2> |
|
35 |
<3>$Locality_Site_Specific</3> |
|
36 |
</_join> |
|
37 |
</1> |
|
31 |
<1>$locality</1> |
|
38 | 32 |
<3>$Habitat_Description</3> |
39 | 33 |
</_join> |
40 | 34 |
</locationnarrative> |
... | ... | |
103 | 97 |
</stemobservation> |
104 | 98 |
</plantobservation> |
105 | 99 |
</aggregateoccurrence> |
106 |
<collector_id> |
|
107 |
<party> |
|
108 |
<fullname> |
|
109 |
<_join> |
|
110 |
<1>$Collector_Abbrev_Name</1> |
|
111 |
<2>$Collection_Team</2> |
|
112 |
</_join> |
|
113 |
</fullname> |
|
114 |
</party> |
|
115 |
</collector_id> |
|
100 |
<collector_id><party><fullname>$recordedBy</fullname></party></collector_id> |
|
116 | 101 |
<sourceaccessioncode>$specimen_id</sourceaccessioncode> |
117 | 102 |
<taxondetermination> |
118 | 103 |
<party_id><party><fullname>$Determined_By_Name</fullname></party></party_id> |
... | ... | |
253 | 238 |
</locationevent> |
254 | 239 |
<locationnarrative> |
255 | 240 |
<_merge> |
256 |
<1> |
|
257 |
<_join> |
|
258 |
<1>$Locality_Summary</1> |
|
259 |
<2>$Locality_Description</2> |
|
260 |
<3>$Locality_Site_Specific</3> |
|
261 |
</_join> |
|
262 |
</1> |
|
241 |
<1>$locality</1> |
|
263 | 242 |
<3> |
264 | 243 |
<_label> |
265 | 244 |
<label>habitat</label> |
inputs/BRIT/specimen_flat/new_terms.csv | ||
---|---|---|
1 | 1 |
specimen_id,dataProviderRecordID,, |
2 |
Collector_Abbrev_Name,recordedBy,/_join/1,
|
|
3 |
Collection_Team,recordedBy,/_join/2,
|
|
2 |
Collector_Abbrev_Name,recordedBy_primary,,the primary collector
|
|
3 |
Collection_Team,recordedBy_additional,,additional collectors
|
|
4 | 4 |
Date_of_Collection,dateCollected,, |
5 | 5 |
Kingdom_Name,kingdom,, |
6 | 6 |
Division_Name,phylum,, |
... | ... | |
16 | 16 |
Continent_Name,continent,, |
17 | 17 |
Region_Name,stateProvince,, |
18 | 18 |
Subregion_Name,county,, |
19 |
Locality_Summary,locality,/_join/1,
|
|
20 |
Locality_Description,locality,/_join/2,
|
|
21 |
Locality_Site_Specific,locality,/_join/3,
|
|
19 |
Locality_Summary,locality__area__prefix,,rarely populated
|
|
20 |
Locality_Description,locality__area__main,,
|
|
21 |
Locality_Site_Specific,locality__spot,,"location within area, including landmarks"
|
|
22 | 22 |
Habitat_Description,habitat,, |
23 | 23 |
Notes_Plant,occurrenceRemarks_verbatim,, |
24 | 24 |
Phenology_Stage,reproductiveCondition,, |
inputs/BRIT/specimen_flat/unmapped_terms.csv | ||
---|---|---|
1 |
recordedBy_primary |
|
2 |
recordedBy_additional |
|
1 | 3 |
*subclass |
2 | 4 |
infraspecificRank |
3 | 5 |
vernacularName |
4 | 6 |
*Research_Site_Name |
7 |
locality__area__prefix |
|
8 |
locality__area__main |
|
9 |
locality__spot |
|
5 | 10 |
*Soil_Description |
6 | 11 |
occurrenceRemarks_verbatim |
7 | 12 |
height_min_m_verbatim |
Also available in: Unified diff
inputs/BRIT/specimen_flat/: translated multi-column filters with _join() to postprocessing derived columns, using the steps at wiki.vegpath.org/Adding_new-style_import_to_a_datasource#Translating-filters-to-postprocessing-derived-columns