I am a big fan of violin-plots. Although both aim for the same goal (visualizing distributions and key figures for that), box-plots have their limitations. Please have a look into following gif ): Box-plots are not able to capture the change in the raw data, voilin-plots do and are able to do so:
 taken from https://www.autodesk.com/research/...
Use (more information in the docs):
import matplotlib.pyplot as plt
import numpy as np
# example data
x = list(range(14))
y1 = np.arange(14)
y2 = np.arange(14)[::-1]
y3 = [8 for x in range(14)]
# Interesting part
fig, ax = plt.subplots()
ax.bar(x, y1, color="red", edgecolor="None", linewidth=2, label='1')
ax.bar(x, y2, color="...
Statistics of this nature are commonly normalised with respect to the population sizes by presenting them as per X. In this case per 1,000 or 100,000 people.
Absolute number of crimes makes no sense and lacks context. In terms of display, as both KPI ranges are similar (3 vs 19) a common X and Y axis is possible with two different lines.
If you want to ...
Suppose you have a question like: "How does car weight affect miles per gallon (mpg)?"
Load and plot the "car data". In the first plot you can clearly see that there is a (more or less) linear relation between $weight$ and $mpg$.
Now you can ask: is there a difference in time? You can add a "dummy" for the years $\leq$ 1975 to ...
We just encode the categorical variable to some sort of numerical representation (like one-hot encoding)
The choice of representation matters, because it has to preserve the properties of a categorical variable: one-hot-encoding is a standard option, but directly encoding categorical values as integers is a mistake because it introduces order where there is ...
It was only a matter of transform string numbers in numerical numbers.
I did it by transforming each "non numeric" column in character and used the as.numeric().
The code looks like this now:
#Nomes das colunas
names(df) = 'Produçãox1'
names(df) = 'Produçãox2'
names(df) = 'Remuneraçãoy1'
names(df) = 'Remuneraçãoy2'
The average or median seem reasonable here. A boxplot might be a good choice of visualistion:
The y-axis could be your time dimension, and boxplot shows the normal distributions of differences, including the median value and outliers. You could then compare certain measurements against this. But it would of course depend on if you have enough data in your ...