File size: 1,821 Bytes
11c6f80 bc1f545 11c6f80 bc1f545 f3f4d58 bc1f545 f3f4d58 bc1f545 f3f4d58 bc1f545 f3f4d58 bc1f545 f3f4d58 bc1f545 f3f4d58 bc1f545 f3f4d58 bc1f545 f3f4d58 bc1f545 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
---
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 |