Welcome,
This is the Code Institute student template for the Data Analytics capstone project. We have preinstalled all of the tools you need to get started. It's perfectly okay to use this template as the basis for your project submissions. Click the Use this template
button above to get started.
You can safely delete the Template Instructions section of this README.md file and modify the remaining paragraphs for your own project. Please do read the Template Instructions at least once, though! It contains some important information about the IDE and the extensions we use.
-
Use this template to create your GitHub project repo. Click the Use this template button, then click Create a new repository.
-
Copy the URL of your repository to your clipboard.
-
In VS Code, select File -> Open Folder.
-
Select your
vscode-projects
folder, then click the Select Folder button on Windows, or the Open button on Mac. -
From the top menu in VS Code, select Terminal > New Terminal to open the terminal.
-
In the terminal, type
git clone
followed by the URL of your GitHub repository. Then hit Enter. This command will download all the files in your GitHub repository into your vscode-projects folder. -
In VS Code, select File > Open Folder again.
-
This time, navigate to and select the folder for the project you just downloaded. Then, click Select Folder.
-
A virtual environment is necessary when working with Python projects to ensure each project's dependencies are kept separate from each other. You need to create your virtual environment, also called a venv, and then ensure that it is activated any time you return to your workspace. Click the gear icon in the lower left-hand corner of the screen to open the Manage menu and select Command Palette to open the VS Code command palette.
-
In the command palette, type: create environment and select Python: Create Environment…
-
Choose Venv from the dropdown list.
-
Choose the Python version you installed earlier. Currently, we recommend Python 3.12.8
-
DO NOT click the box next to
requirements.txt
, as you need to do more steps before you can install your dependencies. Click OK. -
You will see a
.venv
folder appear in the file explorer pane to show that the virtual environment has been created. -
Important: Note that the
.venv
folder is in the.gitignore
file so that Git won't track it. -
Return to the terminal by clicking on the TERMINAL tab, or click on the Terminal menu and choose New Terminal if no terminal is currently open.
-
In the terminal, use the command below to install your dependencies. This may take several minutes.
pip3 install -r requirements.txt
-
Open the
jupyter_notebooks
directory, and click on the notebook you want to open. -
Click the kernel button and choose Python Environments.
Note that the kernel says Python 3.12.8
as it inherits from the venv, so it will be Python-3.12.8 if that is what is installed on your PC. To confirm this, you can use the command below in a notebook code cell.
! python --version
- Set the
.python-version
Python version to a Heroku-22 stack currently supported version that closest matches what you used in this project. - The project can be deployed to Heroku using the following steps.
- Log in to Heroku and create an App
- At the Deploy tab, select GitHub as the deployment method.
- Select your repository name and click Search. Once it is found, click Connect.
- Select the branch you want to deploy, then click Deploy Branch.
- The deployment process should happen smoothly if all deployment files are fully functional. Click the button Open App at the top of the page to access your App.
- If the slug size is too large, then add large files not required for the app to the
.slugignore
file.