Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camtrap DP 0.6 #297

Merged
merged 98 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
70636a3
Clarify that classificationConfidence is usually omitted for human cl…
danstowell Apr 8, 2022
17bfd23
Rename classificationConfidence to classifierProbability (Closes #217)
danstowell Oct 10, 2022
0ece108
Merge branch 'main' into pr/208
peterdesmet Oct 14, 2022
252428e
classifierProbability -> classificationProbability
danstowell Oct 14, 2022
5bd9b22
Rename term in example
peterdesmet Oct 17, 2022
cbebacb
Make the language slightly more consistent
danstowell Nov 10, 2022
8708a09
Simplify hierarchy
peterdesmet Feb 6, 2023
74c288c
Update `eventID` and table definition, rename `sequenceInterval` to `…
peterdesmet Feb 7, 2023
5c89358
Bump version to 0.6
peterdesmet Feb 7, 2023
70d6411
Use {: notation without spaces (consistency change)
peterdesmet Feb 7, 2023
d8b721d
Remove _id columns
peterdesmet Feb 7, 2023
f54d7b0
Map media.deploymentID to dwc:parentEventID
peterdesmet Feb 7, 2023
40182be
Add unit to detectionDistance
peterdesmet Feb 7, 2023
df8870b
Update detectionDistance definition
peterdesmet Feb 7, 2023
02c9179
Spell behaviour as behavior
peterdesmet Feb 7, 2023
7a67481
Switch to latitude, longitude
peterdesmet Feb 7, 2023
ceeadaa
Restrict contributor roles
peterdesmet Feb 7, 2023
5db5538
Use consistent order of terms + remove format: default
peterdesmet Feb 7, 2023
0971884
Spell favourite as favorite
peterdesmet Feb 7, 2023
0bec99e
Indicate that classification terms apply to most recent classification
peterdesmet Feb 7, 2023
3fe06c9
Merge branch 'term-updates' into patch-1
peterdesmet Feb 7, 2023
d9009d4
Merge pull request #208 from danstowell/patch-1
peterdesmet Feb 7, 2023
5e37308
Update current_schema test so schemas are referenced, not included
peterdesmet Feb 8, 2023
bdb5e9f
Remove "name" from table schemas
peterdesmet Feb 8, 2023
4e29592
Require table schema to be a string (url)
peterdesmet Feb 8, 2023
cd24845
Allow more than 3 tables
peterdesmet Feb 8, 2023
7499e79
Allow test of current file to circumvent version to be present in URLs
peterdesmet Feb 8, 2023
63d6f00
Allow adding custom tables
peterdesmet Feb 8, 2023
3e35583
Fix profile test (enum rather than const)
peterdesmet Feb 8, 2023
d180019
Document path and profile
peterdesmet Feb 8, 2023
b7c4741
Show resources information (in oneOf)
peterdesmet Feb 8, 2023
34bac03
Fix broken link
peterdesmet Feb 8, 2023
492cfbd
Fix #278 and reserve "unique"
peterdesmet Feb 8, 2023
bb5902d
Use lowerCamelCase for vocabs
peterdesmet Feb 8, 2023
1a4dbb0
Link with Humboldt Extension terms
peterdesmet Feb 8, 2023
f2934cf
Fix "temporary file not deleted" issue
niconoe Feb 9, 2023
84761b8
Correct observation male/female -> 2 female
peterdesmet Feb 9, 2023
89e6ed5
Update helpers.py
peterdesmet Feb 9, 2023
e1fec24
Initialize example page
peterdesmet Feb 9, 2023
7b46029
Create symlinks for data files
peterdesmet Feb 9, 2023
5ce921e
Update example layout, with Bootstrap carousel and table
peterdesmet Feb 9, 2023
b0e9bc8
Create separate page for each deployment, add frontmatter defaults
peterdesmet Feb 9, 2023
424224a
Fix incorrect count
peterdesmet Feb 9, 2023
81bd6d1
Add media-observations to example dataset
peterdesmet Feb 9, 2023
197a4bb
Use media observations for example pages
peterdesmet Feb 9, 2023
361835a
Indicate machine classificationMethod
peterdesmet Feb 9, 2023
d536ffa
Remove author from footer
peterdesmet Feb 9, 2023
477b4be
Use media observations for example pages
peterdesmet Feb 9, 2023
de1ac9e
Indicate machine classificationMethod
peterdesmet Feb 9, 2023
df68ddc
Merge branch 'example_page' of https://github.com/tdwg/camtrap-dp int…
peterdesmet Feb 9, 2023
40e5555
Reinstate author
peterdesmet Feb 9, 2023
bc7cdc2
Use title attribute on home page
peterdesmet Feb 9, 2023
e818f9d
Assign interval to carousel and disable keyboard nav
peterdesmet Feb 9, 2023
9440f90
Change cameraSetup to enum
peterdesmet Feb 10, 2023
61e72d7
Rename cameraInterval to cameraDelay
peterdesmet Feb 10, 2023
e280c3e
Add favicon.ico
peterdesmet Feb 10, 2023
4d11a07
Fix incorrect relation description
peterdesmet Feb 10, 2023
5da2692
Pluralize deploymentGroups, cf. tags
peterdesmet Feb 10, 2023
8c25523
Fix incorrect match
peterdesmet Feb 10, 2023
e6d6ae4
Add `observation.tags`
peterdesmet Feb 10, 2023
a33c7b9
Update narrow/exact for 6 terms
peterdesmet Feb 10, 2023
9839b4f
Merge pull request #279 from tdwg/new-structure
peterdesmet Feb 13, 2023
822afcb
Merge pull request #283 from tdwg/better-validation
peterdesmet Feb 13, 2023
c3ed7f7
Merge pull request #285 from tdwg/example_page
peterdesmet Feb 13, 2023
7561232
Merge pull request #286 from tdwg/term-updates
peterdesmet Feb 13, 2023
de74ce5
Rename "observations" to "event-observations"
peterdesmet Feb 13, 2023
ed67c4e
Add media-observations-table-schema
peterdesmet Feb 13, 2023
eacf668
Update media-observations.csv to align with latest changes
peterdesmet Feb 13, 2023
12d0cd8
Use case sensitive anchors for terms
peterdesmet Feb 13, 2023
95ad1c3
Use "event-observations" as anchor
peterdesmet Feb 13, 2023
dcfba17
Reserve media-observations and event-observations as names
peterdesmet Feb 13, 2023
e8462d8
Reference media/event-observations together + write as "at media file…
peterdesmet Feb 13, 2023
99a372d
Update def timestampIssues to refer to media table only
peterdesmet Feb 13, 2023
5387813
Remove profile.classificationLevel
peterdesmet Feb 13, 2023
c967405
Remove countNew
peterdesmet Feb 13, 2023
a3cd360
Reorder eventID definition
peterdesmet Feb 13, 2023
f5b4b16
Indicate that event observations are intended to be mutually exclusive
peterdesmet Feb 13, 2023
ffcc331
Require event obs to be mutually exclusive + indicate this is not req…
peterdesmet Feb 13, 2023
db98de9
Merge pull request #289 from tdwg/split-obs
peterdesmet Feb 14, 2023
76c56bc
Fix typo in home
peterdesmet Feb 14, 2023
28b5e42
Write link a <...>
peterdesmet Feb 14, 2023
cd45b03
Use same phrasing for unit for coordinateUncertainty
peterdesmet Feb 14, 2023
3072334
Add unit property (not shown on website)
peterdesmet Feb 14, 2023
5ed173e
Use badge to indicate type
peterdesmet Feb 14, 2023
da83313
Hide DOI under citation
peterdesmet Feb 14, 2023
ef110cd
Add individualSpeed
peterdesmet Feb 14, 2023
e8e7aad
Add individualPositionRadius and individualPositionAngle
peterdesmet Feb 14, 2023
c13620a
Merge pull request #291 from tdwg/units
peterdesmet Feb 15, 2023
7871082
Rephrase eventInterval in line with other terms with units
peterdesmet Feb 15, 2023
8a37b72
Correct mediaID definition
peterdesmet Feb 16, 2023
810ba6c
Clarify multiple classifications
peterdesmet Feb 16, 2023
b59b4f9
Match media-obs:mediaID with associatedMedia
peterdesmet Feb 17, 2023
08e676b
Add `filePublic` field
peterdesmet Feb 17, 2023
767b740
Show placeholder image for filePublic=false
peterdesmet Feb 17, 2023
d37f39c
Merge pull request #294 from tdwg/public
peterdesmet Feb 21, 2023
0791a5e
Merge pull request #292 from tdwg/speed-radius-angle
peterdesmet Feb 22, 2023
d9bd25e
Fix #295
peterdesmet Feb 22, 2023
7fd0136
Merge pull request #296 from tdwg/rename_tags_comments
peterdesmet Feb 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,22 @@ logo: /assets/theme/images/tdwg-logo-short.svg
markdown: kramdown
plugins:
- jekyll-feed
- jekyll-sitemap
exclude:
- README.md
- Gemfile
- Gemfile.lock
- LICENSE
- example
- tests
- example/*
- tests/*
- "*.json"

# FRONTMATTER DEFAULTS
defaults:
- scope:
path: pages/example
values:
permalink: "/example/:basename/"
layout: example
title: Example dataset
toc: true
3 changes: 2 additions & 1 deletion _data/_tables.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- deployments-table-schema
- media-table-schema
- observations-table-schema
- media-observations-table-schema
- event-observations-table-schema
1 change: 1 addition & 0 deletions _data/deployments.csv
1 change: 1 addition & 0 deletions _data/event-observations-table-schema.json
1 change: 1 addition & 0 deletions _data/event-observations.csv
1 change: 1 addition & 0 deletions _data/media-observations-table-schema.json
1 change: 1 addition & 0 deletions _data/media-observations.csv
1 change: 1 addition & 0 deletions _data/media.csv
10 changes: 10 additions & 0 deletions _data/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,15 @@
href: /metadata/
- text: Data
href: /data/
- text: Example dataset
menu:
- text: Deployment 1
href: /example/00a2c20d-f038-490c-9b3f-7e32abfa0be7/
- text: Deployment 2
href: /example/29b7d356-4bb4-4ec4-b792-2af5cc32efa8/
- text: Deployment 3
href: /example/577b543a-2cf1-4b23-b6d2-cda7e2eac372/
- text: Deployment 4
href: /example/62c200a9-0e03-4495-bcd8-032944f6f5a1/
- text: GitHub
href: https://github.com/tdwg/camtrap-dp
1 change: 0 additions & 1 deletion _data/observations-table-schema.json

This file was deleted.

142 changes: 142 additions & 0 deletions _layouts/example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
---
layout: default
---

{{ content }}

<p class="small">Source: <a href="{{ site.github.repository_url }}/blob/main/example"><code>example dataset</code></a></p>

{% assign dep_id = page.name | remove: '.md' %}
{% assign dep = site.data.deployments | where: 'deploymentID', dep_id | first %}
{% assign media = site.data.media | where: 'deploymentID', dep_id %}
{% assign media_observations = site.data.media-observations %}
{% assign event_observations = site.data.event-observations %}

<h2 id="{{ dep_id }}">Deployment information</h2>

<dl>
<dt>Location</dt>
<dd>
<code>{{ dep.locationName }}</code>
(<a href="https://www.google.com/maps/search/?api=1&query={{ dep.latitude }},{{ dep.longitude }}&zoom=12"><code>{{ dep.latitude }}, {{ dep.longitude }}</code></a>),
uncertainty: <code>{{ dep.coordinateUncertainty }}</code>m
<dd>
<dt>Duration</dt>
<dd>
<code>{{ dep.start }}</code> / <code>{{ dep.end }}</code>
</dd>
<dt>Camera setup</dt>
<dd>
interval: <code>{{ dep.cameraInterval }}</code>,
height: <code>{{ dep.cameraHeight }}</code>,
tilt: <code>{{ dep.cameraTilt }}</code>,
heading: <code>{{ dep.cameraHeading }}</code>
</dd>
<dt>Bait</dt>
<dd>
<code>{{ dep.baitUse }}</code>
</dd>
</dl>

{% assign event_ids = media | map: 'eventID' | uniq %}
{% for event_id in event_ids %}
{% assign event_media = media | where: 'eventID', event_id %}
{% assign event_media_count = event_media | size %}
<h2 id="{{ event_id }}">Event: {{ event_id }}</h2>

<div id="carousel-{{ event_id }}" class="carousel slide carousel-fade" data-bs-ride="carousel" data-bs-keyboard="false" data-bs-interval="500">
<div class="carousel-inner">
{% for med in event_media %}
{% assign public = med.filePublic | downcase %}
{% if public == "false" %}
{% assign public = false %}
{% else %}
{% assign public = true %}
{% endif %}
<div class="carousel-item{% if forloop.first %} active{% endif %}">
<img class="d-block w-100" src="{% if public %}{{ med.filePath }}{% else %}{{ '/assets/placeholder.svg' | relative_url }}{% endif %}" alt="{{ med.timestamp }}">
<div class="carousel-caption d-none d-md-block">
<p class="fs-1">{{ forloop.index }}</p>
</div>
</div>
{% endfor %}
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carousel-{{ event_id }}" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carousel-{{ event_id }}" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>

<table class="table table-sm mt-4">
<colgroup>
<col width="6%">
<col width="47%">
<col width="47%">
</colgroup>
<thead>
<tr>
<th>File</th>
<th>Media observations</th>
<th>Event observations</th>
</tr>
</thead>
<tbody>
{% for med in event_media %}
{% assign med_id = med.mediaID %}
<tr>
<td>
{{ forloop.index }}
</td>
<td title="mediaID: {{ med_id }}">
{% assign media_obs = media_observations | where: 'mediaID', med_id %}
{% for obs in media_obs %}
<code>{{ obs.observationType }}</code>
{% if obs.observationType == 'animal' %}
<span class="badge rounded-pill bg-secondary">{{ obs.count }}</span>
<em>{{ obs.scientificName }}</em>
{% if obs.lifeStage and obs.sex %}
({{ obs.lifeStage }}, {{ obs.sex }})
{% elsif obs.lifeStage %}
({{ obs.lifeStage }})
{% elsif obs.sex %}
({{ obs.sex }})
{% endif %}
{% endif %}
{% if obs.classificationMethod == 'machine' %}
<span class="text-muted small">Classified by machine</span>
{% endif %}
<br>
{% endfor %}
</td>
{% if forloop.first %}
<td title="eventID: {{ event_id }}" rowspan="{{ event_media_count }}">
{% assign event_obs = event_observations | where: 'eventID', event_id %}
{% for obs in event_obs %}
<code>{{ obs.observationType }}</code>
{% if obs.observationType == 'animal' %}
<span class="badge rounded-pill bg-secondary">{{ obs.count }}</span>
<em>{{ obs.scientificName }}</em>
{% if obs.lifeStage and obs.sex %}
({{ obs.lifeStage }}, {{ obs.sex }})
{% elsif obs.lifeStage %}
({{ obs.lifeStage }})
{% elsif obs.sex %}
({{ obs.sex }})
{% endif %}
{% endif %}
{% if obs.classificationMethod == 'machine' %}
<span class="text-muted small">Classified by machine</span>
{% endif %}
<br>
{% endfor %}
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% endfor %}
15 changes: 9 additions & 6 deletions _layouts/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% assign properties1 = site.data[profile_file].allOf[1].properties %}
{% assign required1 = site.data[profile_file].allOf[1].required %}

<p class="small">Source: <a href="https://github.com/{{ site.github_username }}/blob/main/{{ profile_file }}.json"><code>{{ profile_file }}.json</code></a></p>
<p class="small">Source: <a href="{{ site.github.repository_url }}/blob/main/{{ profile_file }}.json"><code>{{ profile_file }}.json</code></a></p>

{% for p1_raw in properties1 %}
{% assign p1_name = p1_raw[0] %}
Expand All @@ -25,9 +25,9 @@ <h2 id="{{ p1_id }}">
{% if p1['skos:exactMatch'] %}
<p class="small text-muted">Same as <a href="{{ p1['skos:exactMatch'] }}">{{ p1['skos:exactMatch'] }}</a></p>
{% elsif p1['skos:narrowMatch'] %}
<p class="small text-muted">Narrower than <a href="{{ p1['skos:narrowMatch'] }}">{{ p1['skos:narrowMatch'] }}</a></p>
<p class="small text-muted">Broader than <a href="{{ p1['skos:narrowMatch'] }}">{{ p1['skos:narrowMatch'] }}</a></p>
{% elsif p1['skos:broadMatch'] %}
<p class="small text-muted">Broader than <a href="{{ p1['skos:broadMatch'] }}">{{ p1['skos:broadMatch'] }}</a></p>
<p class="small text-muted">Narrower than <a href="{{ p1['skos:broadMatch'] }}">{{ p1['skos:broadMatch'] }}</a></p>
{% endif %}

{% if p1.properties %}
Expand All @@ -36,6 +36,9 @@ <h2 id="{{ p1_id }}">
{% elsif p1.items.properties %}
{% assign properties2 = p1.items.properties %}
{% assign required2 = p1.items.required %}
{% elsif p1.items.oneOf[0].properties %}
{% assign properties2 = p1.items.oneOf[0].properties %}
{% assign required2 = p1.items.oneOf[0].required %}
{% else %}
{% assign properties2 = false %}
{% endif %}
Expand Down Expand Up @@ -83,12 +86,12 @@ <h2 id="{{ p1_id }}">
{% if p2['skos:exactMatch'] %}
<span class="small text-muted">Same as <a href="{{ p2['skos:exactMatch'] }}">{{ p2['skos:exactMatch'] }}</a></span>
{% elsif p2['skos:narrowMatch'] %}
<span class="small text-muted">Narrower than <a href="{{ p2['skos:narrowMatch'] }}">{{ p2['skos:narrowMatch'] }}</a></span>
<span class="small text-muted">Broader than <a href="{{ p2['skos:narrowMatch'] }}">{{ p2['skos:narrowMatch'] }}</a></span>
{% elsif p2['skos:broadMatch'] %}
<span class="small text-muted">Broader than <a href="{{ p2['skos:broadMatch'] }}">{{ p2['skos:broadMatch'] }}</a></span>
<span class="small text-muted">Narrower than <a href="{{ p2['skos:broadMatch'] }}">{{ p2['skos:broadMatch'] }}</a></span>
{% endif %}
</td>
<td>{{ p2.type }}</td>
<td><span class="badge bg-secondary">{{ p2.type }}</span></td>
</tr>
{% endfor %}
</tbody>
Expand Down
14 changes: 7 additions & 7 deletions _layouts/tables.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

{% for table_schema_file in site.data["_tables"] %}
{% assign table_schema = site.data[table_schema_file] %}
{% assign table_schema_id = table_schema.title | downcase | url_encode %}
{% assign table_schema_id = table_schema.title | downcase | replace: ' ', '-' %}

<h2 id="{{ table_schema_id }}">{{ table_schema.title }}</h2>

<p class="small">Source: <a href="https://github.com/{{ site.github_username }}/blob/main/{{ table_schema_file }}.json"><code>{{ table_schema_file }}.json</code></a></p>
<p class="small">Source: <a href="{{ site.github.repository_url }}/blob/main/{{ table_schema_file }}.json"><code>{{ table_schema_file }}.json</code></a></p>

{{ table_schema.description | markdownify }}

Expand All @@ -30,8 +30,8 @@ <h2 id="{{ table_schema_id }}">{{ table_schema.title }}</h2>
<tbody>
{% for field in table_schema.fields %}
<tr class="text-break">
<td id="{{ table_schema_id }}.{{ field.name | downcase | url_encode }}">
<a href="#{{ table_schema_id }}.{{ field.name | downcase | url_encode }}"><code>{{ field.name }}</code></a>
<td id="{{ table_schema_id }}.{{ field.name }}">
<a href="#{{ table_schema_id }}.{{ field.name }}"><code>{{ field.name }}</code></a>
{% if field.constraints.required %}*{% endif %}
</td>
<td>
Expand All @@ -52,12 +52,12 @@ <h2 id="{{ table_schema_id }}">{{ table_schema.title }}</h2>
{% if field['skos:exactMatch'] %}
<span class="small text-muted">Same as <a href="{{ field['skos:exactMatch'] }}">{{ field['skos:exactMatch'] }}</a></span>
{% elsif field['skos:narrowMatch'] %}
<span class="small text-muted">Narrower than <a href="{{ field['skos:narrowMatch'] }}">{{ field['skos:narrowMatch'] }}</a></span>
<span class="small text-muted">Broader than <a href="{{ field['skos:narrowMatch'] }}">{{ field['skos:narrowMatch'] }}</a></span>
{% elsif field['skos:broadMatch'] %}
<span class="small text-muted">Broader than <a href="{{ field['skos:broadMatch'] }}">{{ field['skos:broadMatch'] }}</a></span>
<span class="small text-muted">Narrower than <a href="{{ field['skos:broadMatch'] }}">{{ field['skos:broadMatch'] }}</a></span>
{% endif %}
</td>
<td>{{ field.type }}</td>
<td><span class="badge bg-secondary">{{ field.type }}</span></td>
</tr>
{% endfor %}
</tbody>
Expand Down
Loading