A financial data processing pipeline and dashboard system.
- API-Based Data Submission: Upload CSV files via API endpoint
- Smart Data Processing: Automatic processing based on data type
- Interactive Dashboard: Visualize and explore processed data
- Type-Specific Visualizations: Different visualizations for financial, market, and forecast data
- Python 3.9+
- Virtual environment (recommended)
-
Clone the repository
-
Create and activate a virtual environment:
python -m venv venv # On Windows .\venv\Scripts\activate # On Linux/Mac source venv/bin/activate -
Choose one of these installation methods:
Option 1: Install using requirements.txt (Recommended for Development)
pip install -r requirements.txtOption 2: Install as a package
pip install -e .This will install the project as an editable package with command-line tools:
flsd-run: Run both API and dashboardflsd-api: Run only the API serverflsd-dashboard: Run only the dashboardflsd-pipeline: Run the nightly update pipeline
Run both the API server and dashboard:
python -m src.run_services
This will start:
- FastAPI server on http://localhost:8000
- Streamlit dashboard on http://localhost:8501
Files should follow this naming pattern:
{type}_{description}_{date}.csv
Where:
type: Determines processing pipeline (financial, market, forecast)description: Brief data descriptiondate: Date in YYYYMMDD format
Examples:
financial_quarterly_20231231.csvmarket_stocks_20240415.csvforecast_revenue_20240630.csv
Upload a file:
curl -X POST -F "file=@your_file.csv" http://localhost:8000/upload/
Or use the Swagger UI at http://localhost:8000/docs
- Required columns:
date,amount - Optional columns: any additional financial metrics
- Required columns:
date,price - Optional OHLC data:
open,high,low,close
- Required columns:
date,prediction - Should include both historical and future dates
The dashboard automatically visualizes the latest data with type-specific visualizations:
- Financial: Line charts for amounts and running totals
- Market: Price charts, percent change analysis, and OHLC if available
- Forecast: Combined historical and forecast visualizations
For details on downloading nightly processed data and sharing the dashboard publicly, see docs/streamlit_deploy.md.
flsd/
├── data/
│ ├── raw/ # Raw uploaded CSV files
│ └── processed/ # Processed data files
├── scripts/
│ └── nightly_update.py # Script for running nightly updates
├── src/
│ ├── utils/ # Utility functions
│ ├── api.py # FastAPI server
│ ├── dashboard.py # Streamlit dashboard
│ ├── pipeline.py # Data processing logic
│ └── run_services.py # Run both API and dashboard
├── requirements.txt
├── setup.py # Package installation configuration
└── README.md
The project can be installed as a package, which provides command-line tools for easier usage. To install it in development mode:
pip install -e .
This will make the following commands available:
flsd-run: Run both API and dashboardflsd-api: Run only the API serverflsd-dashboard: Run only the dashboardflsd-pipeline: Run the nightly update pipeline
- Fork the repository
- Create your feature branch
- Submit a pull request
This project is licensed under the MIT License.