1
0
mirror of https://github.com/gsi-upm/sitc synced 2025-06-13 11:42:21 +00:00

Update 2_3_1_Advanced_Visualisation.ipynb

Changed image path
This commit is contained in:
Carlos A. Iglesias 2025-06-02 16:09:55 +03:00 committed by GitHub
parent ec11ff2d5e
commit 44a555ac2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"![](files/images/EscUpmPolit_p.gif \"UPM\")"
"![](./images/EscUpmPolit_p.gif \"UPM\")"
]
},
{
@ -52,11 +52,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In the previous notebook we developed plots with the [matplotlib](http://matplotlib.org/) plotting library.\n",
In the previous notebook, we developed plots with the [matplotlib](http://matplotlib.org/) plotting library.\n",
"\n",
"This notebook introduces another plotting library, [**seaborn**](https://stanford.edu/~mwaskom/software/seaborn/), which provides advanced facilities for data visualization.\n",
"\n",
"*Seaborn* is a library for making attractive and informative statistical graphics in Python. It is built on top of *matplotlib* and tightly integrated with the *PyData* stack, including support for *numpy* and *pandas* data structures and statistical routines from *scipy* and *statsmodels*.\n",
"*Seaborn* is a library that makes attractive and informative statistical graphics in Python. It is built on top of *matplotlib* and tightly integrated with the *PyData* stack, including support for *numpy* and *pandas* data structures and statistical routines from *scipy* and *statsmodels*.\n",
"\n",
"*Seaborn* requires its input to be *DataFrames* (a structure created with the library *pandas*)."
]
@ -197,9 +197,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"A very common way to use this plot colors the observations by a separate categorical variable. For example, the iris dataset has four measurements for each of the three different species of iris flowers.\n",
"A widespread way to use this plot colors the observations by a separate categorical variable. For example, the iris dataset has four measurements for each of the three different species of iris flowers.\n",
"\n",
"We are going to color each class, so that we can easily identify **clustering** and **linear relationships**."
"We are going to color each class, so we can easily identify **clustering** and **linear relationships**."
]
},
{
@ -220,7 +220,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"By default every numeric column in the dataset is used, but you can focus on particular relationships if you want."
"By default, every numeric column in the dataset is used, but you can focus on particular relationships if you want."
]
},
{
@ -321,7 +321,7 @@
"metadata": {},
"outputs": [],
"source": [
"# One way we can extend this plot is adding a layer of individual points on top of\n",
"# One way we can extend this plot is by adding a layer of individual points on top of\n",
"# it through Seaborn's striplot\n",
"# \n",
"# We'll use jitter=True so that all the points don't fall in single vertical lines\n",
@ -347,7 +347,7 @@
"outputs": [],
"source": [
"# A violin plot combines the benefits of the previous two plots and simplifies them\n",
"# Denser regions of the data are fatter, and sparser thiner in a violin plot\n",
"# Denser regions of the data are fatter, and sparser thinner in a violin plot\n",
"sns.violinplot(x=\"species\", y=\"petal length (cm)\", data=iris_df, size=6)"
]
},
@ -389,10 +389,10 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Depending on the data, we can choose which visualisation suits better. the following [diagram](http://www.labnol.org/software/find-right-chart-type-for-your-data/6523/) guides this selection.\n",
"Depending on the data, we can choose which visualisation suits us better. the following [diagram](http://www.labnol.org/software/find-right-chart-type-for-your-data/6523/) guides this selection.\n",
"\n",
"\n",
"![](files/images/data-chart-type.png \"Graphs\")"
"![](./images/data-chart-type.png \"Graphs\")"
]
},
{
@ -421,7 +421,7 @@
"metadata": {},
"source": [
"## Licence\n",
"The notebook is freely licensed under under the [Creative Commons Attribution Share-Alike license](https://creativecommons.org/licenses/by/2.0/). \n",
"The notebook is freely licensed under the [Creative Commons Attribution Share-Alike license](https://creativecommons.org/licenses/by/2.0/). \n",
"\n",
"© Carlos A. Iglesias, Universidad Politécnica de Madrid."
]