These materials are used in NC State University Libraries' Data Science Services workshops covering practical data skills (Python, R, visualization, and analysis).
- Click a workshop badge above to open in Colab.
- Run the install cell when prompted (section below).
- Runtime → Restart runtime.
- Runtime → Run all. ✅
- 🧱 Basic Syntax and Operators — variables, types, lists, dicts, and more.
- 🔁 Control Flow and Functions — conditionals, loops, functions, and scope.
This folder contains Python/Jupyter equivalents of the R workshop notebooks. You can run them directly in Google Colab without installing anything locally.
- Click a badge above to open directly in Colab.
- Prefer to run locally? See the LOCAL.md guide.
Alternatively, in Colab: File → Open Notebook → GitHub tab → paste the repo URL https://github.com/NCSU-Libraries/intro-to-prog-py
and select the notebooks in the repository root.
Run the following cell at the top of each notebook to install exact dependencies compatible with Colab.
!pip -q install -r https://raw.githubusercontent.com/NCSU-Libraries/intro-to-prog-py/main/requirements.txt
Notes:
- Colab already includes many scientific packages; installing ensures versions match the notebooks.
- If you fork, adjust the URL above to point to your fork/branch.
If you want to persist outputs or datasets:
from google.colab import drive
drive.mount('/content/drive')
# e.g., save under /content/drive/MyDrive/intro-to-prog-r/
# e.g., save under /content/drive/MyDrive/intro-to-prog-py/
After installs finish:
- Runtime → Restart runtime (recommended) so freshly installed packages are active.
- Runtime → Run all.
- If a package fails to install, re-run the install cell; transient network issues are common.
- For large installs, ensure you restarted the runtime before executing the rest of the notebook.
- If you see import errors, verify the
requirements.txt
URL matches the branch you want.