Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Codespell configuration is within pyproject.toml
---
name: Codespell

on:
push:
branches: [master]
pull_request:
branches: [master]

permissions:
contents: read

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Annotate locations with typos
uses: codespell-project/codespell-problem-matcher@v1
- name: Codespell
uses: codespell-project/actions-codespell@v2
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,11 @@ dependencies = [
"squarify>=0.4.4",
]
line-length = 70

[tool.codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = '.git*,*.svg,package-lock.json,*.css,*.csv'
check-hidden = true
# ignore embedded images and super long lines
ignore-regex = '^\s*"image/\S+": ".*|.{400,}'
# ignore-words-list = ''
2 changes: 1 addition & 1 deletion src/components/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import TableOfContent from '../components/TableOfContent';
// - add the table of content

// Import Styles = bootstrap + custom
// Custom must be AFTER bootstrap. It makes sure custom style are not overriden
// Custom must be AFTER bootstrap. It makes sure custom style are not overridden
import 'bootstrap/dist/css/bootstrap.min.css';
import '../styles/style.css';
import AdInjector from './AdInjector';
Expand Down
2 changes: 1 addition & 1 deletion src/functions/kdeplot.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ const param5 = {
name: 'fill',
description: (
<p>
Control wether or not the area under the curve is filled with color. See
Control whether or not the area under the curve is filled with color. See
the <code>color</code> argument to control its color.
</p>
),
Expand Down
2 changes: 1 addition & 1 deletion src/notebooks/120-line-chart-with-matplotlib.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"source": [
"## Basic Lineplot\n",
"\n",
"You can create a **basic line chart** with the `plot()` function of matplotlib library. If you give only a serie of values, matplotlib will consider that these values are ordered and will use values from 1 to n to create the X axis (figure 1):"
"You can create a **basic line chart** with the `plot()` function of matplotlib library. If you give only a series of values, matplotlib will consider that these values are ordered and will use values from 1 to n to create the X axis (figure 1):"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/notebooks/121-line-chart-customization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"plt.plot( 'x_values', 'y_values', data=df, color='skyblue')\n",
"plt.show()\n",
"\n",
"# Draw line chart by modifiying transparency of the line\n",
"# Draw line chart by modifying transparency of the line\n",
"plt.plot( 'x_values', 'y_values', data=df, color='skyblue', alpha=0.3)\n",
"\n",
"# Show plot\n",
Expand Down
2 changes: 1 addition & 1 deletion src/notebooks/122-multiple-lines-chart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Mutliple line charts\n",
"## Multiple line charts\n",
"\n",
"Here we display 3 different line charts with **different style properties**:"
]
Expand Down
2 changes: 1 addition & 1 deletion src/notebooks/123-highlight-a-line-in-line-plot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"for column in df.drop('x', axis=1):\n",
" plt.plot(df['x'], df[column], marker='', color='grey', linewidth=1, alpha=0.4)\n",
"\n",
"# Now re do the interesting curve, but biger with distinct color\n",
"# Now re do the interesting curve, but bigger with distinct color\n",
"plt.plot(df['x'], df['y5'], marker='', color='orange', linewidth=4, alpha=0.7)\n",
" \n",
"# Change x axis limit\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Lastly, you can draw a marginal plot using seaborn in order to aviod overlapping in your graph. Note that you can check [this post](https://python-graph-gallery.com/82-marginal-plot-with-seaborn/) to find out details on marginal plots."
"Lastly, you can draw a marginal plot using seaborn in order to avoid overlapping in your graph. Note that you can check [this post](https://python-graph-gallery.com/82-marginal-plot-with-seaborn/) to find out details on marginal plots."
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"# Basic Venn\n",
"v = venn2( (10, 20, 10), alpha = 1 )\n",
" \n",
"# Change Backgroud\n",
"# Change Background\n",
"plt.gca().set_facecolor('skyblue')\n",
"plt.gca().set_axis_on()\n",
" \n",
Expand Down
2 changes: 1 addition & 1 deletion src/notebooks/181-custom-lollipop-plot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The position of the baseline can be changed using `bottom` argument in the `stem()` functon. You can also customize the baseline: remove it, change its size, color, and so on using the `setp()` function."
"The position of the baseline can be changed using `bottom` argument in the `stem()` function. You can also customize the baseline: remove it, change its size, color, and so on using the `setp()` function."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/notebooks/182-vertical-lollipop-plot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
" \n",
"# Add titles and axis names\n",
"plt.yticks(my_range, ordered_df['group'])\n",
"plt.title(\"A vertical lolipop plot\", loc='left')\n",
"plt.title(\"A vertical lollipop plot\", loc='left')\n",
"plt.xlabel('Value of the variable')\n",
"plt.ylabel('Group')\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"z = x+np.random.rand(15)\n",
"z=z*z\n",
" \n",
"# call pallette in cmap\n",
"# call palette in cmap\n",
"plt.scatter(x, y, s=z*2000, c=x, cmap=\"BuPu\", alpha=0.4, edgecolors=\"grey\", linewidth=2)\n",
"plt.show()\n",
" \n",
Expand Down
2 changes: 1 addition & 1 deletion src/notebooks/231-chord-diagram-with-bokeh.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2127,7 +2127,7 @@
],
"metadata": {
"chartType": "chordDiagram",
"description": "A <b>chord chart</b> is used for representing the relationships between data points. Each data points are arranged into a <b>circle</b> and their relationships are displayed with <b>chords</b>. This post describes how to draw a chord chart using <b>bokeh</b> library of pyhton.",
"description": "A <b>chord chart</b> is used for representing the relationships between data points. Each data points are arranged into a <b>circle</b> and their relationships are displayed with <b>chords</b>. This post describes how to draw a chord chart using <b>bokeh</b> library of python.",
"family": "flow",
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
Expand Down
2 changes: 1 addition & 1 deletion src/notebooks/241-improve-area-chart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"source": [
"It is highly advised to change the default **color** of [matplotlib](http://python-graph-gallery.com/matplotlib/). Moreover, it is quite common to use a color with **transparency**, and **add a line** with a stronger colour on the top of the area. \n",
"\n",
"You can pass the `color` parameter to change the color of the area and the `alpha` parameter to change the color transparancy of the area to the `fill_between()` function. You can also add a line with the `plot()` function and change its color to make the edge of the area marked."
"You can pass the `color` parameter to change the color of the area and the `alpha` parameter to change the color transparency of the area to the `fill_between()` function. You can also add a line with the `plot()` function and change its color to make the edge of the area marked."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/notebooks/260-basic-wordcloud.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"# Create a list of word\n",
"text=(\"\"\"Python Python Python Matplotlib Matplotlib Seaborn\n",
" Network Plot Violin Chart Pandas Datascience Wordcloud\n",
" Spider Radar Parrallel Alpha Color Brewer Density Scatter\n",
" Spider Radar Parallel Alpha Color Brewer Density Scatter\n",
" Barplot Barplot Boxplot Violinplot Treemap Stacked Area\n",
" Chart Chart Visualization Dataviz Donut Pie Time-Series\n",
" Wordcloud Wordcloud Sankey Bubble\"\"\")\n",
Expand Down
12 changes: 6 additions & 6 deletions src/notebooks/261-custom-python-wordcloud.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"# Create a list of word\n",
"text=(\"\"\"Python Python Python Matplotlib Matplotlib Seaborn\n",
" Network Plot Violin Chart Pandas Datascience Wordcloud\n",
" Spider Radar Parrallel Alpha Color Brewer Density Scatter\n",
" Spider Radar Parallel Alpha Color Brewer Density Scatter\n",
" Barplot Barplot Boxplot Violinplot Treemap Stacked Area\n",
" Chart Chart Visualization Dataviz Donut Pie Time-Series\n",
" Wordcloud Wordcloud Sankey Bubble\"\"\")\n",
Expand Down Expand Up @@ -95,7 +95,7 @@
"# Create a list of word\n",
"text=(\"\"\"Python Python Python Matplotlib Matplotlib Seaborn\n",
" Network Plot Violin Chart Pandas Datascience Wordcloud\n",
" Spider Radar Parrallel Alpha Color Brewer Density Scatter\n",
" Spider Radar Parallel Alpha Color Brewer Density Scatter\n",
" Barplot Barplot Boxplot Violinplot Treemap Stacked Area\n",
" Chart Chart Visualization Dataviz Donut Pie Time-Series\n",
" Wordcloud Wordcloud Sankey Bubble\"\"\")\n",
Expand Down Expand Up @@ -152,7 +152,7 @@
"# Create a list of word\n",
"text=(\"\"\"Python Python Python Matplotlib Matplotlib Seaborn\n",
" Network Plot Violin Chart Pandas Datascience Wordcloud\n",
" Spider Radar Parrallel Alpha Color Brewer Density Scatter\n",
" Spider Radar Parallel Alpha Color Brewer Density Scatter\n",
" Barplot Barplot Boxplot Violinplot Treemap Stacked Area\n",
" Chart Chart Visualization Dataviz Donut Pie Time-Series\n",
" Wordcloud Wordcloud Sankey Bubble\"\"\")\n",
Expand Down Expand Up @@ -210,7 +210,7 @@
"# Create a list of word\n",
"text=(\"\"\"Python Python Python Matplotlib Matplotlib Seaborn\n",
" Network Plot Violin Chart Pandas Datascience Wordcloud\n",
" Spider Radar Parrallel Alpha Color Brewer Density Scatter\n",
" Spider Radar Parallel Alpha Color Brewer Density Scatter\n",
" Barplot Barplot Boxplot Violinplot Treemap Stacked Area\n",
" Chart Chart Visualization Dataviz Donut Pie Time-Series\n",
" Wordcloud Wordcloud Sankey Bubble\"\"\")\n",
Expand Down Expand Up @@ -239,7 +239,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"And finally you can change the color pallette of words with `colormap` parameter.\n"
"And finally you can change the color palette of words with `colormap` parameter.\n"
]
},
{
Expand All @@ -266,7 +266,7 @@
"# Create a list of word\n",
"text=(\"\"\"Python Python Python Matplotlib Matplotlib Seaborn\n",
" Network Plot Violin Chart Pandas Datascience Wordcloud\n",
" Spider Radar Parrallel Alpha Color Brewer Density Scatter\n",
" Spider Radar Parallel Alpha Color Brewer Density Scatter\n",
" Barplot Barplot Boxplot Violinplot Treemap Stacked Area\n",
" Chart Chart Visualization Dataviz Donut Pie Time-Series\n",
" Wordcloud Wordcloud Sankey Bubble\"\"\")\n",
Expand Down
2 changes: 1 addition & 1 deletion src/notebooks/262-wordcloud-with-specific-shape.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"from wordcloud import WordCloud\n",
"import matplotlib.pyplot as plt\n",
" \n",
"text=(\"\"\"Python Python Python Matplotlib Matplotlib Seaborn Network Plot Violin Chart Pandas Datascience Wordcloud Spider Radar Parrallel Alpha Color Brewer Density Scatter Barplot Barplot Boxplot Violinplot Treemap Stacked Area Chart Chart Visualization Dataviz Donut Pie Time-Series Wordcloud Wordcloud Sankey Bubble\"\"\")\n",
"text=(\"\"\"Python Python Python Matplotlib Matplotlib Seaborn Network Plot Violin Chart Pandas Datascience Wordcloud Spider Radar Parallel Alpha Color Brewer Density Scatter Barplot Barplot Boxplot Violinplot Treemap Stacked Area Chart Chart Visualization Dataviz Donut Pie Time-Series Wordcloud Wordcloud Sankey Bubble\"\"\")\n",
" \n",
"# Create the wordcloud object\n",
"wordcloud = WordCloud(\n",
Expand Down
2 changes: 1 addition & 1 deletion src/notebooks/270-basic-bubble-plot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
"- `x` : The data position on the x axis\n",
"- `y` : The data position on the y axis\n",
"- `s` : The marker size\n",
"- `alpha` : Transparancy ratio\n"
"- `alpha` : Transparency ratio\n"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions src/notebooks/281-basic-map-with-basemap.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"# Set the plot size for this notebook:\n",
"plt.rcParams[\"figure.figsize\"]=13,13\n",
"\n",
"# Always start witht the basemap function to initialize a map\n",
"# Always start with the basemap function to initialize a map\n",
"m=Basemap()\n",
" \n",
"# Show the coast lines\n",
Expand Down Expand Up @@ -468,7 +468,7 @@
},
{
"source": [
"I looks like `arcGis` background requires some sort of authentification now 🤔. The code below looks outdated"
"I looks like `arcGis` background requires some sort of authentication now 🤔. The code below looks outdated"
],
"cell_type": "markdown",
"metadata": {}
Expand Down
2 changes: 1 addition & 1 deletion src/notebooks/315-a-world-map-of-surf-tweets.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
},
{
"source": [
"Let's add each data point on the map thanks to the `scatter()` function. The scatter() funcion is described extensively in the [scatterplot section](https://python-graph-gallery.com/scatter-plot) of the gallery. `x` and `y` coordinates are longitude and latitude respectively. `s` is the size of each circle, it is mapped to the `n` color of the data frame."
"Let's add each data point on the map thanks to the `scatter()` function. The scatter() function is described extensively in the [scatterplot section](https://python-graph-gallery.com/scatter-plot) of the gallery. `x` and `y` coordinates are longitude and latitude respectively. `s` is the size of each circle, it is mapped to the `n` color of the data frame."
],
"cell_type": "markdown",
"metadata": {}
Expand Down
4 changes: 2 additions & 2 deletions src/notebooks/33-control-colors-of-boxplot-seaborn.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"source": [
"## Specifying a color for each distribution\n",
"\n",
"Specifying colors 'by hand' is quickly performed by creating a dictionnary composed of 'category': 'color' pairs as key:value, such as we did in the following example with my_pal.\n"
"Specifying colors 'by hand' is quickly performed by creating a dictionary composed of 'category': 'color' pairs as key:value, such as we did in the following example with my_pal.\n"
]
},
{
Expand Down Expand Up @@ -130,7 +130,7 @@
"source": [
"## Highliting a particular group\n",
"\n",
"You may want to highlight one distribution among others, and this can be done again by creating a custom palette dictionnary, such as before.\n"
"You may want to highlight one distribution among others, and this can be done again by creating a custom palette dictionary, such as before.\n"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions src/notebooks/34-grouped-boxplot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"- `hue`: the variable by which we want to separate our box plot (**smoker or not**), for each value in the other qualitative variable (**day of the week**)\n",
"- `data`: the dataset where our variables are stored (**df**)\n",
"\n",
"Optionnal:\n",
"Optional:\n",
"\n",
"- `palette`: the set of color we want to use\n",
"- `width`: width of each boxplot\n"
Expand Down Expand Up @@ -152,7 +152,7 @@
],
"metadata": {
"chartType": "boxplot",
"description": "Drawing a grouped boxplot with <a href='https://python-graph-gallery.com/seaborn/'>Seaborn</a> is a common way to show the <b>distribution of mutliple groups</b> for a variable.<br> In this post, we'll detail how to create these <a href='https://python-graph-gallery.com/boxplot/'>boxplots</a> and how to <b>customize</b> them.",
"description": "Drawing a grouped boxplot with <a href='https://python-graph-gallery.com/seaborn/'>Seaborn</a> is a common way to show the <b>distribution of multiple groups</b> for a variable.<br> In this post, we'll detail how to create these <a href='https://python-graph-gallery.com/boxplot/'>boxplots</a> and how to <b>customize</b> them.",
"family": "distribution",
"kernelspec": {
"display_name": "Python 3",
Expand Down
2 changes: 1 addition & 1 deletion src/notebooks/342-animation-on-3d-plot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The last line of the code chunck above is of high interest here. It set the angle the camera uses to display the figure (`70°` here).\n"
"The last line of the code chunk above is of high interest here. It set the angle the camera uses to display the figure (`70°` here).\n"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/notebooks/35-control-order-of-boxplot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"source": [
"## By decreasing median\n",
"\n",
"In the example above, we directly specified the order in which we expected our distributions to appear (based on groups name). Not knowing beforehand, we could have decided to dispay the distributions by decreasing median. This can be achieved again by specifying the 'order' argument inside the boxplot() function. \n",
"In the example above, we directly specified the order in which we expected our distributions to appear (based on groups name). Not knowing beforehand, we could have decided to display the distributions by decreasing median. This can be achieved again by specifying the 'order' argument inside the boxplot() function. \n",
"Using pandas groupby, median and slicing in reverse order (thanks to .iloc[::-1]), we are able to define a list of groups ordered by decreasing median, which is then used as a value for the 'order' argument.\n"
]
},
Expand Down
2 changes: 1 addition & 1 deletion src/notebooks/372-3d-pca-result.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"my_dpi=96\n",
"plt.figure(figsize=(480/my_dpi, 480/my_dpi), dpi=my_dpi)\n",
" \n",
"# Keep the 'species' column appart + make it numeric for coloring\n",
"# Keep the 'species' column apart + make it numeric for coloring\n",
"df['species']=pd.Categorical(df['species'])\n",
"my_color=df['species'].cat.codes\n",
"df = df.drop('species', 1)\n",
Expand Down
2 changes: 1 addition & 1 deletion src/notebooks/39-hidden-data-under-boxplot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
],
"metadata": {
"chartType": "caveats",
"description": "A boxplot <b>summarizes</b> the distribution of a numeric variable for several groups. The problem is that summarizing also might mean loosing information. This post is dedicated to explain methods in order to overcome a problem of hidden data under boxplot.",
"description": "A boxplot <b>summarizes</b> the distribution of a numeric variable for several groups. The problem is that summarizing also might mean losing information. This post is dedicated to explain methods in order to overcome a problem of hidden data under boxplot.",
"family": "general",
"kernelspec": {
"display_name": "Python 3",
Expand Down
2 changes: 1 addition & 1 deletion src/notebooks/40-basic-scatterplot-seaborn.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
"source": [
"## Scatter plot\n",
"\n",
"A [scatterplot](/scatter-plot) can be made using `scatterplot()` function of [seaborn](/seaborn) library. An example dataset from seaborn repository, iris dataset, is used in the example. The plot shows the relationship between sepal lenght and width of plants. In order to show the most basic utilization of this function, the following parameters should be provided:\n",
"A [scatterplot](/scatter-plot) can be made using `scatterplot()` function of [seaborn](/seaborn) library. An example dataset from seaborn repository, iris dataset, is used in the example. The plot shows the relationship between sepal length and width of plants. In order to show the most basic utilization of this function, the following parameters should be provided:\n",
"\n",
"- `x` : positions of points on the X axis\n",
"- `y` : positions of points on the Y axis\n"
Expand Down
2 changes: 1 addition & 1 deletion src/notebooks/402-color-dendrogram-labels.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"# Create a color palette with 3 colors for the 3 cyl possibilities\n",
"my_palette = plt.cm.get_cmap(\"Accent\", 3)\n",
" \n",
"# transforme the 'cyl' column in a categorical variable. It will allow to put one color on each level.\n",
"# transform the 'cyl' column in a categorical variable. It will allow to put one color on each level.\n",
"df['cyl']=pd.Categorical(df['cyl'])\n",
"my_color=df['cyl'].cat.codes\n",
" \n",
Expand Down
2 changes: 1 addition & 1 deletion src/notebooks/404-dendrogram-with-heat-map.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"It is possible to standardize or normalize the data you want to plot by passing the `standard_scale` or `z_score` aguments to the function:\n",
"It is possible to standardize or normalize the data you want to plot by passing the `standard_scale` or `z_score` arguments to the function:\n",
"* `standard_scale` : Either 0 (rows) or 1 (columns)\n",
"* `z_score` : Either 0 (rows) or 1 (columns)"
]
Expand Down
Loading