Bandersnatch is a data science and machine learning project that allows you to work with monster data, create visualizations, and build a machine learning model. The project is structured as a series of sprints that build on each other, guiding you through database operations, data visualization, and machine learning model development.
/
: Splash Page/data
: Tabular Monster Data/view
: Dynamic Visualizations/model
: Interactive Machine Learning Model
Work through these sprints in order:
- Sprint 1: Database Operations - Set up MongoDB and create monster data
- Sprint 2: Dynamic Visualizations - Create interactive visualizations with Altair
- Sprint 3: Machine Learning Model - Build and integrate a machine learning model
- Fork this repository to your GitHub account
- Clone your forked repository locally:
git clone https://github.com/your-username/BandersnatchStarter.git
cd BandersnatchStarter
python -m venv venv
venv\Scripts\activate
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements.txt
python3 -m venv venv
source venv/bin/activate
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install -r requirements.txt
Alternatively, macOS/Linux users can use the provided install script:
source venv/bin/activate
./install.sh
python -m app.main
python3 -m app.main
Or use the provided run script:
./run.sh
The application will be available at http://127.0.0.1:5000/
- Create a free account on Render.com
- From your dashboard, click "New" and select "Web Service"
- Connect your GitHub repository or use the public GitHub URL
- Configure your web service:
- Name: Choose a name for your application
- Environment: Python
- Build Command:
pip install -r requirements.txt
- Start Command:
gunicorn app.main:APP
- Add environment variables:
- Add your MongoDB connection string as
DB_URL
- Add your MongoDB connection string as
- Click "Create Web Service"
Your application will be deployed and available at a URL provided by Render.
- Logic: Python3
- API Framework: Flask
- Templates: Jinja2
- Structure: HTML5
- Styling: CSS3
- Database: MongoDB
- Graphs: Altair
- Machine Learning: Scikit
- Hosting: Render.com
- Sign up for a MongoDB account: MongoDB
- Create a "Shared Cluster" (free tier)
- Add your IP address to the allowed locales list
- Copy the connection string into a
.env
file in your project root:DB_URL=mongodb+srv://<username>:<password>@<cluster>.<project_id>.mongodb.net
- Gunicorn is not Windows compatible, so don't use the
run.sh
script on Windows
- Use ElephantSQL instead of MongoDB
- Use Plotly instead of Altair
- Use PyTorch instead of Scikit
- Use FastAPI instead of Flask
- Add the ability for the user to reset & reseed the database
- Add the ability for the user to re-train the machine learning model
- Add the ability for the user to download a working serialized model and dataset
- Add authentication to sensitive pages
- Use a different set of features to train the model
- Use your own dataset entirely