This project was made as an exercise on deployment of Data science applications. You can download the data for the project at https://www.kaggle.com/datasets/surajbhandari527/ecommerce-churn-data-for-churn-prediction-models?resource=download.
You also can find the working application showing how the model works at https://client-churning-predictor.onrender.com/.
Or alternatively you can use our second application made using streamlit at https://client-churning-predictor-trkxdunqjtmcsktfjtagby.streamlit.app/
No manual setup is required, as Codespaces is automatically configured with the predefined files created by the academy for you. Just follow these steps:
- Wait for the environment to configure automatically.
- All necessary packages and the database will install themselves.
- The automatically created
usernameanddb_nameare in the.envfile at the root of the project.
- Once Codespaces is ready, you can start working immediately.
Make sure you have Python 3.11+ installed on your machine. You will also need pip to install the Python packages.
Clone the project repository to your local machine.
Navigate to the project directory and install the required Python packages:
pip install -r requirements-dev.txtCreate a .env file in the root directory of the project to store your environment variables, such as your database connection string:
FLASK_ENV="postgresql://<USER>:<PASSWORD>@<HOST>:<PORT>/<DB_NAME>"
#example
DATABASE_URL="postgresql://my_user:my_password@localhost:5432/my_database"To run the application, execute th app.py script from wherever you want:
python src/app.pyYou can place your raw datasets in the data/raw directory, intermediate datasets in data/interim, and processed datasets ready for analysis in data/processed.
To process data, you can modify the app.py script to include your data processing steps, using pandas for data manipulation and analysis.
You shouldn't worry too much about manipulating data though since this project implements a pipeline for data pre-processing.
This project structure was inspired by a template that was built as part of the Data Science and Machine Learning Bootcamp by 4Geeks Academy by Alejandro Sanchez and many other contributors. Learn more about 4Geeks Academy BootCamp programs here.
Other templates and resources like this can be found on the school's GitHub page.