Skip to content

Commit fe464ce

Browse files
committed
update: refresh exploratory data analysis workshop materials (#1)
* Restructure: config + workshops, add EDA deck * Add Polars EDA notebooks and data Introduce the exploratory data analysis workshop notebooks with Polars and add the penguins dataset, plus README links for the new materials. * add: improved eda workshop material * update: refresh exploratory data analysis workshop materials Align the EDA workshop slides and canonical notebooks around the Polars-first flow, add concise intro concept slides, and remove old improved notebook variants while keeping speaker notes out of this commit.
1 parent 967c9ac commit fe464ce

21 files changed

Lines changed: 3777 additions & 65 deletions

.github/workflows/deploy-page.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ on:
44
push:
55
branches: [main]
66
paths:
7-
- "slides/**"
8-
- "fundamentals/**"
9-
- "loops-and-functions/**"
7+
- "config/**"
8+
- "workshops/**"
109
- "assets/**"
11-
- "_quarto.yml"
1210
workflow_dispatch:
1311

1412
permissions:
@@ -35,7 +33,7 @@ jobs:
3533
path: |
3634
.quarto-cache
3735
~/.cache/quarto
38-
key: ${{ runner.os }}-quarto-${{ hashFiles('_quarto.yml', 'slides/index.qmd', 'fundamentals/index.qmd', 'loops-and-functions/index.qmd', 'slides/theme/**') }}
36+
key: ${{ runner.os }}-quarto-${{ hashFiles('config/_quarto.yml', 'config/slides/index.qmd', 'workshops/fundamentals/index.qmd', 'workshops/loops-and-functions/index.qmd', 'workshops/exploratory-data-analysis/index.qmd', 'config/slides/theme/**') }}
3937
restore-keys: |
4038
${{ runner.os }}-quarto-
4139
@@ -46,21 +44,27 @@ jobs:
4644

4745
- name: Render slides
4846
run: |
47+
cd config
4948
quarto render slides/index.qmd
50-
quarto render fundamentals/index.qmd --to revealjs
51-
quarto render loops-and-functions/index.qmd --to revealjs
49+
quarto render ../workshops/fundamentals/index.qmd --to revealjs
50+
quarto render ../workshops/loops-and-functions/index.qmd --to revealjs
51+
quarto render ../workshops/exploratory-data-analysis/index.qmd --to revealjs
5252
5353
- name: Assemble Pages site
5454
run: |
5555
rm -rf site
5656
mkdir -p site
57-
cp slides/index.html site/index.html
58-
rsync -av slides/index_files/ site/index_files/
57+
cp config/slides/index.html site/index.html
58+
rsync -av config/slides/index_files/ site/index_files/ 2>/dev/null || true
5959
rsync -av assets/ site/assets/
60-
rsync -av fundamentals/ site/fundamentals/ --exclude "*.ipynb" --exclude "*.qmd"
61-
rsync -av loops-and-functions/ site/loops-and-functions/ --exclude "*.ipynb" --exclude "*.qmd"
62-
# Landing page is at site root; fix logo path so it loads (../assets/ -> assets/)
63-
sed -i.bak 's|../assets/|assets/|g' site/index.html && rm -f site/index.html.bak
60+
rsync -av workshops/fundamentals/ site/fundamentals/ --exclude "*.ipynb" --exclude "*.qmd"
61+
rsync -av workshops/loops-and-functions/ site/loops-and-functions/ --exclude "*.ipynb" --exclude "*.qmd"
62+
rsync -av workshops/exploratory-data-analysis/ site/exploratory-data-analysis/ --exclude "*.ipynb" --exclude "*.qmd"
63+
# Landing page: fix logo path (../../assets/ -> assets/)
64+
sed -i.bak 's|../../assets/|assets/|g' site/index.html && rm -f site/index.html.bak
65+
# Workshop pages: fix asset paths (../../assets/ -> ../assets/) so they load from site/fundamentals/ etc.
66+
sed -i.bak 's|../../assets/|../assets/|g' site/fundamentals/index.html site/loops-and-functions/index.html site/exploratory-data-analysis/index.html 2>/dev/null || true
67+
rm -f site/fundamentals/index.html.bak site/loops-and-functions/index.html.bak site/exploratory-data-analysis/index.html.bak 2>/dev/null || true
6468
6569
- name: Upload Pages artifact (site root)
6670
uses: actions/upload-pages-artifact@v3

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ COPY . .
2323
EXPOSE 4000
2424

2525
# Default command: run preview for the deck
26-
CMD ["bash", "-lc", "quarto preview slides/index.qmd --host 0.0.0.0 --port 4000 --no-browser"]
26+
CMD ["bash", "-lc", "cd config && quarto preview slides/index.qmd --host 0.0.0.0 --port 4000 --no-browser"]

LOCAL.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
1. Create and activate the environment:
1212
```bash
13-
micromamba create -y -f environment.yml
13+
micromamba create -y -f config/environment.yml
1414
micromamba activate intro-to-prog-py
1515
```
1616

@@ -23,8 +23,8 @@ jupyter lab
2323

2424
3. Execute notebooks headlessly (optional):
2525
```bash
26-
python -m nbconvert --to notebook --execute fundamentals/fundamentals.ipynb --output executed_basic.ipynb
27-
python -m nbconvert --to notebook --execute loops-and-functions/loops-and-functions.ipynb --output executed_control.ipynb
26+
python -m nbconvert --to notebook --execute workshops/fundamentals/fundamentals.ipynb --output executed_basic.ipynb
27+
python -m nbconvert --to notebook --execute workshops/loops-and-functions/loops-and-functions.ipynb --output executed_control.ipynb
2828
```
2929

3030
## Python .venv alternative
@@ -47,5 +47,5 @@ jupyter notebook
4747

4848
## Notes
4949
- Python 3.10–3.12 is supported.
50-
- If you add packages, update both `environment.yml` and `requirements.txt`.
50+
- If you add packages, update both `config/environment.yml` and `requirements.txt`.
5151
- The notebooks include small plots, data structures, control flow, and file I/O examples.

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515

1616
## Getting Started with Python
1717

18-
### Fundamentals <a href="https://colab.research.google.com/github/NCSU-Libraries/getting-started-with-python/blob/main/fundamentals/fundamentals.ipynb"><img alt="Open in Colab — Fundamentals" src="https://colab.research.google.com/assets/colab-badge.svg"></a></p>
18+
### Fundamentals <a href="https://colab.research.google.com/github/NCSU-Libraries/getting-started-with-python/blob/main/workshops/fundamentals/fundamentals.ipynb"><img alt="Open in Colab — Fundamentals" src="https://colab.research.google.com/assets/colab-badge.svg"></a></p>
1919

20-
### Loops and Functions <a href="https://colab.research.google.com/github/NCSU-Libraries/getting-started-with-python/blob/main/loops-and-functions/loops-and-functions.ipynb"><img alt="Open in Colab — Loops and Functions" src="https://colab.research.google.com/assets/colab-badge.svg"></a></p>
20+
### Loops and Functions <a href="https://colab.research.google.com/github/NCSU-Libraries/getting-started-with-python/blob/main/workshops/loops-and-functions/loops-and-functions.ipynb"><img alt="Open in Colab — Loops and Functions" src="https://colab.research.google.com/assets/colab-badge.svg"></a></p>
21+
22+
### Exploratory Data Analysis <a href="https://colab.research.google.com/github/NCSU-Libraries/getting-started-with-python/blob/main/workshops/exploratory-data-analysis/exploratory-data-analysis.ipynb"><img alt="Open in Colab — Exploratory Data Analysis" src="https://colab.research.google.com/assets/colab-badge.svg"></a></p>
2123

2224
These materials are used in NC State University Libraries' Data Science Services workshops covering practical data skills (Python, R, visualization, and analysis).
2325

@@ -34,14 +36,18 @@ These materials are used in NC State University Libraries' Data Science Services
3436

3537
- 🧱 Fundamentals — variables, types, lists, dicts, and more.
3638
- 🔁 Loops and Functions — conditionals, loops, functions, and scope.
39+
- 🔎 Exploratory Data Analysis (Polars) — data loading, summaries, and plots.
3740

3841
## 🧩 Solutions
3942

4043
- Fundamentals — Solutions
41-
<a href="https://colab.research.google.com/github/NCSU-Libraries/getting-started-with-python/blob/main/fundamentals/fundamentals-solutions.ipynb"><img alt="Open in Colab — Solutions: Fundamentals" src="https://colab.research.google.com/assets/colab-badge.svg"></a>
44+
<a href="https://colab.research.google.com/github/NCSU-Libraries/getting-started-with-python/blob/main/workshops/fundamentals/fundamentals-solutions.ipynb"><img alt="Open in Colab — Solutions: Fundamentals" src="https://colab.research.google.com/assets/colab-badge.svg"></a>
4245

4346
- Loops and Functions — Solutions
44-
<a href="https://colab.research.google.com/github/NCSU-Libraries/getting-started-with-python/blob/main/loops-and-functions/loops-and-functions-solutions.ipynb"><img alt="Open in Colab — Solutions: Loops and Functions" src="https://colab.research.google.com/assets/colab-badge.svg"></a>
47+
<a href="https://colab.research.google.com/github/NCSU-Libraries/getting-started-with-python/blob/main/workshops/loops-and-functions/loops-and-functions-solutions.ipynb"><img alt="Open in Colab — Solutions: Loops and Functions" src="https://colab.research.google.com/assets/colab-badge.svg"></a>
48+
49+
- Exploratory Data Analysis — Solutions
50+
<a href="https://colab.research.google.com/github/NCSU-Libraries/getting-started-with-python/blob/main/workshops/exploratory-data-analysis/exploratory-data-analysis-solutions.ipynb"><img alt="Open in Colab — Solutions: Exploratory Data Analysis" src="https://colab.research.google.com/assets/colab-badge.svg"></a>
4551

4652
## 💻 Use on Google Colab
4753

compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ services:
99
- "4000:4000"
1010
volumes:
1111
- .:/project
12-
command: bash -lc "quarto preview slides/index.qmd --host 0.0.0.0 --port 4000 --no-browser"
12+
command: bash -lc "cd config && quarto preview slides/index.qmd --host 0.0.0.0 --port 4000 --no-browser"
1313
environment:
1414
- QUARTO_LOG_LEVEL=debug
File renamed without changes.
File renamed without changes.
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Getting Started with Python"
33
format:
44
revealjs:
5-
logo: ../assets/lib_logo_whiteBG.png
5+
logo: ../../assets/lib_logo_whiteBG.png
66
---
77

88
## Welcome to the course materials for *Getting Started with Python*
@@ -17,5 +17,6 @@ format:
1717

1818
## Slide decks
1919

20-
- [Fundamentals](./fundamentals/)
21-
- [Loops and Functions](./loops-and-functions/)
20+
- [Fundamentals](fundamentals/)
21+
- [Loops and Functions](loops-and-functions/)
22+
- [Exploratory Data Analysis](exploratory-data-analysis/)

0 commit comments

Comments
 (0)