Project

General

Profile

« Previous | Next » 

Revision 11865

bugfix: inputs/CTFS/import_order.txt: added *.src so that these would be installed under new-style import as well. this means that their columns will now be automapped, requiring the names to be renamed to VegCore names in */create.sql. note that VegCore taxonOccurrenceID has been renamed to taxonObservationID since this was last run.

View differences:

inputs/CTFS/Plot.src/new_terms.csv
1
SizeOfSite,plotArea_ha,,"""Size in hectares"" (SizeOfSite comments in <https://projects.nceas.ucsb.edu/nceas/projects/bien/repository/raw/inputs/CTFS/_src/ctfs-comments_worksheet.xls>)"
inputs/CTFS/Genus.src/map.csv
1
CTFS,VegCore,Filter,Comments
2
Genus.src.row_num,*Genus.src.row_num,,
3
GenusID,*GenusID,,
4
Genus,genus,,
5
GenusReferenceID,*GenusReferenceID,,
6
GenusAuthority,*GenusAuthority,,
7
FamilyID,*FamilyID,,
inputs/CTFS/Family.src/run
1
#!/bin/bash -e
2
. "$(dirname "${BASH_SOURCE[0]}")"/../table.run
0 3

  
inputs/CTFS/StemObservation.src/run
1
#!/bin/bash -e
2
. "$(dirname "${BASH_SOURCE[0]}")"/../table.run
0 3

  
inputs/CTFS/Organism.src/new_terms.csv
1
x,organismX_m,,"Assuming units based on the size of values relative to plot area, which has units of ha. Not documented in <https://projects.nceas.ucsb.edu/nceas/projects/bien/repository/raw/inputs/CTFS/_src/ctfs-comments_worksheet.xls>."
2
y,organismY_m,,"Assuming units based on the size of values relative to plot area, which has units of ha. Not documented in <https://projects.nceas.ucsb.edu/nceas/projects/bien/repository/raw/inputs/CTFS/_src/ctfs-comments_worksheet.xls>."
inputs/CTFS/InfraspecificEpithet.src/run
1
#!/bin/bash -e
2
. "$(dirname "${BASH_SOURCE[0]}")"/../table.run
0 3

  
inputs/CTFS/InfraspecificEpithet.src/unmapped_terms.csv
1
*InfraspecificEpithet.src.row_num
2
*SubSpeciesID
3
*SpeciesID
4
*SubSpeciesCurrentTaxonFlag
5
*SubSpeciesObsoleteTaxonFlag
6
*SubSpeciesMnemonic
7
*SubSpeciesAuthority
8
*InfraSpecificLevel
inputs/CTFS/Plot.src/run
1
#!/bin/bash -e
2
. "$(dirname "${BASH_SOURCE[0]}")"/../table.run
0 3

  
inputs/CTFS/Plot.src/unmapped_terms.csv
1
*Plot.src.row_num
2
*CountryID
3
*ReferenceX
4
*ReferenceY
inputs/CTFS/Genus.src/run
1
#!/bin/bash -e
2
. "$(dirname "${BASH_SOURCE[0]}")"/../table.run
0 3

  
inputs/CTFS/Family.src/unmapped_terms.csv
1
*Family.src.row_num
2
*FamilyID
3
*ReferenceID
inputs/CTFS/StemObservation.src/unmapped_terms.csv
1
*StemObservation.src.row_num
2
*TreeID
3
*HOM
4
*PrimaryStem
5
*ExactDate
inputs/CTFS/Plot/new_terms.csv
1
SizeOfSite,plotArea_ha,,"""Size in hectares"" (SizeOfSite comments in <https://projects.nceas.ucsb.edu/nceas/projects/bien/repository/raw/inputs/CTFS/_src/ctfs-comments_worksheet.xls>)"
inputs/CTFS/import_order.txt
1 1
Source
2
Country.src
3
Plot.src
2 4
Plot
3 5
Subplot
4 6
PlotObservation
5 7
SubplotObservation
8
Family.src
9
Genus.src
10
SpecificEpithet.src
11
InfraspecificEpithet.src
12
TaxonOccurrence.src
6 13
TaxonOccurrence
14
Organism.src
15
Stem.src
16
StemObservation.src
7 17
StemObservation
8 18
AggregateObservation
inputs/CTFS/StemObservation/create.sql
1 1
SELECT *
2 2
FROM "StemObservation.src"
3
LEFT JOIN "Stem.src" USING ("TreeID", "StemID")
4
LEFT JOIN "Organism.src" USING ("TreeID")
5
LEFT JOIN "InfraspecificEpithet.src" USING ("SpeciesID", "SubSpeciesID")
6
LEFT JOIN "SpecificEpithet.src" USING ("SpeciesID")
7
LEFT JOIN "Genus.src" USING ("GenusID")
8
LEFT JOIN "Family.src" USING ("FamilyID")
3
LEFT JOIN "Stem.src" USING ("*TreeID", "authorStemCode")
4
LEFT JOIN "Organism.src" USING ("*TreeID")
5
LEFT JOIN "InfraspecificEpithet.src" USING ("*SpeciesID", "*SubSpeciesID")
6
LEFT JOIN "SpecificEpithet.src" USING ("*SpeciesID")
7
LEFT JOIN "Genus.src" USING ("*GenusID")
8
LEFT JOIN "Family.src" USING ("*FamilyID")
inputs/CTFS/TaxonOccurrence.src/run
1
#!/bin/bash -e
2
. "$(dirname "${BASH_SOURCE[0]}")"/../table.run
0 3

  
inputs/CTFS/TaxonOccurrence.src/map.csv
1
CTFS,VegCore,Filter,Comments
2
TaxonOccurrence.src.row_num,*TaxonOccurrence.src.row_num,,
3
SpeciesInvID,taxonObservationID,,
4
CensusID,eventID,,
5
PlotID,locationID,,
6
SpeciesID,*SpeciesID,,
7
SubSpeciesID,*SubSpeciesID,,
inputs/CTFS/TaxonOccurrence.src/unmapped_terms.csv
1
*TaxonOccurrence.src.row_num
2
taxonObservationID
3
*SpeciesID
4
*SubSpeciesID
inputs/CTFS/Country.src/run
1
#!/bin/bash -e
2
. "$(dirname "${BASH_SOURCE[0]}")"/../table.run
0 3

  
inputs/CTFS/Country.src/map.csv
1
CTFS,VegCore,Filter,Comments
2
Country.src.row_num,*Country.src.row_num,,
3
CountryID,*CountryID,,
4
CountryName,country,,
inputs/CTFS/Country.src/unmapped_terms.csv
1
*Country.src.row_num
2
*CountryID
inputs/CTFS/SpecificEpithet.src/run
1
#!/bin/bash -e
2
. "$(dirname "${BASH_SOURCE[0]}")"/../table.run
0 3

  
inputs/CTFS/SpecificEpithet.src/map.csv
1
CTFS,VegCore,Filter,Comments
2
SpecificEpithet.src.row_num,*SpecificEpithet.src.row_num,,
3
SpeciesID,*SpeciesID,,
4
SpeciesCurrentTaxonFlag,*SpeciesCurrentTaxonFlag,,
5
SpeciesObsoleteTaxonFlag,*SpeciesObsoleteTaxonFlag,,
6
GenusID,*GenusID,,
7
SpeciesReferenceID,*SpeciesReferenceID,,
8
SpeciesName,specificEpithet,,
9
SpeciesMnemonic,*SpeciesMnemonic,,
10
SpeciesAuthority,scientificNameAuthorship,,
11
IDLevel,*IDLevel,,
12
FieldFamily,*FieldFamily,,
13
Description,*Description,,
inputs/CTFS/SpecificEpithet.src/new_terms.csv
1
SpeciesAuthority,scientificNameAuthorship,,
inputs/CTFS/SpecificEpithet.src/unmapped_terms.csv
1
*SpecificEpithet.src.row_num
2
*SpeciesID
3
*SpeciesCurrentTaxonFlag
4
*SpeciesObsoleteTaxonFlag
5
*GenusID
6
*SpeciesReferenceID
7
*SpeciesMnemonic
8
*IDLevel
9
*FieldFamily
10
*Description
inputs/CTFS/Stem.src/run
1
#!/bin/bash -e
2
. "$(dirname "${BASH_SOURCE[0]}")"/../table.run
0 3

  
inputs/CTFS/Stem.src/map.csv
1
CTFS,VegCore,Filter,Comments
2
Stem.src.row_num,*Stem.src.row_num,,
3
StemID,authorStemCode,,
4
TreeID,*TreeID,,
5
StemTag,stem_subtag,,
6
StemDescription,*StemDescription,,
inputs/CTFS/Stem.src/unmapped_terms.csv
1
*Stem.src.row_num
2
*TreeID
3
stem_subtag
4
*StemDescription
inputs/CTFS/TaxonOccurrence/create.sql
1 1
SELECT *
2 2
FROM "TaxonOccurrence.src"
3
LEFT JOIN "InfraspecificEpithet.src" USING ("SpeciesID", "SubSpeciesID")
4
LEFT JOIN "SpecificEpithet.src" USING ("SpeciesID")
5
LEFT JOIN "Genus.src" USING ("GenusID")
6
LEFT JOIN "Family.src" USING ("FamilyID")
3
LEFT JOIN "InfraspecificEpithet.src" USING ("*SpeciesID", "*SubSpeciesID")
4
LEFT JOIN "SpecificEpithet.src" USING ("*SpeciesID")
5
LEFT JOIN "Genus.src" USING ("*GenusID")
6
LEFT JOIN "Family.src" USING ("*FamilyID")
inputs/CTFS/TaxonOccurrence/map.csv
4 4
SpeciesID,*SpeciesID,,
5 5
SubSpeciesID,*SubSpeciesID,,
6 6
TaxonOccurrence.src.row_num,*TaxonOccurrence.src.row_num,,
7
SpeciesInvID,taxonOccurrenceID,,
7
SpeciesInvID,taxonObservationID,,
8 8
CensusID,eventID,,
9 9
PlotID,locationID,,
10 10
InfraspecificEpithet.src.row_num,*InfraspecificEpithet.src.row_num,,
inputs/CTFS/TaxonOccurrence/unmapped_terms.csv
3 3
*SpeciesID
4 4
*SubSpeciesID
5 5
*TaxonOccurrence.src.row_num
6
taxonObservationID
6 7
*InfraspecificEpithet.src.row_num
7 8
*SubSpeciesCurrentTaxonFlag
8 9
*SubSpeciesObsoleteTaxonFlag
inputs/CTFS/Organism.src/run
1
#!/bin/bash -e
2
. "$(dirname "${BASH_SOURCE[0]}")"/../table.run
0 3

  
inputs/CTFS/Organism.src/map.csv
1
CTFS,VegCore,Filter,Comments
2
Organism.src.row_num,*Organism.src.row_num,,
3
TreeID,*TreeID,,
4
QuadratID,subplot,,Not globally unique; unique only within Site
5
PlotID,locationID,,
6
Tag,individual_tag,,
7
x,organismX_m,,"Assuming units based on the size of values relative to plot area, which has units of ha. Not documented in <https://projects.nceas.ucsb.edu/nceas/projects/bien/repository/raw/inputs/CTFS/_src/ctfs-comments_worksheet.xls>."
8
y,organismY_m,,"Assuming units based on the size of values relative to plot area, which has units of ha. Not documented in <https://projects.nceas.ucsb.edu/nceas/projects/bien/repository/raw/inputs/CTFS/_src/ctfs-comments_worksheet.xls>."
9
SpeciesID,*SpeciesID,,
10
SubSpeciesID,*SubSpeciesID,,
inputs/CTFS/Organism.src/unmapped_terms.csv
1
*Organism.src.row_num
2
*TreeID
3
individual_tag
4
*SpeciesID
5
*SubSpeciesID
inputs/CTFS/InfraspecificEpithet.src/map.csv
1
CTFS,VegCore,Filter,Comments
2
InfraspecificEpithet.src.row_num,*InfraspecificEpithet.src.row_num,,
3
SubSpeciesID,*SubSpeciesID,,
4
SpeciesID,*SpeciesID,,
5
SubSpeciesCurrentTaxonFlag,*SubSpeciesCurrentTaxonFlag,,
6
SubSpeciesObsoleteTaxonFlag,*SubSpeciesObsoleteTaxonFlag,,
7
SubSpeciesName,subspecies,,
8
SubSpeciesMnemonic,*SubSpeciesMnemonic,,
9
SubSpeciesAuthority,*SubSpeciesAuthority,,
10
InfraSpecificLevel,*InfraSpecificLevel,,
inputs/CTFS/Plot.src/map.csv
1
CTFS,VegCore,Filter,Comments
2
Plot.src.row_num,*Plot.src.row_num,,
3
PlotID,locationID,,
4
PlotName,locationName,,
5
LocationName,locality,,
6
CountryID,*CountryID,,
7
Latitude,decimalLatitude,,
8
Longitude,decimalLongitude,,
9
Elevation,elevationInMeters,,"Assuming units are m based on the range of values [1] and the country the data is from (Panama). Not documented in <https://projects.nceas.ucsb.edu/nceas/projects/bien/repository/raw/inputs/CTFS/_src/ctfs-comments_worksheet.xls>.
10

  
11
[1] Using the following query:
12
-----
13
SELECT ""Elevation""::real, ""LocationName""
14
FROM ""CTFS"".""Plot""
15
GROUP BY ""Elevation""::real , ""LocationName""
16
ORDER BY ""Elevation""::real DESC
17
-----"
18
ReferenceX,*ReferenceX,,Rarely used
19
ReferenceY,*ReferenceY,,Rarely used
20
SizeOfSite,plotArea_ha,,"""Size in hectares"" (SizeOfSite comments in <https://projects.nceas.ucsb.edu/nceas/projects/bien/repository/raw/inputs/CTFS/_src/ctfs-comments_worksheet.xls>)"
21
ShapeOfSite,footprintWKT,,
22
DescriptionOfSite,locationRemarks,,
inputs/CTFS/Genus.src/unmapped_terms.csv
1
*Genus.src.row_num
2
*GenusID
3
*GenusReferenceID
4
*GenusAuthority
5
*FamilyID
inputs/CTFS/Family.src/map.csv
1
CTFS,VegCore,Filter,Comments
2
Family.src.row_num,*Family.src.row_num,,
3
FamilyID,*FamilyID,,
4
Family,family,,
5
ReferenceID,*ReferenceID,,
inputs/CTFS/StemObservation.src/map.csv
1
CTFS,VegCore,Filter,Comments
2
StemObservation.src.row_num,*StemObservation.src.row_num,,
3
MeasureID,individualID,,
4
CensusID,eventID,,
5
StemID,authorStemCode,,
6
TreeID,*TreeID,,
7
DBH,diameterBreastHeight_cm,,Assuming units based on the range and precision of values. Not documented in <https://projects.nceas.ucsb.edu/nceas/projects/bien/repository/raw/inputs/CTFS/_src/ctfs-comments_worksheet.xls>.
8
HOM,*HOM,,
9
PrimaryStem,*PrimaryStem,,
10
ExactDate,*ExactDate,,
inputs/CTFS/StemObservation.src/new_terms.csv
1
MeasureID,individualID,,
inputs/CTFS/Plot/map.csv
1 1
CTFS,VegCore,Filter,Comments
2
CountryID,*CountryID,,
3
Plot.src.row_num,*Plot.src.row_num,,
4
PlotID,locationID,,
5
PlotName,locationName,,
6
LocationName,locality,,
7
Latitude,decimalLatitude,,
8
Longitude,decimalLongitude,,
9
Elevation,elevationInMeters,,"Assuming units are m based on the range of values [1] and the country the data is from (Panama). Not documented in <https://projects.nceas.ucsb.edu/nceas/projects/bien/repository/raw/inputs/CTFS/_src/ctfs-comments_worksheet.xls>.
10

  
11
[1] Using the following query:
12
-----
13
SELECT ""Elevation""::real, ""LocationName""
14
FROM ""CTFS"".""Plot""
15
GROUP BY ""Elevation""::real , ""LocationName""
16
ORDER BY ""Elevation""::real DESC
17
-----"
18
ReferenceX,*ReferenceX,,Rarely used
19
ReferenceY,*ReferenceY,,Rarely used
20
SizeOfSite,plotArea_ha,,"""Size in hectares"" (SizeOfSite comments in <https://projects.nceas.ucsb.edu/nceas/projects/bien/repository/raw/inputs/CTFS/_src/ctfs-comments_worksheet.xls>)"
21
ShapeOfSite,footprintWKT,,
22
DescriptionOfSite,locationRemarks,,
23
Country.src.row_num,*Country.src.row_num,,
24
CountryName,country,,
2
*CountryID,*CountryID,,
3
*Plot.src.row_num,*Plot.src.row_num,,
4
locationID,locationID,,
5
locationName,locationName,,
6
locality,locality,,
7
decimalLatitude,decimalLatitude,,
8
decimalLongitude,decimalLongitude,,
9
elevationInMeters,elevationInMeters,,
10
*ReferenceX,*ReferenceX,,
11
*ReferenceY,*ReferenceY,,
12
plotArea_ha,plotArea_ha,,
13
footprintWKT,footprintWKT,,
14
locationRemarks,locationRemarks,,
15
*Country.src.row_num,*Country.src.row_num,,
16
country,country,,
inputs/CTFS/Plot/header.csv
1
CountryID,Plot.src.row_num,PlotID,PlotName,LocationName,Latitude,Longitude,Elevation,ReferenceX,ReferenceY,SizeOfSite,ShapeOfSite,DescriptionOfSite,Country.src.row_num,CountryName
1
*CountryID,*Plot.src.row_num,locationID,locationName,locality,decimalLatitude,decimalLongitude,elevationInMeters,*ReferenceX,*ReferenceY,plotArea_ha,footprintWKT,locationRemarks,*Country.src.row_num,country
inputs/CTFS/Plot/create.sql
1 1
SELECT *
2 2
FROM "Plot.src"
3
LEFT JOIN "Country.src" USING ("CountryID")
3
LEFT JOIN "Country.src" USING ("*CountryID")

Also available in: Unified diff