jointly
Jointly: A Python package for synchronizing sensors with accelerometer data
Science Score: 77.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 2 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
✓Committers with academic emails
1 of 8 committers (12.5%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.6%) to scientific vocabulary
Last synced: 6 months ago
·
JSON representation
·
Repository
Jointly: A Python package for synchronizing sensors with accelerometer data
Basic Info
- Host: GitHub
- Owner: hpi-dhc
- License: mit
- Language: Python
- Default Branch: master
- Homepage: https://jointly.readthedocs.io/
- Size: 527 KB
Statistics
- Stars: 11
- Watchers: 3
- Forks: 1
- Open Issues: 0
- Releases: 2
Created over 5 years ago
· Last pushed about 4 years ago
Metadata Files
Readme
Changelog
Contributing
License
Code of conduct
Citation
README.rst
==============
Jointly
==============
.. image:: https://img.shields.io/pypi/v/jointly.svg
:target: https://pypi.python.org/pypi/jointly
.. image:: https://github.com/hpi-dhc/jointly/actions/workflows/deploy.yml/badge.svg
:target: https://github.com/hpi-dhc/jointly/actions/workflows/deploy.yml?query=branch%3Amaster
.. image:: https://github.com/hpi-dhc/jointly/actions/workflows/all.yml/badge.svg
:target: https://github.com/hpi-dhc/jointly/actions/workflows/all.yml?query=branch%3Amaster
.. image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/enra64/f731de158a21515e2d6c52ed48d406ad/raw/jointly_coverage_main.json
:target: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/enra64/f731de158a21515e2d6c52ed48d406ad/raw/jointly_coverage_main.json
.. image:: https://readthedocs.org/projects/jointly/badge/?version=latest
:target: https://jointly.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://pyup.io/repos/github/hpi-dhc/jointly/shield.svg
:target: https://pyup.io/repos/github/hpi-dhc/jointly/
:alt: Updates
.. image:: https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg
:target: https://github.com/hpi-dhc/jointly/blob/master/CODE_OF_CONDUCT.md
.. image:: https://zenodo.org/badge/303936309.svg
:target: https://zenodo.org/badge/latestdoi/303936309
.. image:: https://tinyurl.com/y22nb8up
:target: https://github.com/pyOpenSci/software-review/issues/45
Jointly is a python package for synchronizing sensors with accelerometer data. You need this package if you're a researcher who has recorded accelerometer data (plus possibly other data) on multiple sensors and wants to synchronize the multiple data streams precisely. Specifically, shake all your sensors together before and after a study and jointly will find these shakes, remove any temporal offset between sensors, and stretch the data so every clock aligns with a reference sensor. Jointly ingests and produces ``pandas DataFrame`` objects.
* Free software: MIT license
* Documentation: https://jointly.readthedocs.io
Features
--------
* Detect and compare shakes in multiple sensor data streams
* Remove temporal offsets in the data
* Remove clock speed offsets by stretching the data
Installation
------------
Install the package from pypi:
.. code:: bash
pip install jointly
You might want to check out our `contributing guide`_ in case you want to edit the package.
Usage
-----
The data has to be provided in pandas ``DataFrame`` instances with a
``DateTimeIndex`` for each sensor. In the following example, ``Faros`` and ``Empatica``
are two sensors we want to synchronize, and we have already prepared dataframes for them.
The Empatica is the reference source, and thus the Faros' data will be changed in the output.
The ``ref_column`` is the column that contains the characteristic shake, and all other columns
in the ``DataFrame`` will be synchronized together with that column.
.. code:: python
import pandas as pd
import tempfile
import traceback
import jointly
# load source dataframes with datetime index
faros_df = pd.read_csv(
"./test-data/faros-plus-physilog/faros.csv.gz",
index_col=[0],
parse_dates=True
)
physilog_df = pd.read_csv(
"./test-data/faros-plus-physilog/physilog.csv.gz",
index_col=[0],
parse_dates=True,
)
# the magnitude is a common property that keeps shake information without axis relevance
faros_df["Accel Mag"] = jointly.calculate_magnitude(
faros_df, ["Accel X", "Accel Y", "Accel Z"]
)
physilog_df["Accel Mag"] = jointly.calculate_magnitude(
physilog_df, ["Accel X", "Accel Y", "Accel Z"]
)
# create dictionary of source sensors
sources = {
"Faros": {
"data": faros_df,
"ref_column": "Accel Mag",
},
"Physilog": {
"data": physilog_df,
"ref_column": "Accel Mag",
},
}
# set shake extraction parameters
extractor = jointly.ShakeExtractor()
extractor.start_window_length = pd.Timedelta(seconds=15)
extractor.end_window_length = pd.Timedelta(seconds=10)
extractor.min_length = 3
extractor.threshold = 0.55
# prepare the synchronizer
synchronizer = jointly.Synchronizer(
sources, reference_source_name="Faros", extractor=extractor
)
# if the extractor parameters are wrong, print the problem and show the data
try:
# get_synced_data returns a dictionary of sensor names to synced DataFrames
synchronizer.get_synced_data()
except Exception:
traceback.print_exc()
jointly.plot_reference_columns(sources)
# save a file for each input sensor somewhere
with tempfile.TemporaryDirectory() as tmp_dir:
synchronizer.save_pickles(tmp_dir)
Documentation Deep Links
~~~~~~~~~~~~~~~~~~~~~~~~
Here you can find more information on specific topics:
* `Preparing Data for Ingestion`_
* `Tuning the Shake Detection`_
* `Debugging the Shake Detection`_
* `How to Save the Synchronized Data`_
* `How to Enable Logging`_
* `Full Explanation of the Synchronization`_
Template Credits
----------------
This package was created with Cookiecutter_ and the `pyOpenSci/cookiecutter-pyopensci`_ project template, based off `audreyr/cookiecutter-pypackage`_.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`pyOpenSci/cookiecutter-pyopensci`: https://github.com/pyOpenSci/cookiecutter-pyopensci
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
.. _`Preparing Data for Ingestion`: https://jointly.readthedocs.io/en/latest/usage.html#preparing-data-for-ingestion
.. _`Tuning the Shake Detection`: https://jointly.readthedocs.io/en/latest/usage.html#tuning-shake-detection
.. _`Debugging the Shake Detection`: https://jointly.readthedocs.io/en/latest/usage.html#debugging
.. _`How to Save the Synchronized Data`: https://jointly.readthedocs.io/en/latest/usage.html#saving-data
.. _`How to Enable Logging`: https://jointly.readthedocs.io/en/latest/usage.html#logging
.. _`Full Explanation of the Synchronization`: https://jointly.readthedocs.io/en/latest/background.html#the-syncing-process
.. _`contributing guide`: https://jointly.readthedocs.io/en/latest/contributing.html
Citation
--------
Arne Herdick, Felix Musmann, Ariane Sasso, Justin Albert, & Bert Arnrich. (2022). Jointly: A Python package for synchronizing multiple sensors with accelerometer data (1.0.4). Zenodo. https://doi.org/10.5281/zenodo.5833858
Owner
- Name: Digital Health Center
- Login: hpi-dhc
- Kind: organization
- Location: Potsdam, Germany
- Website: https://hpi.de/digital-health-center/
- Repositories: 17
- Profile: https://github.com/hpi-dhc
This GitHub organization hosts code for different research projects within the Digital Health Center at the HPI
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Herdick" given-names: "Arne" orcid: "https://orcid.org/0000-0002-1288-3571" - family-names: "Musmann" given-names: "Felix" orcid: "https://orcid.org/0000-0001-5365-0785" - family-names: "Sasso" given-names: "Ariane" orcid: "https://orcid.org/0000-0002-3669-4599" - family-names: "Albert" given-names: "Justin" orcid: "https://orcid.org/0000-0002-6121-792X" - family-names: "Arnrich" given-names: "Bert" orcid: "https://orcid.org/0000-0001-8380-7667" url: "https://github.com/hpi-dhc/jointly" doi: "https://doi.org/10.5281/zenodo.5833858" title: "Jointly: A Python package for synchronizing multiple sensors with accelerometer data" version: 1.0.4 date-released: 2021-01-10
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Ariane Sasso | a****o@g****m | 26 |
| Arne | e****4 | 9 |
| enra64 | a****b@p****t | 6 |
| Felix Musmann | f****n@s****e | 5 |
| Ariane Morassi-Sasso | a****o@h****e | 4 |
| Arpita Kappattanavar | a****r@h****e | 3 |
| Legelhcs | m****l@p****e | 2 |
| pyup.io bot | g****t@p****o | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 5
- Total pull requests: 8
- Average time to close issues: about 16 hours
- Average time to close pull requests: 3 days
- Total issue authors: 4
- Total pull request authors: 2
- Average comments per issue: 2.2
- Average comments per pull request: 0.13
- Merged pull requests: 8
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- AlexS12 (2)
- lwasser (1)
- pyup-bot (1)
- arthur-e (1)
Pull Request Authors
- enra64 (7)
- pyup-bot (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 23 last-month
- Total dependent packages: 0
- Total dependent repositories: 5
- Total versions: 12
- Total maintainers: 3
pypi.org: jointly
Synchronize sensor data from accelerometer shakes
- Homepage: https://github.com/hpi-dhc/jointly
- Documentation: https://hpi-dhc.github.io/jointly
- License: MIT
-
Latest release: 1.0.4
published about 4 years ago
Rankings
Dependent repos count: 6.6%
Dependent packages count: 10.1%
Average: 15.7%
Stargazers count: 17.1%
Downloads: 22.0%
Forks count: 22.6%
Maintainers (3)
Last synced:
6 months ago
Dependencies
poetry.lock
pypi
- alabaster 0.7.12 develop
- appdirs 1.4.4 develop
- atomicwrites 1.4.0 develop
- attrs 21.2.0 develop
- babel 2.9.1 develop
- backports.entry-points-selectable 1.1.0 develop
- black 21.7b0 develop
- certifi 2021.5.30 develop
- cfgv 3.3.0 develop
- charset-normalizer 2.0.4 develop
- click 8.0.1 develop
- colorama 0.4.4 develop
- coverage 5.5 develop
- distlib 0.3.2 develop
- docutils 0.16 develop
- filelock 3.0.12 develop
- flake8 3.9.2 develop
- identify 2.2.12 develop
- idna 3.2 develop
- imagesize 1.2.0 develop
- importlib-metadata 4.6.3 develop
- iniconfig 1.1.1 develop
- jinja2 3.0.1 develop
- markupsafe 2.0.1 develop
- mccabe 0.6.1 develop
- mypy-extensions 0.4.3 develop
- nodeenv 1.6.0 develop
- packaging 21.0 develop
- pathspec 0.9.0 develop
- platformdirs 2.2.0 develop
- pluggy 0.13.1 develop
- pre-commit 2.13.0 develop
- py 1.10.0 develop
- pyarrow 5.0.0 develop
- pycodestyle 2.7.0 develop
- pyflakes 2.3.1 develop
- pygments 2.9.0 develop
- pyproject-flake8 0.0.1a2 develop
- pytest 6.2.4 develop
- pyyaml 5.4.1 develop
- regex 2021.8.3 develop
- requests 2.26.0 develop
- snowballstemmer 2.1.0 develop
- sphinx 4.1.2 develop
- sphinx-rtd-theme 0.5.2 develop
- sphinxcontrib-applehelp 1.0.2 develop
- sphinxcontrib-devhelp 1.0.2 develop
- sphinxcontrib-htmlhelp 2.0.0 develop
- sphinxcontrib-jsmath 1.0.1 develop
- sphinxcontrib-qthelp 1.0.3 develop
- sphinxcontrib-serializinghtml 1.1.5 develop
- toml 0.10.2 develop
- tomli 1.2.0 develop
- typed-ast 1.4.3 develop
- typing-extensions 3.10.0.0 develop
- urllib3 1.26.6 develop
- virtualenv 20.7.0 develop
- zipp 3.5.0 develop
- cycler 0.10.0
- kiwisolver 1.3.1
- matplotlib 3.4.2
- numpy 1.21.1
- pandas 1.3.1
- pillow 8.3.1
- pyparsing 2.4.7
- python-dateutil 2.8.2
- pytz 2021.1
- scipy 1.7.1
- six 1.16.0
pyproject.toml
pypi
- black ^21.7b0 develop
- coverage ^5.5 develop
- flake8 ^3.9.2 develop
- pre-commit ^2.13.0 develop
- pyarrow ^5.0.0 develop
- pyproject-flake8 ^0.0.1-alpha.2 develop
- pytest ^6.2.4 develop
- sphinx-rtd-theme ^0.5.2 develop
- matplotlib ^3.4.2
- numpy ^1.21.1
- pandas ^1.3.1
- python >=3.7.1,<3.10
- scipy ^1.7.1