Project

General

Profile

« Previous | Next » 

Revision 9874

inputs/input.Makefile: %/VegBIEN.csv: when a runscript is available, instead map the output columns of map.csv to VegBIEN, because the columns have been renamed in the staging table

View differences:

inputs/GBIF/raw_occurrence_record_plants/VegBIEN.csv
1
GBIF,VegBIEN:/_setDefault:[source_id/source/shortname/_env:[name=source]]/path/_simplifyPath:[next=parent_id]/path,Comments
2
catalogue_number,"/_if[@name=""if specimen""]/cond/_exists",
3
id,"/_if[@name=""if specimen""]/cond/_exists",
4
institution_code,"/_if[@name=""if specimen""]/else/source/shortname/_first/1",
5
id,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/3/_if[@name=""if plot""]/else/_alt/1",
6
catalogue_number,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/3/_if[@name=""if plot""]/else/_alt/2/_if[@name=""if catalogNumber""]/cond/_exists",
7
catalogue_number,"/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",
8
id,"/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",
9
institution_code,"/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""]/then/_first/2",
10
collection_code,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/3/_if[@name=""if plot""]/else/_alt/2/_if[@name=""if catalogNumber""]/then/_join/2/_join/1",
11
catalogue_number,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/3/_if[@name=""if plot""]/else/_alt/2/_if[@name=""if catalogNumber""]/then/_join/3/_if[@name=""if indirect voucher""]/else",
12
min_altitude,/location/elevation_m/_alt/2/_avg/1,
13
max_altitude,/location/elevation_m/_alt/2/_avg/2,
1
VegCore,VegBIEN:/_setDefault:[source_id/source/shortname/_env:[name=source]]/path/_simplifyPath:[next=parent_id]/path,Comments
2
accessionNumber,"/_if[@name=""if specimen""]/cond/_exists",
3
dataProviderRecordID,"/_if[@name=""if specimen""]/cond/_exists",
4
specimenHolderInstitutions,"/_if[@name=""if specimen""]/else/source/shortname/_first/1",
5
dataProviderRecordID,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/3/_if[@name=""if plot""]/else/_alt/1",
6
accessionNumber,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/3/_if[@name=""if plot""]/else/_alt/2/_if[@name=""if catalogNumber""]/cond/_exists",
7
accessionNumber,"/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",
8
dataProviderRecordID,"/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",
9
specimenHolderInstitutions,"/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""]/then/_first/2",
10
collection,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/3/_if[@name=""if plot""]/else/_alt/2/_if[@name=""if catalogNumber""]/then/_join/2/_join/1",
11
accessionNumber,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/3/_if[@name=""if plot""]/else/_alt/2/_if[@name=""if catalogNumber""]/then/_join/3/_if[@name=""if indirect voucher""]/else",
12
minimumElevationInMeters,/location/elevation_m/_alt/2/_avg/1,
13
maximumElevationInMeters,/location/elevation_m/_alt/2/_avg/2,
14 14
locality,/location/iscultivated/_or/2/_locationnarrative_is_cultivated/locationnarrative/_join/1,
15
identification_date,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/determinationdate/_alt/1/_dateRangeStart/value",
16
catalogue_number,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/catalognumber_dwc/_if[@name=""if indirect voucher""]/else",
17
collection_code,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/collectioncode_dwc/_alt/1,Brad: Not sure if mapping correct. DwC element; code for entire collection; often same as InstitutionCode; Aaron: Combining with InstitutionCode to create collection name
18
catalogue_number,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/cond/_exists",
19
id,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/cond/_exists",
20
institution_code,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/then/name/_first/2",
21
institution_code,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/then/sourcename/name/_first/2/_split:[separator=""[,;] *""]/value",
22
id,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/sourceaccessioncode,
23
scientific_name,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/3/_first/2",
24
collector_name,/location/locationevent/taxonoccurrence/collector_id/party/fullname,
25
id,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
26
id,/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/3,
27
identifier_name,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/party/fullname,
28
rank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/_if[@name=""if has explicit parent""]/else/rank",
15
dateIdentified,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/determinationdate/_alt/1/_dateRangeStart/value",
16
accessionNumber,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/catalognumber_dwc/_if[@name=""if indirect voucher""]/else",
17
collection,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/collectioncode_dwc/_alt/1,Brad: Not sure if mapping correct. DwC element; code for entire collection; often same as InstitutionCode; Aaron: Combining with InstitutionCode to create collection name
18
accessionNumber,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/cond/_exists",
19
dataProviderRecordID,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/cond/_exists",
20
specimenHolderInstitutions,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/then/name/_first/2",
21
specimenHolderInstitutions,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/then/sourcename/name/_first/2/_split:[separator=""[,;] *""]/value",
22
dataProviderRecordID,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/sourceaccessioncode,
23
scientificName,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/3/_first/2",
24
recordedBy,/location/locationevent/taxonoccurrence/collector_id/party/fullname,
25
dataProviderRecordID,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
26
dataProviderRecordID,/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/3,
27
identifiedBy,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/party/fullname,
28
taxonRank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/_if[@name=""if has explicit parent""]/else/rank",
29 29
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",
30
species,"/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",
30
specificEpithet,"/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",
31 31
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",
32 32
family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=family]/taxonepithet",
33
order_rank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,family,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=order]/taxonepithet",
33
order,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,family,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=order]/taxonepithet",
34 34
class,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,family,order,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=class]/taxonepithet",
35 35
phylum,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,family,order,class,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=phylum]/taxonepithet",
36 36
kingdom,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,family,order,class,phylum,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=kingdom]/taxonepithet",
37
rank,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/rank,
38
rank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonepithet/_if[@name=""if taxonomic name is epithet""]/cond/_alt:[2=true]/1/_taxonomic_name_is_epithet/rank",
37
taxonRank,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/rank,
38
taxonRank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonepithet/_if[@name=""if taxonomic name is epithet""]/cond/_alt:[2=true]/1/_taxonomic_name_is_epithet/rank",
39 39
family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/prefix/_taxon_family_require_std/family,
40
scientific_name,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/1,
40
scientificName,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/1,
41 41
genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/2,
42
species,/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,
42
specificEpithet,/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,
43 43
subspecies,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/4,
44
rank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
44
taxonRank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
45 45
family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/family,
46 46
genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/genus,
47
species,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/specific_epithet,
48
scientific_name,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/taxonomicname,
49
rank,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/verbatimrank,
50
identification_date,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/determinationdate/_alt/1/_dateRangeStart/value,
51
catalogue_number,"/location/locationevent/taxonoccurrence/voucher/*_id/specimenreplicate/catalognumber_dwc/_if[@name=""if indirect voucher""]/then",
52
min_depth,/location/locationevent/waterdepth_m/_avg/1,
53
max_depth,/location/locationevent/waterdepth_m/_avg/2,
47
specificEpithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/specific_epithet,
48
scientificName,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/taxonomicname,
49
taxonRank,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/verbatimrank,
50
dateIdentified,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/determinationdate/_alt/1/_dateRangeStart/value,
51
accessionNumber,"/location/locationevent/taxonoccurrence/voucher/*_id/specimenreplicate/catalognumber_dwc/_if[@name=""if indirect voucher""]/then",
52
minimumDepthInMeters,/location/locationevent/waterdepth_m/_avg/1,
53
maximumDepthInMeters,/location/locationevent/waterdepth_m/_avg/2,
54 54
locality,/location/locationnarrative/_merge/1,
55
latitude,"/location/locationplace/*_id/place/*_id/coordinates/latitude_deg/_nullIf:[null=0,type=float]/value",
56
longitude,"/location/locationplace/*_id/place/*_id/coordinates/longitude_deg/_nullIf:[null=0,type=float]/value",
57
continent_ocean,/location/locationplace/*_id/place/continent,
55
decimalLatitude,"/location/locationplace/*_id/place/*_id/coordinates/latitude_deg/_nullIf:[null=0,type=float]/value",
56
decimalLongitude,"/location/locationplace/*_id/place/*_id/coordinates/longitude_deg/_nullIf:[null=0,type=float]/value",
57
continent,/location/locationplace/*_id/place/continent,
58 58
country,/location/locationplace/*_id/place/country,
59 59
county,/location/locationplace/*_id/place/county,
60
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"
61
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"
60
decimalLatitude,"/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"
61
decimalLongitude,"/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"
62 62
country,/location/locationplace/*_id/place/matched_place_id/place:[source_id/source/shortname=geoscrub]/country/_first/2,
63 63
county,/location/locationplace/*_id/place/matched_place_id/place:[source_id/source/shortname=geoscrub]/county/_first/2,
64
state_province,/location/locationplace/*_id/place/matched_place_id/place:[source_id/source/shortname=geoscrub]/stateprovince/_first/2,
65
state_province,/location/locationplace/*_id/place/stateprovince,
66
altitude_precision,,** No join mapping for *altitude_precision ** 
67
author,,** No join mapping for authors ** 
68
basis_of_record,,** No join mapping for basisOfRecord ** 
69
created,,** No join mapping for *created ** 
70
data_provider_id,,** No join mapping for *data_provider_id ** 
71
data_resource_id,,** No join mapping for *data_resource_id ** 
64
stateProvince,/location/locationplace/*_id/place/matched_place_id/place:[source_id/source/shortname=geoscrub]/stateprovince/_first/2,
65
stateProvince,/location/locationplace/*_id/place/stateprovince,
66
*altitude_precision,,** No join mapping for *altitude_precision ** 
67
*created,,** No join mapping for *created ** 
68
*data_provider_id,,** No join mapping for *data_provider_id ** 
69
*data_resource_id,,** No join mapping for *data_resource_id ** 
70
*deleted,,** No join mapping for *deleted ** 
71
*depth_precision,,** No join mapping for *depth_precision ** 
72
*resource_access_point_id,,** No join mapping for *resource_access_point_id ** 
73
*unit_qualifier,,** No join mapping for *unit_qualifier ** 
74
authors,,** No join mapping for authors ** 
75
basisOfRecord,,** No join mapping for basisOfRecord ** 
76
coordinatePrecision_deg,,** No join mapping for coordinatePrecision_deg ** 
72 77
day,,** No join mapping for day ** 
73
deleted,,** No join mapping for *deleted ** 
74
depth_precision,,** No join mapping for *depth_precision ** 
75
lat_long_precision,,** No join mapping for coordinatePrecision_deg ** Tentative
76 78
modified,,** No join mapping for modified ** 
77 79
month,,** No join mapping for month ** 
78
resource_access_point_id,,** No join mapping for *resource_access_point_id ** 
79
row_num,,** No join mapping for raw_occurrence_record-row_num ** 
80
unit_qualifier,,** No join mapping for *unit_qualifier ** 
80
raw_occurrence_record-row_num,,** No join mapping for raw_occurrence_record-row_num ** 
81 81
year,,** No join mapping for year ** 
inputs/input.Makefile
339 339
endif
340 340

  
341 341
%/VegBIEN.csv: %/map.csv $(coreMap)
342
	<$< $(bin)/cat_cols 1 2|$(bin)/join $(coreMap)|$(bin)/sort_map >$@
342
	<$< $(bin)/cat_cols 1 2$(if $(wildcard $*/run),|$(bin)/cols 1 1 3\
343
)|$(bin)/join $(coreMap)|$(bin)/sort_map >$@
343 344
maps += $(autogenMaps)
344 345

  
345 346
maps: $(maps) _always ;

Also available in: Unified diff