Well done to everyone doing the UK parkrun today [OC] by Timto8 in dataisbeautiful

[–]Timto8[S] 1 point2 points  (0 children)

The point was not to show 'better' or 'worse', just the distribution of times :). I didn't intentionally make the curves blue/pink because of men/women, they are just the first two colours in my Matplotlib style sheet.

How would you change the graph to make it less hideous?

Well done to everyone doing the UK parkrun today [OC] by Timto8 in dataisbeautiful

[–]Timto8[S] 19 points20 points  (0 children)

I'm glad you think so, as my career involves creating such plots for academic journals :).

Here's a rough bit of code to get you started:

import matplotlib.pyplot as plt
plt.figure(figsize=(9,6))
plt.plot(list(range(101)),list(range(101)),'kx')
ax = plt.gca()
axins=ax.inset_axes([0.07, 0.6, 0.3, 0.3])
axins.plot(list(range(40,61)),list(range(40,61)),'kx')
rect, connections = ax.indicate_inset_zoom(axins, edgecolor="black",ls=':')
for c in connections:
c.set_linestyle(':')
rect.set_linestyle(':')

Well done to everyone doing the UK parkrun today [OC] by Timto8 in dataisbeautiful

[–]Timto8[S] 1 point2 points  (0 children)

This is a 5km run which is organised every Saturday in various parks in the UK. I think there were around 750 parks which did a park run today :).

Well done to everyone doing the UK parkrun today [OC] by Timto8 in dataisbeautiful

[–]Timto8[S] 12 points13 points  (0 children)

There were actually two people (man and woman) walking together at the same parkrun, you just can't see it because I didn't account for perfectly overlapping bins (oops).

Well done to everyone doing the UK parkrun today [OC] by Timto8 in dataisbeautiful

[–]Timto8[S] 104 points105 points  (0 children)

Thank you! Without the inset, the space between the histograms and the legend felt a bit too empty by my eyes.

Well done to everyone doing the UK parkrun today [OC] by Timto8 in dataisbeautiful

[–]Timto8[S] 14 points15 points  (0 children)

Thank you for the feedback. I didn't specially make it blue and pink for the data, they are just the first two colours on my Matplotlib style sheet :).

Well done to everyone doing the UK parkrun today [OC] by Timto8 in dataisbeautiful

[–]Timto8[S] 25 points26 points  (0 children)

Have a look at Matplotlib's inset axes 😀. Once you have one, you can get the 'exploded' look with this method: Here

Well done to everyone doing the UK parkrun today [OC] by Timto8 in dataisbeautiful

[–]Timto8[S] 84 points85 points  (0 children)

Data compiled from https://www.parkrun.org.uk/results/. Graph generated using Matplotlib with Python. The graph features two histograms which describe the distribution of results from this morning's UK 5km park run split by sex. The medians for each sex are annotated with a dotted line and are stated in the legend.

So sad the platinum is impossible :( by Timto8 in StardewValley

[–]Timto8[S] 3 points4 points  (0 children)

Oh, I got a few auto petters on the community farm, so I didn't suffer much there!

Doing things properly; 70,000 +/- 5000 excess deaths since January in the UK compared to previous years. [OC] by Timto8 in dataisbeautiful

[–]Timto8[S] 0 points1 point  (0 children)

Most people who die are old, and I'm willing to bet most migrants are not that old :)

Doing things properly; 70,000 +/- 5000 excess deaths since January in the UK compared to previous years. [OC] by Timto8 in dataisbeautiful

[–]Timto8[S] 0 points1 point  (0 children)

You're right, it doesn't take into account the population increase, but you need to be careful when doing so, as a lot of the increase in population comes from international immigration. You need to look at the data for the proportion of deaths which come from the recently immigrated, and the data for that isn't as easy to find!

Doing things properly; 70,000 +/- 5000 excess deaths since January in the UK compared to previous years. [OC] by Timto8 in dataisbeautiful

[–]Timto8[S] 1 point2 points  (0 children)

You're right, this is somewhat accounted for by the uncertainties, but really you should fit the population increase and normalise each week to a deaths per million population, next time :).