Skip to content

Commit 02406a2

Browse files
remove end of line spaces
1 parent b5c35cb commit 02406a2

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

source/viz.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@ else:
11121112
:figwidth: 700px
11131113
:name: can_lang_plot_tooltip
11141114

1115-
Scatter plot of percentage of Canadians reporting a language as their mother tongue vs the primary language at home colored by language category with custom colors and mouse hover tooltip.
1115+
Scatter plot of percentage of Canadians reporting a language as their mother tongue vs the primary language at home colored by language category with custom colors and mouse hover tooltip.
11161116
:::
11171117

11181118
From the visualization in {numref}`can_lang_plot_tooltip`,
@@ -1160,15 +1160,15 @@ islands_df = pd.read_csv("data/islands.csv")
11601160
islands_df
11611161
```
11621162

1163-
Here, we have a data frame of Earth's landmasses,
1164-
and are trying to compare their sizes.
1165-
The right type of visualization to answer this question is a bar plot.
1163+
Here, we have a data frame of Earth's landmasses,
1164+
and are trying to compare their sizes.
1165+
The right type of visualization to answer this question is a bar plot.
11661166
In a bar plot, the height of each bar represents the value of an *amount*
11671167
(a size, count, proportion, percentage, etc).
11681168
They are particularly useful for comparing counts or proportions across different
1169-
groups of a categorical variable. Note, however, that bar plots should generally not be
1169+
groups of a categorical variable. Note, however, that bar plots should generally not be
11701170
used to display mean or median values, as they hide important information about
1171-
the variation of the data. Instead it's better to show the distribution of
1171+
the variation of the data. Instead it's better to show the distribution of
11721172
all the individual data points, e.g., using a histogram, which we will discuss further in {numref}`histogramsviz`.
11731173

11741174
```{index} altair; mark_bar
@@ -1212,7 +1212,7 @@ so that the labels are on the y-axis and we don't have to tilt our head to read
12121212
```{note}
12131213
Recall that in {numref}`Chapter %s <intro>`, we used `sort_values` followed by `head` to obtain
12141214
the ten rows with the largest values of a variable. We could have instead used the `nlargest` function
1215-
from `pandas` for this purpose. The `nsmallest` and `nlargest` functions achieve the same goal
1215+
from `pandas` for this purpose. The `nsmallest` and `nlargest` functions achieve the same goal
12161216
as `sort_values` followed by `head`, but are slightly more efficient because they are specialized for this purpose.
12171217
In general, it is good to use more specialized functions when they are available!
12181218
```
@@ -1360,7 +1360,7 @@ Note that this time,
13601360
we are setting the `y` encoding to `"count()"`.
13611361
There is no `"count()"` column-name in `morley_df`;
13621362
we use `"count()"` to tell `altair`
1363-
that we want to count the number of occurrences of each value in along the x-axis
1363+
that we want to count the number of occurrences of each value in along the x-axis
13641364
(which we encoded as the `Speed` column).
13651365

13661366
```{code-cell} ipython3

0 commit comments

Comments
 (0)