Skip to content
6 changes: 4 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# CHANGES IN GGIR VERSION 3.3-

- Updated documentation to point to the new web dashboard URL (#1509)

- Part 1: Fixed an issue in g.calibrate() where large data chunks caused out-of-bounds errors (#1513)

- Documentation:
- Made each chapter more readable as a stand-alone tutorial (#1517)
- Updated documentation to point to the new web dashboard URL (#1509)

- Part 2: Fixed bug where activity log (qwindow) segments could be assigned to the day before, because g.analyse.perday() derived the recording-day dates with as.Date() defaulting to UTC instead of desiredtz (#1518)

- Part 2: Fixed regression in g.impute() where using a study_dates_file raised "NA/NaN argument" for participants whose listed start or end date is not a midnight present in the recording (e.g. an evening start, or a device that stopped recording before the listed end date). #1508
Expand Down
2 changes: 2 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ navbar:
annexes:
text: Annexes
menu:
- text: Glossary
href: articles/Glossary.html
- text: GGIR Parameters
href: articles/GGIRParameters.html
- text: GGIR Output
Expand Down
277 changes: 277 additions & 0 deletions vignettes/Glossary.Rmd

Large diffs are not rendered by default.

122 changes: 122 additions & 0 deletions vignettes/chapter0_Contributing.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,22 @@ editor_options:
knitr::opts_chunk$set(echo = TRUE)
```

::: {style="background:#f0f4ff;border-left:4px solid #0054AD;padding:1rem 1.2rem;margin-bottom:1.5rem;border-radius:4px"}

**⏱ Reading time:** ~5 min

**What you will find here**

- How to contribute code, documentation, or funding to GGIR
- How to report bugs and questions publicly
- Community initiatives complementing GGIR

**Prerequisites**

- Familiarity with GitHub is helpful but not required for non-code contributions.

</div>


## If you have coding skills…

Expand All @@ -35,3 +51,109 @@ You might not have the coding skills to contribute to the code base of GGIR, and
- **Proofread the GGIR documentation** and inform us if you miss something or if you found it difficult to follow.
- **Take independent initiatives to complement our efforts**. For example, Prof. Stuart Fairclough created a [series of GGIR video tutorials](https://www.youtube.com/watch?v=AbHgJYTyuiA), Wei Guo and colleagues created the R package [mMARCH.AC](https://doi.org/10.32614/CRAN.package.mMARCH.AC) to post-process GGIR output as described in the supporting [journal article](https://doi.org/10.1123/jmpb.2022-0018), and maybe there are other initiatives we are not aware of. To avoid duplicated work and to support each other where needed, please communicate about your initiatives via the [GGIR GitHub discussion page](https://github.com/wadpac/GGIR/discussions) and/or with GGIR maintainer [Vincent van Hees](https://www.accelting.com/).

---

::: {style="background:#f8f9fa;border-top:2px solid #dee2e6;padding:1rem 1.2rem;margin-top:2rem;border-radius:4px"}

### Summary

There are many ways to contribute to GGIR – code, documentation, funding, outreach, and reporting. Every contribution helps sustain this free software.

### What to read next

➡ [Chapter 1: What is GGIR?](chapter1_WhatIsGGIR.html)

### Related materials

- 📹 [Stuart Fairclough: GGIR video tutorial playlist](https://www.youtube.com/watch?v=AbHgJYTyuiA)
- 📄 [GGIR contributing guidelines (GitHub)](https://github.com/wadpac/GGIR/blob/main/CONTRIBUTING.md)
- 🔗 [GGIR GitHub Discussions](https://github.com/wadpac/GGIR/discussions)

</div>


<style>
abbr[data-custom-tooltip] {
cursor: pointer;
position: relative;
text-decoration: underline dotted #0054AD;
}
abbr[data-custom-tooltip]:hover::after {
content: attr(data-custom-tooltip);
position: absolute;
bottom: 120%;
left: 50%;
transform: translateX(-50%);
background-color: #2c3e50;
color: #fff;
padding: 6px 10px;
border-radius: 4px;
white-space: normal;
width: max-content;
max-width: 250px;
font-size: 13px;
z-index: 1000;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
text-align: center;
line-height: 1.4;
}
abbr[data-custom-tooltip]:hover::before {
content: '';
position: absolute;
bottom: 100%;
left: 50%;
transform: translateX(-50%);
border: 6px solid transparent;
border-top-color: #2c3e50;
}
pre {
position: relative;
}
pre .copy-btn {
position: absolute;
top: 4px;
right: 4px;
padding: 2px 8px;
font-size: 12px;
cursor: pointer;
background: #f0f0f0;
border: 1px solid #ccc;
border-radius: 3px;
opacity: 0;
transition: opacity 0.2s;
}
pre:hover .copy-btn {
opacity: 1;
}
pre .copy-btn.copied {
background: #2c3e50;
color: #fff;
border-color: #2c3e50;
}
</style>
<script>
document.addEventListener("DOMContentLoaded", function() {
document.querySelectorAll('abbr[title]').forEach(function(abbr) {
abbr.setAttribute('data-custom-tooltip', abbr.getAttribute('title'));
abbr.removeAttribute('title');
});
document.querySelectorAll('pre').forEach(function(pre) {
var btn = document.createElement('button');
btn.className = 'copy-btn';
btn.textContent = '\ud83d\udccb Copy';
btn.addEventListener('click', function() {
var code = pre.querySelector('code');
var text = code ? code.textContent : pre.textContent;
navigator.clipboard.writeText(text).then(function() {
btn.textContent = '\u2705 Copied!';
btn.classList.add('copied');
setTimeout(function() {
btn.textContent = '\ud83d\udccb Copy';
btn.classList.remove('copied');
}, 2000);
});
});
pre.appendChild(btn);
});
});
</script>
127 changes: 127 additions & 0 deletions vignettes/chapter0_GetStarted.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,23 @@ editor_options:
knitr::opts_chunk$set(echo = TRUE)
```

::: {style="background:#f0f4ff;border-left:4px solid #0054AD;padding:1rem 1.2rem;margin-bottom:1.5rem;border-radius:4px"}

**⏱ Reading time:** ~5 min

**What you will find here**

- A quick orientation to how GGIR is used
- The minimum GGIR call to get your first analysis running
- Links to installation, support, and training materials

**Prerequisites**

- R and RStudio installed – see [Installation](chapter0_Installation.html)


</div>

If you arrive here with the expectation to find a quick instruction to run and use GGIR for your research then we have to disappoint you. The number of GGIR functionalities is vast and mastering them requires a time investment. In this section we will only provide you with a brief introduction on how GGIR is used. However, to fully benefit from all the functionality GGIR offers we recommend that you read the chapters on this website.

The first step to get started is to install R, Rstudio, and GGIR as discussed [here](https://wadpac.github.io/GGIR/articles/chapter0_Installation.html).
Expand Down Expand Up @@ -56,3 +73,113 @@ This command will let GGIR run with all its default settings (parameters), so th
- [Install R and GGIR](https://wadpac.github.io/GGIR/articles/chapter0_Installation.html)
- [Get support](https://wadpac.github.io/GGIR/articles/chapter0_Support.html)
- [Suitable file formats for GGIR](https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html#input-files)

---

::: {style="background:#f8f9fa;border-top:2px solid #dee2e6;padding:1rem 1.2rem;margin-top:2rem;border-radius:4px"}

### Summary

You have seen the minimal GGIR call and where to go next. The documentation chapters on this site will guide you through tailoring the analysis to your study design.

### What to read next

➡ [Chapter 1: What is GGIR?](chapter1_WhatIsGGIR.html)

### Related materials

- 📄 [GGIR Parameters reference](GGIRParameters.html)
- 📄 [Cookbook: common recipes](Cookbook.html)
<br>
<p><em>Video tutorial by Prof. Stuart Fairclough</em></p>
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; border-radius: 4px; margin-bottom: 1.5rem;">
<iframe data-external="1" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" src="https://www.youtube.com/embed/AbHgJYTyuiA?si=effdWD1HR5D46Cc1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div>

:::

<style>
abbr[data-custom-tooltip] {
cursor: pointer;
position: relative;
text-decoration: underline dotted #0054AD;
}
abbr[data-custom-tooltip]:hover::after {
content: attr(data-custom-tooltip);
position: absolute;
bottom: 120%;
left: 50%;
transform: translateX(-50%);
background-color: #2c3e50;
color: #fff;
padding: 6px 10px;
border-radius: 4px;
white-space: normal;
width: max-content;
max-width: 250px;
font-size: 13px;
z-index: 1000;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
text-align: center;
line-height: 1.4;
}
abbr[data-custom-tooltip]:hover::before {
content: '';
position: absolute;
bottom: 100%;
left: 50%;
transform: translateX(-50%);
border: 6px solid transparent;
border-top-color: #2c3e50;
}
pre {
position: relative;
}
pre .copy-btn {
position: absolute;
top: 4px;
right: 4px;
padding: 2px 8px;
font-size: 12px;
cursor: pointer;
background: #f0f0f0;
border: 1px solid #ccc;
border-radius: 3px;
opacity: 0;
transition: opacity 0.2s;
}
pre:hover .copy-btn {
opacity: 1;
}
pre .copy-btn.copied {
background: #2c3e50;
color: #fff;
border-color: #2c3e50;
}
</style>
<script>
document.addEventListener("DOMContentLoaded", function() {
document.querySelectorAll('abbr[title]').forEach(function(abbr) {
abbr.setAttribute('data-custom-tooltip', abbr.getAttribute('title'));
abbr.removeAttribute('title');
});
document.querySelectorAll('pre').forEach(function(pre) {
var btn = document.createElement('button');
btn.className = 'copy-btn';
btn.textContent = '\ud83d\udccb Copy';
btn.addEventListener('click', function() {
var code = pre.querySelector('code');
var text = code ? code.textContent : pre.textContent;
navigator.clipboard.writeText(text).then(function() {
btn.textContent = '\u2705 Copied!';
btn.classList.add('copied');
setTimeout(function() {
btn.textContent = '\ud83d\udccb Copy';
btn.classList.remove('copied');
}, 2000);
});
});
pre.appendChild(btn);
});
});
</script>
Loading
Loading