Skip to content

Commit a0c1b6d

Browse files
authored
Merge branch 'master' into quarto_mod6
2 parents 9d7b66f + dd3c414 commit a0c1b6d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+4023
-2
lines changed

_quarto.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,53 @@ website:
3232
style: 'docked'
3333
background: 'primary'
3434
contents:
35+
- section: "**M0. Welcome to Programming in Python for Data Science**"
36+
contents:
37+
- text: '0. Welcome!'
38+
href: modules/index.qmd
39+
- href: modules/module0/module0-01-programming_in_python_for_data_science.qmd
40+
- text: '   1.1. Prerequisite confirmation'
41+
href: modules/module0/module0-02-are_you_ready.qmd
42+
- section: "**M1. Python & Pandas - An Unexpected Friendship**"
43+
contents:
44+
- href: modules/module1/module1-00-module_learning_outcomes.qmd
45+
- href: modules/module1/module1-01-introduction_to_dataframes.qmd
46+
- text: '   1.1. Exercises'
47+
href: modules/module1/module1-02-describing_a_dataframe.qmd
48+
- href: modules/module1/module1-03-introduction_to_pandas.qmd
49+
- text: '   2.1. Exercises'
50+
href: modules/module1/module1-04-definitions.qmd
51+
- href: modules/module1/module1-07-slicing_with_pandas_using_.loc[].qmd
52+
- text: '   3.1. Exercises'
53+
href: modules/module1/module1-08-slicing_and_dicing_practice.qmd
54+
- href: modules/module1/module1-11-slicing_columns_using_.loc[].qmd
55+
- text: '   4.1. Exercises'
56+
href: modules/module1/module1-12-slicing_columns_only.qmd
57+
- href: modules/module1/module1-13-selecting_using_.loc[].qmd
58+
- text: '   5.1. Exercises'
59+
href: modules/module1/module1-14-rearraging_columns_and_rows.qmd
60+
- href: modules/module1/module1-16-obtaining_dataframe_values.qmd
61+
- text: '   6.1. Exercises'
62+
href: modules/module1/module1-17-practicing_selecting_values.qmd
63+
- href: modules/module1/module1-18-selecting_a_single_column.qmd
64+
- text: '   7.1. Exercises'
65+
href: modules/module1/module1-19-practicing_selecting.qmd
66+
- href: modules/module1/module1-20-slicing_and_selecting_using_df.iloc[].qmd
67+
- text: '   8.1. Exercises'
68+
href: modules/module1/module1-21-practicing_slicing_and_selecting_using_index_position.qmd
69+
- href: modules/module1/module1-24-sorting_dataframes.qmd
70+
- text: '   9.1. Exercises'
71+
href: modules/module1/module1-25-practice_sorting.qmd
72+
- href: modules/module1/module1-26-summary_statistics.qmd
73+
- text: '   10.1. Exercises'
74+
href: modules/module1/module1-27-fruit_bowl_statistics.qmd
75+
- href: modules/module1/module1-29-frequency_tables_and_writing_csvs.qmd
76+
- text: '   11.1. Exercises'
77+
href: modules/module1/module1-30-practicing_frequency_tables.qmd
78+
- href: modules/module1/module1-31-quick_viz_with_altair.qmd
79+
- text: '   12.1. Exercises'
80+
href: modules/module1/module1-32-practicing_bar_charts.qmd
81+
- href: modules/module1/module1-34-what_did_we_just_learn.qmd
3582
- section: "**Module 6: Functions Fundamentals and Best Practices**"
3683
contents:
3784
- href: modules/module6/module6-00-module_learning_outcomes.qmd

environment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ channels:
55
dependencies:
66
- python>=3.11,<3.13
77
- altair-all=5.5.*
8-
- pandas=1.5.*
8+
- pandas=2.2.*
99
- scipy
1010
- matplotlib
1111
- jupyter

modules/index.qmd

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
format: html
3+
pagetitle: Home
4+
---
5+
6+
# Welcome to Programming in Python for Data Science!
7+
8+
This course is part of the [Key Capabilities for Data Science program](https://extendedlearning.ubc.ca/programs-credentials/key-capabilities-data-science-certificate) and will teach you how to conduct data analysis in Python.
9+
During the course, you will work with powerful Python packages made for data-science, including Pandas for processing tabular data, Altair for data visualization and NumPy for working with numerical data types.
10+
11+
You will also learn about iteration, flow control, and the data types relevant to data exploration and analysis.
12+
You will leave this course capable of processing raw data into a format suitable for analysis, writing your own analysis functions, and deriving data-driven insights via the creation of interactive visualizations and summary tables.
13+
14+
15+
Course prerequisites: None
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
format:
3+
html:
4+
page-layout: full
5+
---
6+
7+
# 1. Programming in Python for Data Science
8+
9+
::: {.panel-tabset .nav-pills}
10+
11+
## Video
12+
13+
<iframe
14+
class="video"
15+
src="https://www.youtube.com/embed/grkcTZyb9Tk?start=0&end=219&rel=0"
16+
title="Module 0 Video - Programming in Python for Data Science"
17+
frameborder="0"
18+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
19+
allowfullscreen
20+
></iframe>
21+
22+
## Slides
23+
24+
<iframe
25+
class="slide-deck"
26+
src="slides/module0_01.html"
27+
></iframe>
28+
29+
:::
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
format: html
3+
---
4+
5+
<script src='../../src/quiz.js'></script>
6+
7+
# 1.1. Exercises
8+
9+
## Are you ready?
10+
11+
<div id='mcq1'></div>
12+
<script>
13+
generateQuiz(
14+
'mcq1',
15+
'Question 1',
16+
'Are you ready to start the course <i>Programming in Python for Data Science</i>?',
17+
{
18+
'Yes! Let’s get this party started!': 'We love the enthusiasm! Alright let’s move on to Module 1.',
19+
'I have a Python background but have not had very much wrangling experience.': 'We recommend taking this course so that you are familiar with <code>Pandas</code> and have the fundamentals master for our more advanced Data Science courses. Please continue to Module 1.',
20+
'I don’t think this is the right fit for me.': 'That’s ok. If you don’t think this is the right course for you, we hope you find what you are looking for. We still suggest taking a look at what we have to offer in Module 1 before formulating a set opinion.',
21+
},
22+
['Yes! Let’s get this party started!', 'I have a Python background but have not had very much wrangling experience.'],
23+
);
24+
</script>

modules/module0/slides/module0_01.qmd

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
format: revealjs
3+
title: Welcome!
4+
title-slide-attributes:
5+
data-notes: |
6+
Welcome to Programming in Python for Data Science.
7+
---
8+
9+
```{python}
10+
# | echo: false
11+
%run src/utils.py
12+
```
13+
14+
## Course Learning Outcomes
15+
16+
1. Define tidy data and explain why it is an optimal format for data analysis.
17+
1. Transform data into the tidy data format using pandas.
18+
1. Demonstrate fundamental programming concepts such as loops and conditionals.
19+
1. Understand the key data structures in Python.
20+
1. Read data into Python data from vanilla (e.g., .csv) and non-standard plain text files, as well as common spreadsheet file types (e.g., .xls).
21+
1. Construct simple plots using Altair
22+
1. Manipulate a single data table by:
23+
7.1 Filtering rows based on a criterion or combination of criteria.
24+
7.2 Selecting variables.
25+
7.3 Creating new variables and modifying pre-existing ones.
26+
7.4 Rearranging the observations or variables by sorting.
27+
1. Manage and manipulate data with dates and times, missing values and categorical variables as well as renaming dataframe columns.
28+
1. Produce human-readable code that incorporates best practices of programming and coding style.
29+
30+
31+
32+
# Let's learn Programming in Python for Data Science
33+
34+
:::{.notes}
35+
This course is designed to give you a solid foundation of coding in Python.
36+
37+
No prior python knowledge is needed for this course.
38+
:::
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
format:
3+
html:
4+
page-layout: full
5+
---
6+
7+
# 0. Module Learning Outcomes
8+
9+
::: {.panel-tabset .nav-pills}
10+
11+
## Video
12+
13+
<iframe
14+
class="video"
15+
src="https://www.youtube.com/embed/vW2ZXIfZioE?start=0&end=29&rel=0"
16+
title="Module 1 Video - Module Learning Outcomes"
17+
frameborder="0"
18+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
19+
allowfullscreen
20+
></iframe>
21+
22+
## Slides
23+
24+
<iframe
25+
class="slide-deck"
26+
src="slides/module1_00.html"
27+
></iframe>
28+
29+
:::
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
format:
3+
html:
4+
page-layout: full
5+
---
6+
7+
# 1. Introduction to Dataframes
8+
9+
::: {.panel-tabset .nav-pills}
10+
11+
## Video
12+
13+
<iframe
14+
class="video"
15+
src="https://www.youtube.com/embed/W88f5DAl9hk?start=0&end=114&rel=0"
16+
title="Module 1 Video - Introduction to Dataframes"
17+
frameborder="0"
18+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
19+
allowfullscreen
20+
></iframe>
21+
22+
## Slides
23+
24+
<iframe
25+
class="slide-deck"
26+
src="slides/module1_01.html"
27+
></iframe>
28+
29+
:::
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
format: html
3+
---
4+
5+
<script src='../../src/quiz.js'></script>
6+
7+
# 1.1. Exercises
8+
9+
## Describing a Dataframe
10+
11+
<div id='mcq1'></div>
12+
<script>
13+
generateQuiz(
14+
'mcq1',
15+
'Question 1',
16+
'What are dataframes comparable to?',
17+
{
18+
'Text Documents': 'Is this an easy way to organize data?',
19+
'Excel Sheets': 'Good job!',
20+
'Picture Frames': 'Are we storing pictures in a dataframe?',
21+
},
22+
'Excel Sheets',
23+
);
24+
</script>
25+
26+
<div id='mcq2'></div>
27+
<script>
28+
generateQuiz(
29+
'mcq2',
30+
'Question 2',
31+
'If a <code>csv</code> file was opened in a plain text editor, what character would be separating the values of each column?',
32+
{
33+
'<code>:</code>': 'The "C" in <code>csv</code> does not stand for colon.',
34+
'<code>;</code>': '<code>csv</code> is an acronym for _______ Separated Values format, so likely not "Semi-Colon".',
35+
'<code>,</code>': 'Great! You have been paying attention.',
36+
},
37+
'<code>,</code>',
38+
);
39+
</script>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
format:
3+
html:
4+
page-layout: full
5+
---
6+
7+
# 2. Introduction to Pandas
8+
9+
::: {.panel-tabset .nav-pills}
10+
11+
## Video
12+
13+
<iframe
14+
class="video"
15+
src="https://www.youtube.com/embed/W88f5DAl9hk?start=121&end=371&rel=0"
16+
title="Module 1 Video - Introduction to Pandas"
17+
frameborder="0"
18+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
19+
allowfullscreen
20+
></iframe>
21+
22+
## Slides
23+
24+
<iframe
25+
class="slide-deck"
26+
src="slides/module1_03.html"
27+
></iframe>
28+
29+
:::

0 commit comments

Comments
 (0)