Multiline formatting syntax in Data Visualization exercises

Open Beginner friendly
#68 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
python

Research direction

Start at the Data Visualization exercises block linked in the issue and inspect the two multiline ggplot examples. Verify the syntax in Python, update the examples to use the shown valid formatting, and confirm the exercises no longer produce syntax errors.

Written by the indexing model from the issue text.

Description

In this block of exercises: https://aeturrell.github.io/python4DS/data-visualise.html#exercises-2

The multiline formatting of this block:

ggplot(penguins, aes(x = "island", fill = "species")) +
  geom_bar(position = "fill")
ggplot(penguins, aes(x = "species", fill = "island")) +
  geom_bar(position = "fill")

results in syntax errors.

Recommend replacement with:

ggplot(penguins, aes(x = "island", fill = "species")) + geom_bar(position = "fill")

or for consistency with above blocks:

(
    ggplot(penguins, aes(x = "species", fill = "island"))
    + geom_bar(position = "fill")
)
Dominant language
Jupyter Notebook
Stars
168
Forks
36
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aeturrell/python4DS

All issues in aeturrell/python4DS

Similar issues

More Data Visualization issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.