UBC-MDS/programming-in-python-for-data-science
UBC-MDS/programming-in-python-for-data-science has 26 GitHub stars and 27 forks. Star changes are not measured yet. Last checked 2026-11-14 02:46 UTC. Last push 2026-08-21.
측정된 스타 증가
- in 24h
- 기록 수집 중
- in 7 days
- 기록 수집 중
- in 15 days
- 기록 수집 중
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
소개
This repository holds the Quarto source for Programming in Python for Data Science, a UBC Extended Learning's Key Capabilities in Data Science program course.
데이터README.md
OriginalProgramming in Python for Data Science
This repository holds the Quarto source for Programming in Python for Data Science, a UBC Extended Learning's Key Capabilities in Data Science program course.
The rendered course is published at https://ubc-mds.github.io/programming-in-python-for-data-science/.
The course teaches data analysis in Python, including:
- Processing tabular data with
pandas. - Visualizing processed data with
altair. - Working with numerical data using
numpy. - Iteration, flow control, function design, testing, and debugging skills.
It assumes no prior programming experience.
Every exercise runs in the browser through Quarto Live and Pyodide, so learners need nothing installed to take the course — the setup below is only for people editing the material.
Course Instructors
Former Course Instructors
Contributors
This course was built and is maintained by many people from UBC MDS program.
- Tomas Beuzen
- Hayley Boyce
- Mike Gelbart
- Tim Head
- Varada Kolhatkar
- Joel Ostblom
- Tiffany Timbers
- Elijah Willie
- Mengxin (Betty) Zhao
Attribution
- Material adapted from UBC's DSCI 511: Python Programming for Data Science by Tom Beuzen.
- The cereal dataset: 80 Cereals (c) by Chris Crawford, licensed under CC BY-SA 3.0.
Tips for Contributing
Issues and bug reports are always welcome — please open an issue.
For changes, branch off master and open a pull request. Every pull request automatically gets a preview deployment of the full site (see Deployment), so you can check how your change renders before it is merged. Because the material is course content, prose edits matter as much as code edits:
- Keep the conversational voice of the surrounding text
- Slide speaker notes come from the videos' scripts.
A previous version of the course material was developed using Ines Montani Spacy's teaching framework.
What this repository contains
The course is nine modules plus a bonus module and a closing section:
| Module | Topic |
|---|---|
| M0 | Welcome to Programming in Python for Data Science |
| M1 | Python & Pandas — An Unexpected Friendship |
| M2 | Not So Scary Wrangling (Table Manipulation and Chaining) |
| M3 | Tidy Data and Joining Dataframes |
| M4 | Python Without the "Eek" (Basic Python) |
| M5 | Making Choices and Repeating Iterations |
| M6 | Function Fundamentals and Best Practices |
| M7 | Importing Files and the Coding Style Guide |
| M8 | A Slice of NumPy and Advanced Data Wrangling |
| Bonus | Bonus module |
| — | Module closing remarks |
Each module directory holds the module's pages, and a slides/ subdirectory holding its reveal.js decks.
Repository layout
| Path | What it is |
|---|---|
_quarto.yml |
Project config: render list, resources, and the hand-maintained sidebar |
modules/ |
All course content — the only directory that is rendered |
data/ |
CSV/Excel datasets used by lessons and exercises |
src/utils.py |
Shared Python helpers: display settings, Altair theme, exercise checkers |
src/quiz.js |
The generateQuiz() multiple-choice widget |
static/ |
Images, logos, and other media |
styles.scss |
Site and slide theming |
_extensions/ |
Vendored Quarto Live extension |
docs/ |
Syllabus and the video screen-recording workflow |
In previous git commits (Up to commit c363d86fb411dbfc7e2dbcbd38cee62d7aac8984), you can find the folders chapters/, exercises/, and junk/. These are legacy content from the course's pre-Quarto platform. They are
not built and not maintained but can be used as a reference for the original exercise numbering.
How it works
_quarto.yml drives everything:
execute-dir: project— code cells resolve paths from the repository root, so a lesson readsdata/canucks.csv, never a path relative to its own.qmd.render:includes onlymodules/**/*.qmd. Anything outsidemodules/is not built.resources:copiesstyles.scss,src/utils.py, anddata/into the site unexecuted. A separate top-levelpyodide:block copies the same files into the browser's virtual filesystem so in-page code can read them.- The sidebar
contents:list is written by hand. A new page will not appear on the site until it is added there.
Pages come in three shapes:
- Video and slides —
format: html, a tabset holding a YouTube embed and an<iframe>pointing at the page's rendered reveal.js deck. - Quiz —
format: html, loadingsrc/quiz.jsand callinggenerateQuiz()once per question. - Live coding exercise —
format: live-html, using{pyodide}cells that execute in the learner's browser. A cell tagged#| exercise: <slug>holds the fill-in-the-blank starter; a second cell with the same slug and#| check: trueasserts against the learner'sresultand reports back through the helpers insrc/utils.py. Matching.hintand.solutionblocks are keyed by the same slug.
Running the site locally
System requirements
- Quarto 1.6 or newer (1.6.43 is what CI uses)
- Python 3.11 or 3.12
- The packages listed in
environment.yaml(pandas,altair,jupyter,openpyxl, and others)
Setup
git clone [email protected]:UBC-MDS/programming-in-python-for-data-science.git
cd programming-in-python-for-data-science
conda env create -f environment.yaml
conda activate kcds-prog
The environment is named kcds-prog and pins Quarto itself, so activating it gives you a matching Quarto.
Build
quarto preview # local server with live reload — the usual way to work
quarto render # full static build into _site/
To rebuild a single page instead of the whole site:
quarto render modules/module1/module1-01-introduction_to_dataframes.qmd
A full quarto render executes every reveal.js deck through Jupyter and takes a while, so prefer quarto preview or a single-file render while editing.
Troubleshooting
Rendering any page starts a local Jupyter kernel — including live-html pages, whose {pyodide} cells run in the browser rather than locally. No .qmd pins a kernel with a jupyter: key, so Quarto
picks the first Python kernelspec it finds. If a stale kernelspec on your machine points at an interpreter that no longer exists, the render fails with a FileNotFoundError naming a path that has nothing to do with this repository. Check with:
jupyter kernelspec list
and remove or repair any entry pointing at a deleted environment.
_site/ and .quarto/ are build output. Neither belongs in a commit.
Deployment
| Workflow | Trigger | Result |
|---|---|---|
.github/workflows/publish.yaml |
Push to master |
Renders the site and pushes _site/ to the gh-pages branch |
.github/workflows/pr-preview.yaml |
Pull request against master |
Builds and deploys a preview, removed when the PR closes |
Both build the environment from environment.yaml with micromamba and run quarto render, so a change that renders cleanly for you locally will render in CI.
License
This repository carries two licenses, split between the instructional material and the software that frames it:
- Instructional material — the course content — is licensed CC BY-NC-SA 4.0.
- Software — the framework used to build and host the material — is licensed under the MIT License.
See LICENSE.md for the full text of both.
관련 프로젝트 살펴보기
Asabeneh/30-Days-Of-Python
30 Days of Python 프로그래밍 챌린지는 Python 프로그래밍 언어를 30일 동안 배우기 위한 단계별 가이드입니다. 이 챌린지는 100일 이상 걸릴 수 있습니다. 자신의 속도에 맞춰 진행하세요. 다음 동영상도 도움이 될 수 있습니다: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
78,711 스타grafana/grafana
개방적이고 조합 가능한 옵저버빌리티 및 데이터 시각화 플랫폼입니다. Prometheus, Loki, Elasticsearch, InfluxDB, Postgres 등 여러 소스의 메트릭, 로그, 트레이스를 시각화합니다.
77,894 스타redis/redis
실시간 데이터 기반 애플리케이션을 구축하는 개발자에게 Redis는 가장 선호되고, 가장 빠르며, 기능이 가장 풍부한 캐시, 데이터 구조 서버이자 문서 및 벡터 쿼리 엔진입니다.
77,490 스타apache/superset
Apache Superset는 데이터 시각화 및 데이터 탐색 플랫폼입니다.
75,522 스타