The activities assume that you have forked the COMP0035 tutorials repository, cloned it to your computer, and set up a project with a virtual environment within your IDE (VS Code or PyCharm).
Login to GitHub and navigate to your forked copy of the COMP0035 tutorials repository.
Check whether any changes have been made. For example, the image below shows 1 new commit has been made to the original.
If changes have been made, you will need to update your forked repository.
Click on the "Synch fork" button; and then on "Update branch".
Now, open your IDE (VS Code, PyCharm) and update the local copy of the repository. This assumes you have integrated your IDE with your GitHub account in week 1. You may be prompted to log in to GitHub before you can carry out the following.
- In PyCharm try menu option Git > Pull
- In VS Code click on the source code control icon on the left side panel, then when the source code control pane opens, click on the three dots and select Pull.
There are other methods, look in the Help for either PyCharm or VSCode.
Open a terminal window within your IDE in the project directory.
Check that your virtual environment is activated. There are various ways to do this, IDEs vary, usually a quick visual
way is to check whether the prompt starts with (.venv)
or the name if your venv folder if not .venv
. You can also
use Python in the Terminal:
import os
print(os.environ.get('VIRTUAL_ENV'))
The following screenshot shows this in PyCharm on macOS:
If you are not in a venv, refer to Week 1 activity 7 for instructions.
If you are using PyCharm Professional version (free with student id) you do not need to install anything further to enable it to work with databases.
If you are using VS Code, you will need to add the following extensions to work with SQLite files:
Use the version of the data files in the data_db_activity
directory for these activities.
Tutorial activities can be found in the activities/week5 folder. These are:
- Introduction: Using Python sqlite3 and pandas to create SQLite databases
- Create an un_normalised database from a pandas dataframe
- Create the structure for a normalised database using SQL, sqlite3 and pandas dataframe
- Introduction to SQL SELECT for finding values from a table
- Introduction to SQL INSERT for adding values to a table
- Add data to the normalised database
- Apply the knowledge to create the paralympics database
- Define and create the structure for the database
- Add data to the database from your prepared data set
Do some extra research. There are many tutorials publicly available that focus on data preparation and exploration with pandas. Try to find examples that do more that has been covered in this tutorial to expand your knowledge.