-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtemplate_example.yml
More file actions
561 lines (492 loc) · 16.9 KB
/
template_example.yml
File metadata and controls
561 lines (492 loc) · 16.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
apiVersion: neotoma v2.0
headers: 2
kind: Development
# ─────────────────────────────────────────────────────────────────────────────
# Universal DataBUS Template
#
# This template covers the union of fields seen across SISAL, 210Pb, NODE-OST,
# EANODE-OST, and Pollen datasets. Each entry maps a CSV column name to its
# target field in the Neotoma database.
#
# Columns marked "required: true" must be present and non-null for a dataset
# to pass validation. Everything else is optional and may be left blank (or
# the row omitted from the CSV entirely).
#
# If there are `id` elements, they can be set to string, however there will
# be a search for their corresponding integer ID in the database. If a match is not found, the dataset
# will fail validation. This allows users to specify values using familiar names
# instead of opaque integer IDs. For example, a user can specify "John Doe" for
# the collector, and the system will look up the corresponding contact ID.
#
# DataBUS does not insert new publications, contacts, or variables. If a value is not found in the database, the
# steward must indicate which new values need to be inserted to the DB or insert them via Tilia.
#
# "rowwise: true" → the column has one value per sample row.
# "rowwise: false" → the column has a single value shared by all rows.
#
# ── WIDE DATA FORMAT ─────────────────────────────────────────────────────────
# DataBUS expects data in WIDE format: each variable (taxon/proxy) is its own
# column in the CSV file. This is in contrast to narrow/long format where a
# single "Value" column holds all measurements.
#
# Wide format CSV example (210Pb-style):
#
# Depth | 210Pb_alpha | Dry.Mass | 137Cs | 210Pb_alpha.Units | ...
# 1.0 | 15.2 | 0.52 | 0.003 | Bq/kg | ...
# 2.0 | 14.8 | 0.55 | 0.004 | Bq/kg | ...
# 3.0 | 14.1 | 0.58 | 0.005 | Bq/kg | ...
#
# Wide format CSV example (SISAL-style):
#
# depth | d18O | d13C | d18O.error | d13C.error | interp_age | ...
# 1.0 | -5.21 | -8.41 | 0.10 | 0.05 | 1250.0 | ...
# 2.5 | -5.18 | -8.35 | 0.11 | 0.06 | 1300.0 | ...
#
# Each wide-format column that holds measurement data MUST have a `taxonname`
# key in its YAML entry (see the "Data values" section below).
# ─────────────────────────────────────────────────────────────────────────────
metadata:
# ── Dataset metadata (constants) ─────────────────────────────────────────────
- column: datasettypeid
neotoma: ndb.datasettypes.datasettypeid
required: true
value: null
notes: >
Set to the dataset type name string, e.g. "pollen", "Lead 210",
"speleothem", "ostracode surface sample", etc.
- column: databasename
neotoma: ndb.datasetdatabases.databasename
required: true
value: null
notes: Name of the contributing database (e.g. SISAL, African Pollen Database).
# ── Site ─────────────────────────────────────────────────────────────────────
- column: SiteName
neotoma: ndb.sites.sitename
required: true
rowwise: false
type: string
- column: Latitude
neotoma: ndb.sites.geog.latitude
required: true
rowwise: false
type: float
- column: Longitude
neotoma: ndb.sites.geog.longitude
required: true
rowwise: false
type: float
- column: Altitude
neotoma: ndb.sites.altitude
required: false
rowwise: false
type: float
- column: SiteArea
neotoma: ndb.sites.area
required: false
rowwise: false
type: float
- column: SiteDescription
neotoma: ndb.sites.sitedescription
required: false
rowwise: false
type: string
- column: SiteNotes
neotoma: ndb.sites.notes
required: false
rowwise: false
type: string
# ── Geopolitical Units ────────────────────────────────────────────────────────
- column: Country
neotoma: ndb.sitegeopolitical.national_unit
required: false
rowwise: false
type: string
vocab: [fixed]
- column: StateProvince
neotoma: ndb.sitegeopolitical.subnational_unit_lv1
required: false
rowwise: false
type: string
vocab: [fixed]
- column: County
neotoma: ndb.sitegeopolitical.subnational_unit_lv2
required: false
rowwise: false
type: string
vocab: [fixed]
# ── Collection Unit ───────────────────────────────────────────────────────────
- column: Handle
neotoma: ndb.collectionunits.handle
required: false
overwrite: true
rowwise: false
type: string
notes: Short unique identifier for the collection unit (≤10 chars).
- column: CollectionUnitName
neotoma: ndb.collectionunits.collunitname
required: false
rowwise: false
type: string
- column: CollectionType
neotoma: ndb.collectionunits.colltypeid
required: false
rowwise: false
type: string
- column: DepositionalEnvironment
neotoma: ndb.collectionunits.depenvtid
required: false
rowwise: false
type: string
- column: CollectionDate
neotoma: ndb.collectionunits.colldate
formatorrange: '%Y-%m-%d'
required: false
rowwise: false
type: date
- column: CollectionDevice
neotoma: ndb.collectionunits.colldevice
required: false
rowwise: false
type: string
- column: GPSLatitude
neotoma: ndb.collectionunits.geog.latitude
required: false
rowwise: false
type: float
- column: GPSLongitude
neotoma: ndb.collectionunits.geog.longitude
required: false
rowwise: false
type: float
- column: GPSAltitude
neotoma: ndb.collectionunits.gpsaltitude
required: false
rowwise: false
type: float
- column: GPSError
neotoma: ndb.collectionunits.gpserror
required: false
rowwise: false
type: float
- column: WaterDepth
neotoma: ndb.collectionunits.waterdepth
required: false
rowwise: false
type: float
- column: Substrate
neotoma: ndb.collectionunits.substrateid
required: false
rowwise: false
type: string
- column: SlopeAngle
neotoma: ndb.collectionunits.slopeangle
required: false
rowwise: false
type: float
- column: SlopeAspect
neotoma: ndb.collectionunits.slopeaspect
required: false
rowwise: false
type: float
- column: Location
neotoma: ndb.collectionunits.location
required: false
rowwise: false
type: string
- column: CollectionUnitNotes
neotoma: ndb.collectionunits.notes
required: false
rowwise: false
type: string
# ── Dataset ──────────────────────────────────────────────────────────────────
- column: DatasetName
neotoma: ndb.datasets.datasetname
required: false
rowwise: false
type: string
- column: DatasetNotes
neotoma: ndb.datasets.notes
required: false
rowwise: false
type: string
# ── Analysis Units ────────────────────────────────────────────────────────────
- column: Depth
neotoma: ndb.analysisunits.depth
required: false
overwrite: true
rowwise: true
type: float
- column: Thickness
neotoma: ndb.analysisunits.thickness
required: false
overwrite: true
rowwise: true
type: float
- column: AnalysisUnitName
neotoma: ndb.analysisunits.analysisunitname
required: false
rowwise: true
type: string
# ── Chronology ────────────────────────────────────────────────────────────────
# The `chronologyname` key groups related fields into a single age model.
#
# Every field that belongs to the same chronology must share the same
# `chronologyname` value. This key is how DataBUS knows which agemodel,
# agebounds, contact, and sampleage columns belong together.
#
# A dataset can define MULTIPLE chronologies by using different
# `chronologyname` values (e.g., one for a 210Pb model and another for a
# calibrated radiocarbon model). See the SISAL template for an example with
# "interp_author" and "lin_interp_SISAL", and the 210Pb template for "X210Pb".
#
# Example (from the 210Pb template):
#
# column: X210.LeadModel
# neotoma: ndb.chronologies.agemodel
# chronologyname: X210Pb ← names this chronology "X210Pb"
#
# column: X210Pb.Date
# neotoma: ndb.chronologies.age
# chronologyname: X210Pb ← ties the age column to the same model
#
# column: X210Pb.Date
# neotoma: ndb.sampleages.age
# chronologyname: X210Pb ← sampleages also linked by chronologyname
#
- column: ChronologyName
neotoma: ndb.chronologies.chronologyname
required: false
rowwise: false
type: string
chronologyname: DefaultChronology
- column: AgeModel
neotoma: ndb.chronologies.agemodel
required: false
rowwise: false
type: string
chronologyname: DefaultChronology
- column: AgeType
neotoma: ndb.chronologies.agetypeid
required: false
rowwise: false
type: string
chronologyname: DefaultChronology
- column: AgeBoundOlder
neotoma: ndb.chronologies.ageboundolder
required: false
rowwise: false
type: float
chronologyname: DefaultChronology
- column: AgeBoundYounger
neotoma: ndb.chronologies.ageboundyounger
required: false
rowwise: false
type: float
chronologyname: DefaultChronology
- column: DatePrepared
neotoma: ndb.chronologies.dateprepared
required: false
rowwise: false
type: string
chronologyname: DefaultChronology
- column: ChronologyNotes
neotoma: ndb.chronologies.notes
required: false
rowwise: false
type: string
chronologyname: DefaultChronology
- column: ChronPreparer
neotoma: ndb.chronologies.contactname
required: false
rowwise: false
type: string
chronologyname: DefaultChronology
# ── Chron Controls ────────────────────────────────────────────────────────────
- column: Depth
neotoma: ndb.chroncontrols.depth
required: false
rowwise: true
type: float
- column: Thickness
neotoma: ndb.chroncontrols.thickness
required: false
rowwise: true
type: float
- column: ChronControlAge
neotoma: ndb.chroncontrols.age
required: false
rowwise: true
type: float
- column: ChronControlAgeYounger
neotoma: ndb.chroncontrols.agelimityounger
required: false
rowwise: true
type: float
- column: ChronControlAgeOlder
neotoma: ndb.chroncontrols.agelimitolder
required: false
rowwise: true
type: float
- column: ChronControlType
neotoma: ndb.chroncontrols.chroncontroltypeid
required: false
rowwise: true
type: string
- column: AgeType
neotoma: ndb.chroncontrols.agetypeid
required: false
rowwise: true
type: string
# ── Geochronology ─────────────────────────────────────────────────────────────
- column: GeochronAge
neotoma: ndb.geochronology.age
required: false
rowwise: true
type: float
- column: GeochronType
neotoma: ndb.geochronology.geochrontypeid
required: false
rowwise: true
type: string
- column: GeochronAgeType
neotoma: ndb.geochronology.agetypeid
required: false
rowwise: true
type: string
- column: GeochronErrorOlder
neotoma: ndb.geochronology.errorolder
required: false
rowwise: true
type: float
- column: GeochronErrorYounger
neotoma: ndb.geochronology.erroryounger
required: false
rowwise: true
type: float
- column: LabNumber
neotoma: ndb.geochronology.labnumber
required: false
rowwise: true
type: string
- column: MaterialDated
neotoma: ndb.geochronology.materialdated
required: false
rowwise: true
type: string
# ── Sample Ages ────────────────────────────────────────────────────────────────
- column: SampleAge
neotoma: ndb.sampleages.age
required: false
rowwise: true
type: float
chronologyname: DefaultChronology
- column: SampleAgeOlder
neotoma: ndb.sampleages.ageolder
required: false
rowwise: true
type: float
chronologyname: DefaultChronology
- column: SampleAgeYounger
neotoma: ndb.sampleages.ageyounger
required: false
rowwise: true
type: float
chronologyname: DefaultChronology
- column: SampleAgeModel
neotoma: ndb.sampleages.agemodel
required: false
rowwise: false
type: string
chronologyname: DefaultChronology
# ── Data values (WIDE FORMAT) ─────────────────────────────────────────────────
# In wide format, each proxy/variable column in the CSV has its own YAML entry
# that maps it to ndb.data.value and carries a `taxonname` key.
#
# ─── taxonname (CRITICAL for data columns) ───────────────────────────────────
# The `taxonname` key links a CSV column to a specific Neotoma taxon.
# It MUST be present for every column mapped to ndb.data.value and for the
# corresponding units column. Without it, the column is silently ignored.
#
# Rules:
# - The value must match the taxon name in the Neotoma database exactly.
# - Both the data column AND its units column must carry the same taxonname.
# - DataBUS does not create new taxa. If the taxon is not found in Neotoma,
# validation will fail and the steward must add the taxon via Tilia first.
#
# Example pair (data column + units column, from the 210Pb template):
#
# column: Unsupported.210Pb ← CSV column name
# neotoma: ndb.data.value
# taxonname: Excess 210Pb ← Neotoma taxon name (MUST exist in DB)
# rowwise: true
# type: float
# unitcolumn: Unsupported.210Pb.Units ← name of the matching units column
#
# column: Unsupported.210Pb.Units ← units CSV column
# neotoma: ndb.variables.variableunitsid
# taxonname: Excess 210Pb ← MUST match the data column's taxonname
# rowwise: true
# type: string
#
# Replace the entries below with your actual variable columns.
# Add one pair (value + units) for every proxy/taxon in your dataset.
# ─────────────────────────────────────────────────────────────────────────────
- column: MyVariable1
neotoma: ndb.data.value
taxonname: my variable 1 neotoma name # REQUIRED – exact Neotoma taxon name
required: false
rowwise: true
type: float
unitcolumn: MyVariable1.Units # CSV column that holds the units string
- column: MyVariable1.Units
neotoma: ndb.variables.variableunitsid
taxonname: my variable 1 neotoma name # MUST match the data column above
required: false
rowwise: true
type: string
- column: MyVariable2
neotoma: ndb.data.value
taxonname: my variable 2 neotoma name
required: false
rowwise: true
type: float
unitcolumn: MyVariable2.Units
- column: MyVariable2.Units
neotoma: ndb.variables.variableunitsid
taxonname: my variable 2 neotoma name
required: false
rowwise: true
type: string
# ── Contacts ──────────────────────────────────────────────────────────────────
- column: PrincipalInvestigator
neotoma: ndb.datasetpis.contactname
required: false
rowwise: false
type: string
- column: Collector
neotoma: ndb.collectors.contactname
required: false
rowwise: false
type: string
- column: DatasetProcessor
neotoma: ndb.datasetprocessor.contactname
required: false
rowwise: false
type: string
- column: SampleAnalyst
neotoma: ndb.sampleanalysts.contactname
required: false
rowwise: false
type: string
# ── Publications ──────────────────────────────────────────────────────────────
- column: DOI
neotoma: ndb.publications.doi
formatorrange: '^10\.\d{4,9}/[-._;()/:A-Z0-9]+$'
required: false
rowwise: false
type: string
- column: Citation
neotoma: ndb.publications.citation
required: false
rowwise: false
type: string