A nonprofit analytics system designed to collect, optimize, and evaluate program-level data to generate measurable impact insights.
Many nonprofit organizations struggle with unstructured data, redundant storage, and unclear performance evaluation metrics. The Social Impact Tracker addresses these challenges by providing a structured platform to input program data and automatically compute meaningful impact metrics. The system features built-in data compression techniques, automated analytics, and an interactive dashboard for real-time insights.
This lightweight, scalable solution is specifically designed for small to medium-sized nonprofits seeking to make data-driven decisions and clearly demonstrate their social impact.
Comprehensive program record management with structured data entry:
- Program Name - Unique identifier for each initiative
- Time Period - Duration or timeframe of program operation
- Number of Beneficiaries - People served by the program
- Cost Incurred - Operational expenses
- Pre-Outcome Score - Baseline metrics before program intervention
- Post-Outcome Score - Results after program completion
All data is stored in a relational database with full CRUD operations.
Optimized data storage to reduce redundancy and improve efficiency:
- Dictionary Encoding - Compresses repeated program identifiers
- Delta Encoding - Efficiently stores time-series beneficiary growth data
- Automated Compression - Applied transparently during data storage
- Reduced Storage Footprint - Minimizes database size without loss of information
Automatic computation of key performance indicators:
| Metric | Formula | Purpose |
|---|---|---|
| Outcome Improvement | Post-Outcome – Pre-Outcome | Measures program effectiveness |
| Cost per Beneficiary | Cost / Beneficiaries | Evaluates resource efficiency |
| Growth Rate | (Current – Previous) / Previous | Tracks program expansion |
| Composite Impact Score | Weighted formula combining all metrics | Overall program ranking |
All metrics are calculated automatically upon data entry and updated in real-time.
Professional data visualization for quick insights:
-
Summary Statistics
- Total number of programs
- Total beneficiaries served
- Average impact score across all programs
-
Trend Visualizations
- Line chart showing beneficiary growth over time
- Bar chart comparing cost vs. outcome improvement
- Program ranking table sorted by impact score
-
Real-Time Updates - Dashboard refreshes automatically with new data
RESTful API architecture for flexible integration:
POST /programs- Submit new program dataGET /programs- Retrieve all programsGET /programs/{id}- Get specific program detailsGET /metrics/{id}- Calculate metrics for a programGET /analytics- Retrieve aggregated analytics
Clean separation between frontend and backend enables future integrations.
Robust validation ensures data integrity:
- Prevents negative or zero values for beneficiaries and costs
- Validates outcome score consistency (post-outcome ≥ pre-outcome when expected)
- Enforces required field completion
- Provides clear error messages for invalid inputs
- Maintains referential integrity in the database
| Component | Technology | Purpose |
|---|---|---|
| Backend Framework | FastAPI | High-performance REST API |
| Frontend/Dashboard | Streamlit | Interactive web interface |
| Database | SQLite | Lightweight relational storage |
| Data Processing | Pandas, NumPy | Analytics and metrics computation |
| Visualization | Matplotlib/Plotly | Charts and graphs via Streamlit |
| Compression | Custom Python | Dictionary and delta encoding |
| Language | Python 3.9+ | Core development language |
The system follows a modular, layered architecture:
┌─────────────────────────────────────────┐
│ Streamlit Frontend (Dashboard) │
│ - User Interface │
│ - Data Visualization │
│ - Interactive Charts │
└─────────────────┬───────────────────────┘
│
│ REST API Calls
│
┌─────────────────▼───────────────────────┐
│ FastAPI Backend │
│ - API Endpoints │
│ - Business Logic │
│ - Data Validation │
└─────────────────┬───────────────────────┘
│
│
┌─────────────────▼───────────────────────┐
│ Compression & Analytics Engine │
│ - Dictionary Encoding │
│ - Delta Encoding │
│ - Metrics Calculation │
└─────────────────┬───────────────────────┘
│
│
┌─────────────────▼───────────────────────┐
│ SQLite Database │
│ - Program Records │
│ - Compressed Data │
│ - Computed Metrics │
└─────────────────────────────────────────┘
- Separation of Concerns - Clear boundaries between UI, logic, and data layers
- Modularity - Each component can be developed and tested independently
- Scalability - Architecture supports future expansion and feature additions
- Maintainability - Clean code structure with well-defined interfaces
- Python 3.9 or higher
- pip (Python package manager)
- 50MB free disk space
-
Clone the repository
git clone <repository-url> cd Social_Impact_Tracker
-
Create a virtual environment
python -m venv venv
-
Activate the virtual environment
- Windows:
venv\Scripts\activate
- macOS/Linux:
source venv/bin/activate
- Windows:
-
Install dependencies
pip install -r requirements.txt
uvicorn backend.main:app --reloadThe API will be available at http://localhost:8000
API documentation (Swagger UI): http://localhost:8000/docs
In a separate terminal:
streamlit run frontend/dashboard.pyThe dashboard will open automatically in your browser at http://localhost:8501
- Navigate to the dashboard
- Fill in the program entry form:
- Enter program name
- Select time period
- Input number of beneficiaries
- Enter total program cost
- Provide pre and post-outcome scores
- Click "Submit Program"
- View automatically calculated metrics
- Summary Cards display quick statistics at the top
- Growth Trends show beneficiary expansion over time
- Cost Analysis compares spending to outcome improvements
- Program Rankings identify top-performing initiatives
- Outcome Improvement - Higher is better; shows program effectiveness
- Cost per Beneficiary - Lower is better; indicates efficiency
- Growth Rate - Positive values show expansion
- Composite Impact Score - Normalized score for comparing programs
Social_Impact_Tracker/
├── backend/
│ ├── main.py # FastAPI application
│ ├── models.py # Data models
│ ├── database.py # Database connection
│ ├── compression.py # Compression algorithms
│ └── analytics.py # Metrics calculation
├── frontend/
│ ├── dashboard.py # Streamlit dashboard
│ └── utils.py # Helper functions
├── tests/
│ ├── test_api.py # API tests
│ ├── test_compression.py # Compression tests
│ └── test_analytics.py # Analytics tests
├── requirements.txt # Python dependencies
├── .gitignore # Git ignore rules
└── README.md # This file
Database and application settings can be configured in backend/config.py:
- Database path
- API host and port
- Compression thresholds
- Metric calculation weights
Run the test suite:
pytest tests/Run with coverage:
pytest --cov=backend --cov=frontend tests/Contributions are welcome! Please follow these steps:
- Fork the repository
- 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
This project is licensed under the MIT License - see the LICENSE file for details.
- Built to support nonprofit organizations in their mission to create positive social change
- Designed with input from nonprofit program managers and data analysts
- Inspired by the need for accessible, actionable impact measurement tools
For questions, issues, or feature requests:
- Open an issue on GitHub
- Contact the development team
- Review documentation at
http://localhost:8000/docswhen running the API
Future enhancements under consideration:
- Multi-user authentication and role-based access
- Export reports to PDF and Excel
- Advanced compression algorithms
- Machine learning for predictive impact analysis
- Integration with external nonprofit databases
- Mobile-responsive dashboard
- Multi-language support
Made to empower nonprofits through data-driven insights