Loading your data
How BODAQS processes data
Section titled “How BODAQS processes data”BODAQS separates data ingestion from data exploration.
You normally begin with one or more raw logger CSV files. Those raw files are then preprocessed into an on-disk artifact library that the notebooks can share.
At a high level, the flow is:
- Raw logger CSV files are selected and preprocessed. Preprocessing involves:
- Each processed file becomes a session.
- Sessions are written into a batch run under
analysis/artifacts/. - Each session stores the raw data, processed dataframe, session metadata, detected events, and derived metrics.
- Other notebooks then read those artifacts to produce visualizations. Each log file only needs to be processed once.
The notebooks work together. One notebook can create the artifacts, another can add descriptions or notes, and another can build charts and dashboards from the same processed sessions.
Two notebook workflows
Section titled “Two notebook workflows”Here are two recommended ways to work with the analysis notebooks:
1. Simple single-notebook workflow
Section titled “1. Simple single-notebook workflow”This workflow uses bodaqs_one_step_suspension_metrics.ipynb
This notebook looks for new raw logger files, preprocesses them, writes the artifacts, and then opens the simple suspension metrics dashboard over the processed sessions. The user simply drops their new log files in a directory, runs the notebook and looks at the results, which comprise various histograms and metrics often used in MTB suspension analysis.
2. Multi-notebook workflow
Section titled “2. Multi-notebook workflow”This is a more flexible workflow that gives the user more control over preprocessing and gives access to library management functionality and a wider selection of analysis tools. The main notebooks used are:
bodaqs_batch_preprocessor.ipynbto import and preprocess raw logger CSV files and create analysis artifacts, with full control of preprocessing settingsbodaqs_library_manager.ipynbto add descriptions and notes, and create and manage ‘aggregations’bodaqs_data_explorer.ipynbto explore the processed data with a broader set of analysis widgets.bodaqs_session_browser.ipynbto examine time-series data directly against a GPS map.
Starting JupyterLab
Section titled “Starting JupyterLab”With your virtual environment active and dependencies installed, open a terminal in the BODAQS folder and start JupyterLab:
cd C:\path\to\BODAQS.\.venv\Scripts\Activate.ps1python -m jupyter lab --notebook-dir=analysiscd /path/to/BODAQSsource .venv/bin/activatepython -m jupyter lab --notebook-dir=analysisJupyterLab should open automatically in your default browser. If it doesn’t,
copy the http://localhost:8888/... address shown in the terminal into your
browser.
Choosing your starting notebook
Section titled “Choosing your starting notebook”If you want the simpler all-in-one path, start with:
bodaqs_one_step_suspension_metrics.ipynb
If you want the more extensive multi-notebook path, start with:
bodaqs_batch_preprocessor.ipynb
Then continue with:
bodaqs_library_manager.ipynbbodaqs_data_explorer.ipynb
Running a notebook
Section titled “Running a notebook”- Double-click the notebook in the left-hand file browser.
- If JupyterLab asks you to choose a kernel, select the Python environment from your
.venv. It may appear asPython 3,Python (BODAQS), orBODAQS (.venv). - To run the whole notebook from top to bottom, choose Run -> Run All Cells.
- To work through the notebook one cell at a time, click a cell and press Shift+Enter.
Typical workflow
Section titled “Typical workflow”When you come back later, these are the commands you usually need:
cd C:\path\to\BODAQS.\.venv\Scripts\Activate.ps1python -m jupyter lab --notebook-dir=analysiscd /path/to/BODAQSsource .venv/bin/activatepython -m jupyter lab --notebook-dir=analysis