You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 01-intro/jupyter-notebook.qmd
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ In order to run computer programs, we need a way to execute code written in a pr
25
25
The environment we will use is **Jupyter Notebook**, which allows us to write and run code within a single `.ipynb` document (i.e., **notebook**). They also allow us to embedded text and code.
26
26
27
27
:::{style="text-align: center"}
28
-
{#fig-inflation fig-align=center width=90%}
28
+
{#fig-inflation fig-align=center width=90% fig-alt=""}
29
29
:::
30
30
31
31
There's a lot going on in the above Jupyter Notebook screenshot: there is code, there is output from running code, there are pictures, and there is (non-code) text. We'll get to understanding all of these components in due time.
@@ -78,7 +78,7 @@ Jupyter Notebooks are made up of **cells**. There are two main types of cells:
78
78
When run, Python code cells are evaluated as a Python code snippet, one line at a time. The cell output displayed is the value of the _last_ evaluated expression:
79
79
80
80
:::{style="text-align: center"}
81
-
{#fig-inflation fig-align=center width=70%}
81
+
{#fig-inflation fig-align=center width=70% fig-alt=""}
82
82
:::
83
83
84
84
We will discuss this output/display phenomenon more in future notes.
@@ -88,7 +88,7 @@ To run a code cell, you can either hit the "Run" button in the Toolbar, or you c
88
88
**Markdown cells.** This is where you write text and images that aren’t Python code. Markdown is a language used for formatting text. A Markdown cell will always display its formatting when it is not in edit mode.
89
89
90
90
:::{style="text-align: center"}
91
-
{#fig-inflation fig-align=center width=100%}
91
+
{#fig-inflation fig-align=center width=100% fig-alt=""}
92
92
:::
93
93
94
94
Here is a [guide to Markdown formatting](https://www.markdownguide.org/cheat-sheet/). You’ll explore Markdown more in lab.
Copy file name to clipboardExpand all lines: 05-variables/index.qmd
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ It is challenging to use another person's data! The concepts have already been o
30
30
For now, we focus on variables as they exist in tabular data. In most of the tabular datasets we will examine, variables correspond to **columns** of features. Each row is a **record** of a datapoint, with different values of variables measured for that datapoint.
31
31
32
32
:::{style="text-align: center"}
33
-
{#fig-inflation fig-align=center width=60%}
33
+
{#fig-inflation fig-align=center width=60% fig-alt=""}
34
34
:::
35
35
36
36
@@ -49,7 +49,7 @@ Figure 2 has examples of each variable type.
Copy file name to clipboardExpand all lines: 05-variables/units-of-analysis.qmd
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -53,13 +53,13 @@ Let's return to our American Community Survey (ACS) 2020 data. It shows educatio
53
53
From the [ACS webpage](https://www.census.gov/programs-surveys/acs/methodology/design-and-methodology.html), the American Community Survey (ACS) is an ongoing monthly survey that collects detailed housing and socioeconomic data.
54
54
55
55
:::{style="text-align: center"}
56
-
{#fig-inflation fig-align=center width=90%}
56
+
{#fig-inflation fig-align=center width=90% fig-alt=""}
57
57
:::
58
58
59
59
There are (at least) two datasets collected by the ACS: A private dataset of survey responses by household (Figure 1), and a public-facing dataset of responses by geographic region. The variables for the geographic region, a larger unit of analysis, are constructed via aggregation and estimation (Figure 2):
60
60
61
61
:::{style="text-align: center"}
62
-
{#fig-inflation fig-align=center width=90%}
62
+
{#fig-inflation fig-align=center width=90% fig-alt=""}
63
63
:::
64
64
65
65
Simple forms of aggregation are straightforward and involve counting and averaging---methods that are very possible using our limited Data Science toolkit thus far. However, disaggregation cannot be done without individual datapoints! There are various methods of estimating individuals from averages using statistics and distributions; we discuss this briefly in a few weeks, but you can take a statistics course for more information.
This creates an intuitive mapping where the visual property (bar length) directly corresponds to the data value (average age).
@@ -27,7 +27,7 @@ This creates an intuitive mapping where the visual property (bar length) directl
27
27
Other visualizations can include multiple variables encoded simultaneously.
28
28
29
29
:::{style="text-align: center"}
30
-
{#fig-scatter fig-align=center width=80%}
30
+
{#fig-scatter fig-align=center width=80% fig-alt=""}
31
31
:::
32
32
33
33
### Quick Check: How Many Variables?
@@ -48,7 +48,7 @@ Look at the scatter plot above. How many different variables are being encoded?
48
48
As we learned when studying variables, different variable types (numerical vs. categorical, discrete vs. continuous, ordinal vs. nominal) have different properties. When creating visualizations, we need to match our encoding choices to these variable types.
@@ -69,7 +69,7 @@ The table below summarizes which visual encodings work best for different types
69
69
### What's Wrong with This?
70
70
71
71
:::{style="text-align: center"}
72
-
{#fig-cars-graph fig-align=center width=70%}
72
+
{#fig-cars-graph fig-align=center width=70% fig-alt=""}
73
73
:::
74
74
75
75
**Problem**: This graph implies that Swedish cars are "greater" than cars from other countries in some sense, when they're not. If the variable is just "country of origin" (nominal categorical), using length encoding suggests an ordering that doesn't exist.
Copy file name to clipboardExpand all lines: 07-visualizations/index.qmd
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ To better understand these principles in action, let's examine how humans have u
25
25
What do you see when you look at this ancient artifact?
26
26
27
27
:::{style="text-align: center"}
28
-
{#fig-ancient-map fig-align=center width=60%}
28
+
{#fig-ancient-map fig-align=center width=60% fig-alt=""}
29
29
:::
30
30
31
31
This is a map depicting the town of Konya, Turkey - supposedly the world's first map, dating back to approximately 6200 BC. Even in prehistoric times, humans recognized the power of visual representation to communicate spatial relationships and important information.
@@ -47,7 +47,7 @@ One of the most famous examples of data visualization directly saving human live
47
47
**The Solution**: Dr. John Snow was skeptical of the miasma theory and suspected contaminated water. He created a revolutionary approach that became standard in epidemiology: **he drew a map**.
@@ -64,7 +64,7 @@ One of the most famous examples of data visualization directly saving human live
64
64
Florence Nightingale wasn't just a pioneering nurse, she was also an innovative data visualizer. During the Crimean War, she created what's now called a "rose diagram" or "coxcomb chart" to visualize the causes of death among British soldiers.
65
65
66
66
:::{style="text-align: center"}
67
-
{#fig-rose-diagram fig-align=center width=60%}
67
+
{#fig-rose-diagram fig-align=center width=60% fig-alt=""}
68
68
:::
69
69
70
70
Her visualization revealed a shocking truth: more soldiers were dying from preventable diseases than from battle wounds. This wasn't just a pretty chart, it was a powerful argument that drove major reforms in military medical care. Nightingale understood that abstract statistics about mortality rates couldn't compete with the visual impact of her rose petals, where the size of each segment made the disparity impossible to ignore.
@@ -76,7 +76,7 @@ Her visualization revealed a shocking truth: more soldiers were dying from preve
76
76
Not all data visualization involves charts and graphs. Maya Lin's Vietnam War Memorial in Washington DC proves that data can be deeply emotional and memorial, not just analytical.
77
77
78
78
:::{style="text-align: center"}
79
-
{#fig-vietnam-memorial fig-align=center width=70%}
79
+
{#fig-vietnam-memorial fig-align=center width=70% fig-alt=""}
80
80
:::
81
81
82
82
Each of the 58,000+ names etched into the black granite represents one life lost. The chronological arrangement tells the story of the war's progression through time, while the reflective surface creates an intimate connection between viewers and the data you literally see yourself reflected among the names. This memorial demonstrates that the most powerful visualizations don't just inform us; they transform how we feel about the information.
@@ -86,7 +86,7 @@ Each of the 58,000+ names etched into the black granite represents one life lost
86
86
During the COVID-19 pandemic, data visualization became part of daily life. Suddenly, everyone from epidemiologists to elementary school students was reading line charts showing case trends and interpreting what those curves meant for their communities.
87
87
88
88
:::{style="text-align: center"}
89
-
{#fig-covid-dashboard fig-align=center width=80%}
89
+
{#fig-covid-dashboard fig-align=center width=80% fig-alt=""}
90
90
:::
91
91
92
92
Google's COVID tracking dashboard exemplified how modern visualization must be both accessible and updateable in real-time. The time series charts showed trends over months with clear visual indicators of peaks and valleys, but more importantly, they translated complex epidemiological data into something any concerned citizen could understand.
0 commit comments