Skip to content

Commit

Permalink
Merge branch 'main' of github.com:nickeubank/practicaldatascience_book
Browse files Browse the repository at this point in the history
  • Loading branch information
nickeubank committed Jul 3, 2024
2 parents 488b899 + a7789e9 commit 0c6d331
Show file tree
Hide file tree
Showing 7 changed files with 1,236 additions and 587 deletions.
30 changes: 26 additions & 4 deletions notebooks/class_5/week_1/00_plotting_introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,38 @@
"\n",
"## Why do we plot? Visual exploration, communication, and summarization\n",
"\n",
"TBD\n",
"For millennia, humans have used data visualization to learn about the world and share it with others. Maps are among the oldest form of data visualization which helped us to understand and communicate how the world was arranged spatially, enabling commerce, law, and science to advance. The data visualization (Figure 1) of John Snow's famous 1854 data visualization that mapped the number of Cholera deaths (black bars stacked along the streets) and showed the proximity to water pumps for wells in London (black dots labeled \"PUMP\"). It turned out that the well at the center of the outbreak had been contaminated by sewage."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"![Cholera Map](img/snow.png)\n",
"*Figure 1. John Snow's 1954 map of the cholera epidemic in London.*"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This visualization convinced local authorities to shut down access to the well by removing the handle on the pump. This action has been widely credited with ending the outbreak. An action from an effective data visualization."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"## Why do we plot programatically? \n",
"## Why do we plot programmatically? \n",
"\n",
"You might wonder why, given great tools with graphical user interfaces (GUIs) like Excel and Tableau for being able to make data visualizations, why would we ever choose to create plots programmatically?\n",
"\n",
"There are several reasons:\n",
"1. Customization. Tools like the ones we will introduce in this course, allow for nearly limitless customizations if you're willing to dive deep enough into the code. Tools like Excel and Tableau are not able to offer that degree of flexibility.\n",
"2. Reproducibility. If you create a plot with the code, you can instantly regenerate that plot even if your data change. With other tools, the plot creation process requires that you repeat numerous steps. This can be a major time savor. Additionally, it allows others that you are working with or that you share your code with to also reproduce your plots, increasing the impact of the work.\n",
"3. Automation and upscaling. If your plot is part of a process that that you will rerun regularly or that needs to be scaled up to larger datasets, having your plots created using code will enable easy integration into those pipelines unlike GUI-based tools.\n",
"2. Reproducibility. If you create a plot with the code, you can instantly regenerate that plot even if your data change. With other tools, the plot creation process requires that you repeat numerous steps. This can be a major time saver. Additionally, it allows others that you are working with or that you share your code with to also reproduce your plots, increasing the impact of the work.\n",
"3. Automation and upscaling. If your plot is part of a process that you will rerun regularly or that needs to be scaled up to larger datasets, having your plots created using code will enable easy integration into those pipelines unlike GUI-based tools.\n",
"\n",
"We start this course with an introduction to plotting programmatically so that you're then able to use those visualization skills for the other topics we will discuss: using code to make predictions and draw inferences from data, before pulling it all together into a final project applying your Python programming skills."
]
Expand Down
584 changes: 1 addition & 583 deletions notebooks/class_5/week_1/10_plotting_with_matplotlib.ipynb

Large diffs are not rendered by default.

512 changes: 512 additions & 0 deletions notebooks/class_5/week_1/11_anatomy_of_a_figure.ipynb

Large diffs are not rendered by default.

276 changes: 276 additions & 0 deletions notebooks/class_5/week_1/12_subplots.ipynb

Large diffs are not rendered by default.

182 changes: 182 additions & 0 deletions notebooks/class_5/week_1/13_explicit_vs_implicit_syntax.ipynb

Large diffs are not rendered by default.

239 changes: 239 additions & 0 deletions notebooks/class_5/week_1/14_basic example.ipynb

Large diffs are not rendered by default.

Binary file added notebooks/class_5/week_1/img/snow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0c6d331

Please sign in to comment.