Library with a collection of useful classes and methods to DRY
Project description
Mango Dashboard is an interactive web application built with Streamlit that provides tools for exploring and visualizing data files. It includes two main modules: File Explorer and Time Series Dashboard.
Features
File Explorer
Interactive file explorer: Navigate through folders and files visually
Multiple format visualization: Supports CSV, Excel, JSON, HTML, images (PNG, JPG, JPEG) and Markdown
Data editing: Edit and save CSV, Excel and JSON files directly from the interface
Flexible configuration: Customize layout with multiple rows and columns
GCP support: Integration with Google Cloud Storage for remote files
Directory tree: Hierarchical visualization of folder structure
Time Series Dashboard
Time series analysis: Specialized tools for temporal data
Data loading: Interface for uploading and processing time series files
Visualizations: Interactive charts for temporal analysis
Forecast templates: Predefined templates for forecasting models
Installation
Using uv:
uv add mango-dashboard
Using pip:
pip install mango-dashboard
Usage
File Explorer
Basic command:
# From the mango project root
cd C:\Users\NataliaGorrin\Desktop\Proyectos_baobab\mango
# Using the CLI
python -m mango_dashboard.file_explorer.cli.dashboard file_explorer --path "path/to/your/folder"
# Or running directly
streamlit run mango_dashboard/mango_dashboard/file_explorer/dashboards/file_explorer_app.py -- --path "path/to/your/folder"
Available parameters:
--path or -p: Path of the folder to explore (default: current directory)
--editable or -e: Enable dashboard editing (0=no, 1=yes, -1=default)
--config_path or -c: Path to the JSON configuration file
--gcp_credentials_path: Path to Google Cloud credentials (GCP only)
Usage examples:
Explore a local folder:
python -m mango_dashboard.file_explorer.cli.dashboard file_explorer --path "path/to/your/folder"
Explore with custom configuration:
python -m mango_dashboard.file_explorer.cli.dashboard file_explorer --path "./data" --config_path "./my_config.json" --editable 1
Explore files in Google Cloud Storage:
python -m mango_dashboard.file_explorer.cli.dashboard file_explorer --path "gs://my-bucket/data" --gcp_credentials_path "./credentials.json"
Time Series Dashboard
# Run the time series dashboard
python -m mango_dashboard.time_series.cli.dashboard time_series
Configuration
JSON Configuration File
The File Explorer uses a JSON configuration file to customize the interface:
{
"title": "My Custom Dashboard",
"header": "Data Explorer",
"icon": ":chart_with_upwards_trend:",
"layout": "wide",
"dir_path": "/path/to/my/data",
"n_rows": 2,
"n_cols_1": 1,
"n_cols_2": 2,
"editable": true,
"dict_layout": {
"file_1_1": "/path/to/file1.csv",
"file_2_1": "/path/to/file2.html",
"file_2_2": "/path/to/file3.xlsx"
}
}
Configuration Parameters:
title: Application title
header: Main header
icon: Page icon (emoji or icon code)
layout: Page layout (“wide” or “centered”)
dir_path: Default directory path
n_rows: Number of rows in the layout
n_cols_X: Number of columns in row X
editable: Whether the dashboard is editable
dict_layout: Mapping of files to specific positions
Supported File Formats
Visualization
CSV: Editable tables with pandas
Excel (.xlsx): Multiple sheets with tabs
JSON: Table visualization or raw JSON
HTML: Embedded Plotly charts
Images: PNG, JPG, JPEG with size controls
Markdown: Rendered as HTML
Editing
CSV: Data editor with pandas
Excel: Sheet editor
JSON: Table editor or raw JSON
Advanced Features
Google Cloud Storage Integration
Support for gs:// paths
Authentication with JSON credential files
Remote bucket and object exploration
Visualization Customization
Width and height control for images and HTML charts
Flexible layout with multiple rows and columns
Persistent configuration in JSON files
Editing Features
Inline editing of tabular data
Automatic change saving
Support for multiple output formats
Project Structure
mango_dashboard/ ├── mango_dashboard/ │ ├── file_explorer/ │ │ ├── cli/ │ │ │ └── dashboard.py # CLI for File Explorer │ │ └── dashboards/ │ │ ├── file_explorer_app.py # Main application │ │ └── file_explorer_handlers.py # File handlers │ └── time_series/ │ ├── cli/ │ │ └── dashboard.py # CLI for Time Series │ └── dashboards/ │ └── time_series_app.py # Time series application ├── README.rst └── pyproject.toml
Troubleshooting
Error: “File does not exist”
Make sure to run the command from the mango project root:
cd C:\Users\NataliaGorrin\Desktop\Proyectos_baobab\mango
Error: “TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType”
This error has been fixed in the current version. If it persists, make sure you’re using the latest version of the code.
Windows path issues
For Windows paths, use double quotes:
python -m mango_dashboard.file_explorer.cli.dashboard file_explorer --path "G:\Mi unidad\data"
Contributing
Fork the project
Create a feature branch (git checkout -b feature/AmazingFeature)
Commit your changes (git commit -m 'Add some AmazingFeature')
Push to the branch (git push origin feature/AmazingFeature)
Open a Pull Request
License
This project is under the MIT License. See the LICENSE file for more details.
Support
For questions, issues, or contributions, please contact:
Email: mango@baobabsoluciones.es
Create an issue on the repository
—
Made with ❤️ by baobab soluciones
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mango_dashboard-1.0.1a1.tar.gz.
File metadata
- Download URL: mango_dashboard-1.0.1a1.tar.gz
- Upload date:
- Size: 273.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d505ba75e62353ebfa59e2d57993ac96a030065083a9a9829aa6063fecc7b60e
|
|
| MD5 |
bf0ae615c24caa7bf7a9a1982d3cd91d
|
|
| BLAKE2b-256 |
97d83a07e82f98ac9e16df011dbd0d075c64205689440f25af6db747fdd5c076
|
File details
Details for the file mango_dashboard-1.0.1a1-py3-none-any.whl.
File metadata
- Download URL: mango_dashboard-1.0.1a1-py3-none-any.whl
- Upload date:
- Size: 173.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c44d18e1aa3d961eec1a36c23cf7b3c41e4e574f16fc3eb82ee2bcbdb54cf0f7
|
|
| MD5 |
73581ecd63703899e49a889b80e9082e
|
|
| BLAKE2b-256 |
e0488107e6fe8773313c2946523d95da5980986ec4c55f94e7d4c04b5270c0b8
|