Project

General

Profile

« Previous | Next » 

Revision 1471

units.py: Restructured to use a Quantity object for the units-tagged value and conversion functions quantity2str() and str2quantity() to convert between that and a raw string. Added convert() with basic support for removing units and passing through matching units. xml_func.py: _units: Added "to" attr. VegBIEN mappings: Remove units using new _units "to" attr instead of temporary workaround in _units.

View differences:

src.join.specimens.csv
19 19
verbatimLocality,/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationnarrative/_merge/2,"Brad: Correct for VB; Nick, is there no specific element for locality description in VegX? Definitely need one.",69
20 20
Habitat,"/*_id/taxonoccurrence/*_id/locationevent/*_id/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?",52
21 21
habitat,"/*_id/taxonoccurrence/*_id/locationevent/*_id/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?",52
22
MinimumElevation,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{./{elevation/_alt/2/_avg/min,elevationrange/_range/from}/_units:[default=""m""]/value/_rangeStart/value,elevationrange/_range/to/_units:[default=""m""]/value/_alt/2/_rangeEnd/value}",,71
23
MinimumElevationInMeters,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{./{elevation/_alt/2/_avg/min,elevationrange/_range/from}/_units:[default=""m""]/value/_rangeStart/value,elevationrange/_range/to/_units:[default=""m""]/value/_alt/2/_rangeEnd/value}",,71
24
minimumElevation,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{./{elevation/_alt/2/_avg/min,elevationrange/_range/from}/_units:[default=""m""]/value/_rangeStart/value,elevationrange/_range/to/_units:[default=""m""]/value/_alt/2/_rangeEnd/value}",,71
25
minimumElevationInMeters,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{./{elevation/_alt/2/_avg/min,elevationrange/_range/from}/_units:[default=""m""]/value/_rangeStart/value,elevationrange/_range/to/_units:[default=""m""]/value/_alt/2/_rangeEnd/value}",,71
26
MaximumElevation,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{elevation/_alt/2/_avg/max/_units:[default=""m""]/value,elevationrange/_range/to/_units:[default=""m""]/value/_alt/1}",,72
27
MaximumElevationInMeters,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{elevation/_alt/2/_avg/max/_units:[default=""m""]/value,elevationrange/_range/to/_units:[default=""m""]/value/_alt/1}",,72
28
maximumElevation,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{elevation/_alt/2/_avg/max/_units:[default=""m""]/value,elevationrange/_range/to/_units:[default=""m""]/value/_alt/1}",,72
29
maximumElevationInMeters,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{elevation/_alt/2/_avg/max/_units:[default=""m""]/value,elevationrange/_range/to/_units:[default=""m""]/value/_alt/1}",,72
22
MinimumElevation,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{./{elevation/_alt/2/_avg/min,elevationrange/_range/from}/_units:[default=m,to=m,to=]/value/_rangeStart/value,elevationrange/_range/to/_units:[default=m,to=m,to=]/value/_alt/2/_rangeEnd/value}",,71
23
MinimumElevationInMeters,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{./{elevation/_alt/2/_avg/min,elevationrange/_range/from}/_units:[default=m,to=m,to=]/value/_rangeStart/value,elevationrange/_range/to/_units:[default=m,to=m,to=]/value/_alt/2/_rangeEnd/value}",,71
24
minimumElevation,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{./{elevation/_alt/2/_avg/min,elevationrange/_range/from}/_units:[default=m,to=m,to=]/value/_rangeStart/value,elevationrange/_range/to/_units:[default=m,to=m,to=]/value/_alt/2/_rangeEnd/value}",,71
25
minimumElevationInMeters,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{./{elevation/_alt/2/_avg/min,elevationrange/_range/from}/_units:[default=m,to=m,to=]/value/_rangeStart/value,elevationrange/_range/to/_units:[default=m,to=m,to=]/value/_alt/2/_rangeEnd/value}",,71
26
MaximumElevation,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{elevation/_alt/2/_avg/max/_units:[default=m,to=m,to=]/value,elevationrange/_range/to/_units:[default=m,to=m,to=]/value/_alt/1}",,72
27
MaximumElevationInMeters,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{elevation/_alt/2/_avg/max/_units:[default=m,to=m,to=]/value,elevationrange/_range/to/_units:[default=m,to=m,to=]/value/_alt/1}",,72
28
maximumElevation,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{elevation/_alt/2/_avg/max/_units:[default=m,to=m,to=]/value,elevationrange/_range/to/_units:[default=m,to=m,to=]/value/_alt/1}",,72
29
maximumElevationInMeters,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{elevation/_alt/2/_avg/max/_units:[default=m,to=m,to=]/value,elevationrange/_range/to/_units:[default=m,to=m,to=]/value/_alt/1}",,72
30 30
DecimalLatitude,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{locationdetermination/latitude,centerlatitude}/_alt/1/_nullIf:[null=0,type=float]/value",,85
31 31
decimalLatitude,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{locationdetermination/latitude,centerlatitude}/_alt/1/_nullIf:[null=0,type=float]/value",,85
32 32
Latitude,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{locationdetermination/latitude,centerlatitude}/_alt/2/_nullIf:[null=0,type=float]/value",,81
......
39 39
VerbatimLongitude,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{locationdetermination/longitude,centerlongitude}/_alt/2/_nullIf:[null=0,type=float]/value",,82
40 40
longitude,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{locationdetermination/longitude,centerlongitude}/_alt/2/_nullIf:[null=0,type=float]/value",,82
41 41
verbatimLongitude,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{locationdetermination/longitude,centerlongitude}/_alt/2/_nullIf:[null=0,type=float]/value",,82
42
MaximumDepth,"/*_id/taxonoccurrence/*_id/locationevent/waterdepth/_avg/max/_units:[default=""m""]/value",,75
43
MaximumDepthInMeters,"/*_id/taxonoccurrence/*_id/locationevent/waterdepth/_avg/max/_units:[default=""m""]/value",,75
44
maximumDepth,"/*_id/taxonoccurrence/*_id/locationevent/waterdepth/_avg/max/_units:[default=""m""]/value",,75
45
maximumDepthInMeters,"/*_id/taxonoccurrence/*_id/locationevent/waterdepth/_avg/max/_units:[default=""m""]/value",,75
46
MinimumDepth,"/*_id/taxonoccurrence/*_id/locationevent/waterdepth/_avg/min/_units:[default=""m""]/value",,74
47
MinimumDepthInMeters,"/*_id/taxonoccurrence/*_id/locationevent/waterdepth/_avg/min/_units:[default=""m""]/value",,74
48
minimumDepth,"/*_id/taxonoccurrence/*_id/locationevent/waterdepth/_avg/min/_units:[default=""m""]/value",,74
49
minimumDepthInMeters,"/*_id/taxonoccurrence/*_id/locationevent/waterdepth/_avg/min/_units:[default=""m""]/value",,74
42
MaximumDepth,"/*_id/taxonoccurrence/*_id/locationevent/waterdepth/_avg/max/_units:[default=m,to=m,to=]/value",,75
43
MaximumDepthInMeters,"/*_id/taxonoccurrence/*_id/locationevent/waterdepth/_avg/max/_units:[default=m,to=m,to=]/value",,75
44
maximumDepth,"/*_id/taxonoccurrence/*_id/locationevent/waterdepth/_avg/max/_units:[default=m,to=m,to=]/value",,75
45
maximumDepthInMeters,"/*_id/taxonoccurrence/*_id/locationevent/waterdepth/_avg/max/_units:[default=m,to=m,to=]/value",,75
46
MinimumDepth,"/*_id/taxonoccurrence/*_id/locationevent/waterdepth/_avg/min/_units:[default=m,to=m,to=]/value",,74
47
MinimumDepthInMeters,"/*_id/taxonoccurrence/*_id/locationevent/waterdepth/_avg/min/_units:[default=m,to=m,to=]/value",,74
48
minimumDepth,"/*_id/taxonoccurrence/*_id/locationevent/waterdepth/_avg/min/_units:[default=m,to=m,to=]/value",,74
49
minimumDepthInMeters,"/*_id/taxonoccurrence/*_id/locationevent/waterdepth/_avg/min/_units:[default=m,to=m,to=]/value",,74
50 50
EventDate/_alt,"/*_id/taxonoccurrence/*_id/locationevent/{obsstartdate/_*/date/_dateRangeStart,obsenddate/_*/date/_dateRangeEnd}/value/_alt",Allow datasource to define custom eventDate mappings that don't pass through the default eventDate mapping,44
51 51
eventDate/_alt,"/*_id/taxonoccurrence/*_id/locationevent/{obsstartdate/_*/date/_dateRangeStart,obsenddate/_*/date/_dateRangeEnd}/value/_alt",Allow datasource to define custom eventDate mappings that don't pass through the default eventDate mapping,44
52 52
DayCollected,"/*_id/taxonoccurrence/*_id/locationevent/{obsstartdate/_*/date/_dateRangeStart,obsenddate/_*/date/_dateRangeEnd}/value/_alt/1/_date/day/_nullIf:[null=0,type=float]/value",,44

Also available in: Unified diff