Welcome,
This is the Code Institute student template for the three Data Analytics capstone projects. 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.
If you are working on the first capstone project, you can also delete .python-version, .slugignore, Procfile and setup.sh as they are only required for later dashboard projects.
-
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-projectsfolder, 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 a new terminal.
-
In the terminal, type
git clonefollowed 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. You need to create your virtual environment, also called a venv, and then activate it whenever 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; you need to complete additional steps before installing your dependencies. Click OK. -
You will see a
.venvfolder appear in the file explorer pane, indicating that the virtual environment has been created. -
Important: Note that the
.venvfolder is in the.gitignorefile 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_notebooksdirectory, and click on the notebook you want to open. -
Click the Kernel button, then 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- The
.python-version,.slugignore,Procfileandsetup.shfiles are necessary only if you are deploying a Streamlit app to Heroku as part of your submission for units 2 and 3. - Set the
.python-versionPython version to a Heroku-22 stack, currently supported version that most closely 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
.slugignorefile.
