|
|
--- |
|
|
title: Ketone Level Plotter |
|
|
emoji: π¬ |
|
|
colorFrom: red |
|
|
colorTo: pink |
|
|
sdk: gradio |
|
|
app_file: app.py |
|
|
pinned: false |
|
|
--- |
|
|
|
|
|
# π¬ Ketone Level Plotter |
|
|
|
|
|
A simple and elegant tool to visualize ketone levels over time from CSV or Excel files. |
|
|
|
|
|
## Features |
|
|
|
|
|
- π **Interactive Plotting**: Upload CSV or Excel files and get beautiful time-series plots |
|
|
- π― **Smart Column Detection**: Automatically identifies date and ketone level columns |
|
|
- π **Summary Statistics**: Get min, max, average, and date range statistics |
|
|
- π **Multiple Formats**: Supports CSV (.csv) and Excel (.xlsx, .xls) files |
|
|
- π¨ **Clean Design**: Modern, easy-to-use interface with Gradio |
|
|
|
|
|
## How to Use |
|
|
|
|
|
1. **Prepare your data file** with: |
|
|
- A date/time column (any common format like YYYY-MM-DD, MM/DD/YYYY, etc.) |
|
|
- A ketone level column (numeric values in mmol/L) |
|
|
|
|
|
2. **Upload your file** by dragging and dropping or clicking to browse |
|
|
|
|
|
3. **Click "Generate Plot"** or the plot will auto-generate after upload |
|
|
|
|
|
4. **View your results** including the plot and summary statistics |
|
|
|
|
|
## Expected File Format |
|
|
|
|
|
Your file should have at least two columns: |
|
|
- **Date/Time column**: Can be named "Date", "Time", or any variant |
|
|
- **Ketone level column**: Can be named "Ketone", "Level", "Value", "Reading", "Sensor", etc. |
|
|
|
|
|
If column names don't match, the app will use: |
|
|
- First column as date/time |
|
|
- Second column as ketone levels |
|
|
|
|
|
## Running Locally |
|
|
|
|
|
```bash |
|
|
pip install -r requirements.txt |
|
|
python app.py |
|
|
``` |
|
|
|
|
|
## Example Data Structure |
|
|
|
|
|
```csv |
|
|
Date,Ketone Level |
|
|
2025-10-27 12:00:00,1.3 |
|
|
2025-10-27 13:00:00,1.5 |
|
|
2025-10-27 14:00:00,1.8 |
|
|
``` |
|
|
|
|
|
Or in Excel format with similar structure. |
|
|
|
|
|
## Technologies |
|
|
|
|
|
- **Gradio**: Interactive web interface |
|
|
- **Pandas**: Data processing |
|
|
- **Matplotlib**: Plotting and visualization |
|
|
- **OpenPyXL**: Excel file support |