VegX to VegCSV¶
DwC terms for VegX elements¶
Total: 33
- catalogNumber
- class
- continent
- coordinateUncertaintyInMeters
- country
- county
- decimalLatitude
- decimalLongitude
- eventDate
- family
- fieldNotes
- fieldNumber
- footprintWKT
- genus
- identificationQualifier
- individualCount
- infraspecificEpithet
- kingdom
- locality
- locationID
- maximumDepthInMeters
- maximumElevationInMeters
- minimumDepthInMeters
- minimumElevationInMeters
- occurrenceID
- order
- phylum
- samplingProtocol
- scientificName
- scientificNameAuthorship
- specificEpithet
- stateProvince
- verbatimElevation
Steps to switch VegX mappings to VegCSV¶
- Note that now,
mappings/VegX-VegCSV.stems.csv
itself will not be in use, but can be used towards a new CTFS mapping
Createmappings/for_review/VegBIEN-DwC2.specimens.csv
by invertingmappings/for_review/DwC2-VegBIEN.specimens.csv
Createmappings/VegX-VegCSV.stems.csv
:make mappings/VegX-VegCSV.stems.csv-remake
Inmappings/VegX-VegCSV.stems.csv
's output column:Resolve ambiguous names that appear twiceSearch-and-replace simplified XPaths with standardized namesMake maps that depend on it:make mappings
Rename all inputs' VegX maps to VegCSV:shopt -s nullglob for dir in inputs/*/maps/; do (cd $dir && { for map in VegX*.csv; do svn mv "$map" "${map/VegX/VegCSV}" || break; done; }) || break done
For each input:CreateVegCSV.<table>.csv
by joining what wasVegX.<table>.csv
toVegX-VegCSV.stems.csv
:for map in inputs/*/maps/VegCSV.{plots,organisms,stems}.csv; do bin/in_place "$map" env only_one=1 map_1_core_only=1 quiet=1 bin/join mappings/VegX-VegCSV.stems.csv || break bin/in_place "$map" bin/cols 0 1 2 || break done
Clean up the changed maps:make
Check that the test outputs have only minor additions (due to merging of some previously separate XPaths):make test
svn add inputs/*/maps/.*.last_cleanup
Inmappings/VegX-VegCSV.stems.csv
, remove user-defined VegX terms, which will no longer be in usebin/in_place mappings/VegX-VegCSV.stems.csv grep -vF simpleUserdefined