Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aditya1404sal/chartcraft
https://github.com/aditya1404sal/chartcraft
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/aditya1404sal/chartcraft
- Owner: Aditya1404Sal
- Created: 2024-08-31T18:47:49.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-11-16T18:03:24.000Z (about 2 months ago)
- Last Synced: 2024-11-16T19:17:52.778Z (about 2 months ago)
- Language: JavaScript
- Size: 10.1 MB
- Stars: 0
- Watchers: 1
- Forks: 3
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ChartCraft
ChartCraft is a Python-based web application that allows users to upload CSV/Excel files, process the data, and dynamically generate different types of charts (Pie, Bar, Line) to visualize the data. It uses [matplotlib] for chart rendering and provides a simple API for file upload and chart generation.
## Tech Stack
- **Backend**: Python
- [Flask] server for HTTP handling
- [matplotlib] for chart generation
- [Pandas] for data processing
- CSV/Excel file parsing support
- **Frontend**: [Next.js] application## Features
- **CSV/Excel File Upload**: Allows users to upload CSV/Excel files through a web interface
- **Dynamic Chart Generation**: Supports Pie, Bar, and Line charts based on user selection
- **Column Selection**: Users can select specific columns from the uploaded file to visualize
- **Data Processing**: Automatic handling of numeric and categorical data
- **CORS Support**: Enables [cross-origin resource sharing] for API endpoints## Setup and Installation
1. **Clone the repository**:
```bash
git clone [https://github.com/yourusername/ChartCraft.git](https://github.com/yourusername/ChartCraft.git)
cd ChartCraft
```2. **Install Python dependencies**:
```bash
pip install -r requirements.txt
```3. **Run the Flask application**:
```bash
python3 -m backend.backend
```4. **Access the application**:
The server will start on [http://localhost:8080](http://localhost:8080). You can now use the API endpoints to interact with the application.## API Endpoints
1. **File Upload**
- URL: `/api/upload`
- Method: POST
- Content-Type: multipart/form-data
- Body: CSV/Excel file (key: "file")
- Response: JSON containing headers of the file2. **Chart Generation**
- URL: `/api/chart`
- Method: POST
- Content-Type: application/json
- Body:
```json
{
"ChartType": "pie",
"Column": 1,
"FileData": [["Name", "Math", "Science"], ["Alice", "85", "92"], ["Bob", "78", "75"]]
}
```## Code Structure
- `backend/backend.py`: Main Flask application with route handlers
- `backend/plotter.py`: Chart generation using [matplotlib]
- `backend/normalizer.py`: Data normalization utilities## Future Improvements
- Add authentication and authorization for API endpoints
- Implement data caching to improve performance for large datasets
- Add more chart types and customization options
- Implement error logging and monitoringHappy charting!