Cultural Data Analysis · Python Bootcamp
Ten steps through the tools we use all year, in the order of today's slides. By the end you will have a working Google Colab notebook connected to your Google Drive, a dataset downloaded with the terminal, and a first go at checking the work of an AI agent.
Each step says where to work (a code cell, a text cell, the terminal or a menu), what to do, and what you should see. Short commands you type yourself: that is how you learn them. Longer code you copy and run: you are not expected to understand every line of it yet. Each step says which. If what you see is different, that is worth a question.
Colab is all you need for this course. If you also want to work on your own laptop, the easiest route is uv: it is free, brings its own Python (you don't need to install Python first), and the commands are the same on Mac and Windows. The install is several gigabytes because of the language and image models, so give it some time.
1. Install uv, once. On a Mac, in the Terminal:
curl -LsSf https://astral.sh/uv/install.sh | sh
On Windows, in PowerShell:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Close the Terminal or PowerShell window afterwards and open a new one, so that it finds uv.
2. Make a folder for the course, open the Terminal (or PowerShell) in it, and set it up:
uv venv --python 3.12 uv pip install -r https://raw.githubusercontent.com/goto4711/cdai/refs/heads/main/requirements.txt git+https://github.com/Kaggle/learntools.git
3. Start Jupyter, now and every time you come back to the folder:
uv run jupyter notebook
Two libraries also need a separate program: Week 5's text recognition needs
Tesseract, and Week 3's tree drawings need
Graphviz. On a Mac: brew install tesseract graphviz.
The list of libraries is in the course repository: requirements.txt.
Questions: cdai-fgw@uva.nl · Next: Week 1, Python