An end-to-end data platform that ingests, processes, and analyzes synthetic higher education data, complete with AI-powered insights and automated reporting.
# 1. Clone the repository
git clone https://github.com/jromer242/Campus_Data.git
cd Campus_Data
# 2. Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# 3. Install the package in development mode
pip install -e .
# 4. Start the API server
uvicorn src.api.campus_api:app --reloadThen visit http://localhost:8000/docs for interactive API documentation.
- Python 3.8 or higher
- SQLite (included with Python)
- pip (Python package installer)
- Git
git clone https://github.com/jromer242/Campus_Data.git
cd Campus_DataOn macOS/Linux:
python3 -m venv .venv
source .venv/bin/activateOn Windows:
python -m venv .venv
.venv\Scripts\activateOption A - Install with setup.py (Recommended):
pip install -e .Option B - Install with requirements.txt:
pip install -r requirements.txtOption C - Install development dependencies:
pip install -e ".[dev]"python -c "from src.database import Student, Course, Enrollment; print('β
Installation successful!')"uvicorn src.api.campus_api:app --reloadAlternative methods:
# Using Python module syntax
python -m uvicorn src.api.campus_api:app --reload
# Custom port
uvicorn src.api.campus_api:app --reload --port 8080
# Allow external access
uvicorn src.api.campus_api:app --reload --host 0.0.0.0The server will start at http://localhost:8000
- Interactive API Documentation (Swagger UI): http://localhost:8000/docs
- Alternative API Documentation (ReDoc): http://localhost:8000/redoc
- API Root: http://localhost:8000
- Health Check: http://localhost:8000/health
In a new terminal window (keep the API running):
cd Campus_Data
source .venv/bin/activate # Activate venv
python dashboard.pyCampus_Data/
βββ src/
β βββ api/
β β βββ __init__.py
β β βββ campus_api.py # Main FastAPI application
β βββ database/
β β βββ __init__.py # Database models (Student, Course, Enrollment)
β β βββ connection.py # Database connection and session management
β βββ ml/
β β βββ __init__.py
β β βββ student_predictor.py # ML prediction models
β βββ data_generation/
βββ models/ # Trained ML models
βββ notebooks/ # Jupyter notebooks
βββ tests/ # Unit tests
βββ campus_data.db # SQLite database
βββ dashboard.py # Dashboard application
βββ setup.py # Package setup configuration
βββ requirements.txt # Python dependencies
βββ README.md # This file
GET /- API root with basic informationGET /health- Health check and system status
GET /students- List all students (with pagination and filters)GET /students/{student_id}- Get specific studentPOST /students- Create new studentGET /students/{student_id}/enrollments- Get student enrollments
GET /courses- List all coursesGET /courses/{course_id}- Get specific course
GET /enrollments- List all enrollments
POST /predict- Predict student success with custom dataGET /predict/student/{student_id}- Predict success for existing student
GET /stats/overview- Get overview statistics
For complete API documentation with examples, visit http://localhost:8000/docs after starting the server.
Visit http://localhost:8000/docs and use the "Try it out" button on any endpoint.
# Health check
curl http://localhost:8000/health
# Get students
curl http://localhost:8000/students?limit=5
# Get specific student
curl http://localhost:8000/students/S12345
# Predict success
curl -X POST http://localhost:8000/predict \
-H "Content-Type: application/json" \
-d '{
"gpa": 3.5,
"year_level": 2,
"total_enrollments": 10,
"completed_courses": 8,
"dropped_courses": 1,
"completion_rate": 80.0
}'import requests
# Get health status
response = requests.get("http://localhost:8000/health")
print(response.json())
# Get students
response = requests.get("http://localhost:8000/students?limit=5")
students = response.json()
print(f"Found {len(students)} students")python api_tester.py- RESTful API with FastAPI
- SQLite Database with SQLAlchemy ORM
- Student Management - CRUD operations for students, courses, and enrollments
- ML Predictions - Student success prediction with risk assessment
- Data Analytics - Statistical overview and insights
- Interactive Documentation - Auto-generated API docs with Swagger UI
- CORS Support - Ready for frontend integration
- Type Validation - Pydantic models for request/response validation
Make sure src/database/connection.py has the DatabaseSession class. If missing, check the installation.
# Use a different port
uvicorn src.api.campus_api:app --reload --port 8080The SQLite database should be created automatically. If issues persist:
python -c "from src.database.connection import init_database; init_database()"# Reinstall in development mode
pip install -e .pytest tests/black src/mypy src/Edit src/database/connection.py to change the database:
# For PostgreSQL
DATABASE_URL = "postgresql://user:password@localhost/dbname"
# For MySQL
DATABASE_URL = "mysql+pymysql://user:password@localhost/dbname"Modify settings in src/api/campus_api.py:
app = FastAPI(
title="Campus Data API",
version="1.0.0",
# Add your custom settings
)- 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.
Your Name
- GitHub: @jromer242
- Email: jylesromer@gmail.com
- FastAPI for the excellent web framework
- SQLAlchemy for database ORM
- All contributors and supporters
If you have any questions or run into issues:
- Check the API Documentation (after starting the server)
- Review the Troubleshooting section
- Open an Issue
- Contact the maintainer
