Project

General

Profile

« Previous | Next » 

Revision 1115

Added DwC1-DwC mapping. Generate DwC1-VegBIEN mapping automatically.

View differences:

mappings/DwC1-DwC.specimens.csv
1
"DwC1::[@xmlns:dcterms=""http://purl.org/dc/terms/""]/list:[InstitutionCode=$/_ignore/inLabel]/","DwC::[@xmlns:dcterms=""http://purl.org/dc/terms/""]/list:[institutionCode=$/_ignore/inLabel]/","Comments"
2
"DateLastModified","dcterms:modified",
3
"InstitutionCode","institutionCode",
4
"CollectionCode","collectionCode",
5
"CatalogNumber","catalogNumber",
6
"ScientificName","scientificName",
7
"BasisOfRecord","basisOfRecord",
8
"Kingdom","kingdom",
9
"Phylum","phylum",
10
"Class","class",
11
"Order","order",
12
"Family","family",
13
"Genus","genus",
14
"Species","specificEpithet",
15
"Subspecies","infraspecificEpithet",
16
"ScientificNameAuthor","scientificNameAuthorship",
17
"IdentifiedBy","identifiedBy",
18
"YearIdentified","dateIdentified/_alt/2/_date/year",
19
"MonthIdentified","dateIdentified/_alt/2/_date/month",
20
"DayIdentified","dateIdentified/_alt/2/_date/day",
21
"TypeStatus","typeStatus",
22
"CollectorNumber","recordNumber",
23
"FieldNumber","fieldNumber",
24
"Collector","recordedBy",
25
"YearCollected","eventDate/_alt/2/_date/year",
26
"MonthCollected","eventDate/_alt/2/_date/month",
27
"DayCollected","eventDate/_alt/2/_date/day",
28
"JulianDay","day",
29
"TimeOfDay","eventTime",
30
"ContinentOcean","continent",
31
"Country","country",
32
"StateProvince","stateProvince",
33
"County","county",
34
"Locality","verbatimLocality",
35
"Longitude","verbatimLongitude",
36
"Latitude","verbatimLatitude",
37
"CoordinatePrecision","coordinatePrecision/_noCV/value",
38
"BoundingBox","footprintWKT",
39
"MinimumElevation","minimumElevationInMeters",
40
"MaximumElevation","maximumElevationInMeters",
41
"MinimumDepth","minimumDepthInMeters",
42
"MaximumDepth","maximumDepthInMeters",
43
"Sex","sex",
44
"PreparationType","preparations",
45
"IndividualCount","individualCount",
46
"PreviousCatalogNumber","previousIdentifications","?"
47
"RelationshipType","relationshipOfResource",
48
"RelatedCatalogItem","relatedResourceID",
49
"Notes","fieldNotes/_merge/1",
mappings/DwC1-VegBIEN.specimens.csv
1
"DwC1::[@xmlns:dcterms=""http://purl.org/dc/terms/""]/list:[InstitutionCode=$/_ignore/inLabel]/",VegBIEN:/specimenreplicate,Comments,Order
2
Country,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationdetermination(/*_id/namedplace[placesystem=""area|country|territory""])/placename",Brad: Required; reject record if this field NULL,63
3
StateProvince,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationdetermination(/*_id/namedplace[placesystem=""region|state|province""])/placename",,65
4
County,/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationdetermination(/*_id/namedplace[placesystem=county])/placename,,66
5
CoordinatePrecision,/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationdetermination[!namedplace_id]/coordsaccuracy/_noCV/value,,89
6
BoundingBox,/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationdetermination[!namedplace_id]/footprintgeometry_dwc,,91
7
Locality,/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationnarrative/_alt/2,"Brad: Correct for VB; Nick, is there no specific element for locality description in VegX? Definitely need one.",69
8
MaximumElevation,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{elevation/_alt/2/_avg/max,elevationrange/_range/to}",,72
9
MinimumElevation,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{elevation/_alt/2/_avg/min,elevationrange/_range/from}",,71
10
Latitude,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{locationdetermination[!namedplace_id]/latitude,centerlatitude}/_alt/2/_nullIf:[null=0,type=float]/value",,81
11
Longitude,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{locationdetermination[!namedplace_id]/longitude,centerlongitude}/_alt/2/_nullIf:[null=0,type=float]/value",,82
12
DayCollected,/*_id/taxonoccurrence/*_id/locationevent/obsstartdate/_alt/2/_date/day,,44
13
MonthCollected,/*_id/taxonoccurrence/*_id/locationevent/obsstartdate/_alt/2/_date/month,,44
14
YearCollected,/*_id/taxonoccurrence/*_id/locationevent/obsstartdate/_alt/2/_date/year,,44
15
MaximumDepth,/*_id/taxonoccurrence/*_id/locationevent/waterdepth/max,,75
16
MinimumDepth,/*_id/taxonoccurrence/*_id/locationevent/waterdepth/min,,74
17
ScientificNameAuthor,"/*_id/taxonoccurrence/taxondetermination[*_id/role/rolecode=identifier,*_id/plantconcept/*_id/plantname/rank=Authority]:[determinationtype=Author,isoriginal=true,iscurrent=true]/*_id/plantconcept/*_id/*/plantname","Brad: Mapping probably incorrect. This DwC element refers to scientific name author; does not correspond to the VegBank and VegX elements you have listed (Bob, Nick�where does name author belong in VegBank and VegX?); Aaron: The mapped VegX element is the author linked to the taxon name, so it seems like this is the scientific name author",153
18
Sex,"/*_id/taxonoccurrence/taxondetermination[*_id/role/rolecode=identifier,*_id/plantconcept/*_id/plantname/rank=Binomial]/definedvalue[*_id/userdefined[tablename=taxondetermination,userdefinedname=sex]]:[@fkey=tableRecord_ID]/definedvalue","Brad: OMIT. Apparently not used by this institution and of uncertain applicability to plants. With other collections, *sometimes* used for phenological information (if specimen in flower, in fruit, sterile, etc.). If so, this is important information we should keep. Bob, Nick, anywhere for phenological information in VB and VX?; Aaron: Keeping it because it's useful for some collections",26
19
DayIdentified,"/*_id/taxonoccurrence/taxondetermination[*_id/role/rolecode=identifier,*_id/plantconcept/*_id/plantname/rank=Binomial]/determinationdate/_alt/2/_date/day",,120
20
MonthIdentified,"/*_id/taxonoccurrence/taxondetermination[*_id/role/rolecode=identifier,*_id/plantconcept/*_id/plantname/rank=Binomial]/determinationdate/_alt/2/_date/month",,120
21
YearIdentified,"/*_id/taxonoccurrence/taxondetermination[*_id/role/rolecode=identifier,*_id/plantconcept/*_id/plantname/rank=Binomial]/determinationdate/_alt/2/_date/year",,120
22
IdentifiedBy,"/*_id/taxonoccurrence/taxondetermination[*_id/role/rolecode=identifier,*_id/plantconcept/*_id/plantname/rank=Binomial]:[determinationtype=Author,iscurrent=true]/*_id/party/{givenname/_namePart/first,middlename/_namePart/middle,surname/_namePart/last}",Brad: Bob: does this look correct for VegBank?,119
23
ScientificName,"/*_id/taxonoccurrence/taxondetermination[*_id/role/rolecode=identifier,*_id/plantconcept/*_id/plantname/rank=Binomial]:[determinationtype=Author,isoriginal=true,iscurrent=true]/*_id/plantconcept/*_id/*/plantname","Brad: Bob, Nick, please is this mapping OK?",134
24
Class,"/*_id/taxonoccurrence/taxondetermination[*_id/role/rolecode=identifier,*_id/plantconcept/*_id/plantname/rank=Class]:[determinationtype=Author,isoriginal=true,iscurrent=true]/*_id/plantconcept/*_id/*/plantname",,144
25
Family,"/*_id/taxonoccurrence/taxondetermination[*_id/role/rolecode=identifier,*_id/plantconcept/*_id/plantname/rank=Family]:[determinationtype=Author,isoriginal=true,iscurrent=true]/*_id/plantconcept/*_id/*/plantname",,146
26
Genus,"/*_id/taxonoccurrence/taxondetermination[*_id/role/rolecode=identifier,*_id/plantconcept/*_id/plantname/rank=Genus]:[determinationtype=Author,isoriginal=true,iscurrent=true]/*_id/plantconcept/*_id/*/plantname",,147
27
Kingdom,"/*_id/taxonoccurrence/taxondetermination[*_id/role/rolecode=identifier,*_id/plantconcept/*_id/plantname/rank=Kingdom]:[determinationtype=Author,isoriginal=true,iscurrent=true]/*_id/plantconcept/*_id/*/plantname",,142
28
Order,"/*_id/taxonoccurrence/taxondetermination[*_id/role/rolecode=identifier,*_id/plantconcept/*_id/plantname/rank=Order]:[determinationtype=Author,isoriginal=true,iscurrent=true]/*_id/plantconcept/*_id/*/plantname",,145
29
Species,"/*_id/taxonoccurrence/taxondetermination[*_id/role/rolecode=identifier,*_id/plantconcept/*_id/plantname/rank=Species]:[determinationtype=Author,isoriginal=true,iscurrent=true]/*_id/plantconcept/*_id/*/plantname",,149
30
Phylum,"/*_id/taxonoccurrence/taxondetermination[*_id/role/rolecode=identifier,*_id/plantconcept/*_id/plantname/rank=Subkingdom]:[determinationtype=Author,isoriginal=true,iscurrent=true]/*_id/plantconcept/*_id/*/plantname",,143
31
Subspecies,"/*_id/taxonoccurrence/taxondetermination[*_id/role/rolecode=identifier,*_id/plantconcept/*_id/plantname/rank=Subspecies]:[determinationtype=Author,isoriginal=true,iscurrent=true]/*_id/plantconcept/*_id/*/plantname",,150
32
Collector,/*_id/taxonoccurrence/verbatimcollectorname,,23
33
CollectionCode,/collectioncode_dwc,Brad: Not sure if mapping correct. DwC element; code for entire collection; often same as InstitutionCode; Aaron: Combining with InstitutionCode to create collection name,12
34
Notes,/description/_merge/1,,
35
CatalogNumber,:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc,"Brad: Not sure if mapping correct. Nick, is there an element for institutional accession codes in VegX?; Aaron: This can't be used as the accession code (primary key) because some rows don't have a value for it",20
36
CollectorNumber,:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectionnumber/_alt/1,,22
37
FieldNumber,:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectionnumber/_alt/3,"Brad: Correct for VB, not sure about VX; Nick, is there an element in VX fo Collection Number?",53
38
InstitutionCode,:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/datasource_id/party/organizationname/_alt/1,,
39
BasisOfRecord,,Brad: OMIT? See http://rs.tdwg.org/dwc/terms/index.htm#basisOfRecord for definition of this term.,15
40
ContinentOcean,,Brad: OMIT,59
41
DateLastModified,,"Brad: Mapping to VegX is incorrect. I think is this merely an internal timestamp indicated when record last modified, not necessarily when determination (taxon name) last modified. Probably we should omit this field, although might be useful for updating changed records from this source.",1
42
IndividualCount,,Brad: OMIT; not relevant for DwC plant specimen data.,25
43
JulianDay,,Brad: OMIT,50
44
PreparationType,,Brad: OMIT,32
45
PreviousCatalogNumber,,?; Brad: OMIT,35
46
RelatedCatalogItem,,Brad: OMIT,161
47
RelationshipType,,Brad: OMIT,162
48
TimeOfDay,,Brad: OMIT,45
49
TypeStatus,,Brad: OMIT (?). Indicates whether this specimen served as type for taxon name. Probably not relevant for BIEN,125
mappings/Makefile
2 2

  
3 3
bin := ../bin
4 4

  
5
review = $(bin)/review <$(1) >for_review/$(1)
5
review_ = $(bin)/review <$(1) >for_review/$(1)
6
review = $(call review_,$@)
6 7

  
7 8
coreMaps := DwC-VegBIEN.specimens.csv VegX-VegBIEN.organisms.csv
8 9

  
9 10
##### General targets
10 11

  
11
all: _always $(coreMaps) ch_root_maps ;
12
all: _always $(coreMaps) join_maps ch_root_maps ;
12 13

  
13 14
.SUFFIXES:
14 15

  
......
29 30
	$(bin)/in_place $< $(bin)/simplify_xpath
30 31
	$(bin)/in_place $< $(bin)/sort 1 0
31 32
	touch $@
32
	$(call review,$<)
33
	$(call review_,$<)
33 34
.PRECIOUS: .%.last_cleanup
34 35
else
35 36
$(coreMaps): _always
36 37
	$(MAKE) $(@:%=.%.last_cleanup)
37 38
endif
38 39

  
40
##### Maps generated with join
41

  
42
define join
43
$(bin)/join_sort <$+ >$@
44
$(review)
45
endef
46

  
47
joinMaps :=
48

  
49
DwC1-VegBIEN.specimens.csv: DwC1-DwC.specimens.csv DwC-VegBIEN.specimens.csv
50
	$(join)
51
joinMaps += DwC1-VegBIEN.specimens.csv
52

  
53
join_maps: $(joinMaps) ;
54

  
55
all += $(joinMaps)
56

  
39 57
##### Maps generated with ch_root
40 58

  
41 59
define chRoot
42 60
$(bin)/ch_root <$< >$@
43
$(call review,$@)
61
$(review)
44 62
endef
45 63

  
46 64
chRootMaps :=

Also available in: Unified diff