New graphs

This commit is contained in:
pietervdvn 2021-03-15 15:53:54 +01:00
parent f4a59d3a9e
commit a7ac662be2
31 changed files with 17 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 255 KiB

After

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 644 KiB

After

Width:  |  Height:  |  Size: 631 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 KiB

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

After

Width:  |  Height:  |  Size: 200 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 416 KiB

After

Width:  |  Height:  |  Size: 428 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 576 KiB

After

Width:  |  Height:  |  Size: 581 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 493 KiB

After

Width:  |  Height:  |  Size: 499 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 645 KiB

After

Width:  |  Height:  |  Size: 649 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 708 KiB

After

Width:  |  Height:  |  Size: 704 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 KiB

After

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 602 KiB

After

Width:  |  Height:  |  Size: 600 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 KiB

After

Width:  |  Height:  |  Size: 281 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 301 KiB

After

Width:  |  Height:  |  Size: 300 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 KiB

After

Width:  |  Height:  |  Size: 308 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 528 KiB

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 KiB

After

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 KiB

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 KiB

After

Width:  |  Height:  |  Size: 281 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 272 KiB

After

Width:  |  Height:  |  Size: 270 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 KiB

After

Width:  |  Height:  |  Size: 273 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 599 KiB

After

Width:  |  Height:  |  Size: 594 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 551 KiB

After

Width:  |  Height:  |  Size: 555 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 758 KiB

After

Width:  |  Height:  |  Size: 756 KiB

View file

@ -167,7 +167,7 @@ def create_theme_breakdown(stats, fileExtra="", cutoff=5):
return themes
def cumulative_changes_per(contents, index, subject, filenameextra="", cutoff=5, cumulative=True):
def cumulative_changes_per(contents, index, subject, filenameextra="", cutoff=5, cumulative=True, sort=True):
print("Creating graph about " + subject + filenameextra)
themes = Hist("date")
dates_per_theme = Hist("theme")
@ -179,7 +179,10 @@ def cumulative_changes_per(contents, index, subject, filenameextra="", cutoff=5,
dates_per_theme.add(th, row[0])
per_theme_count = list(zip(dates_per_theme.keys(), dates_per_theme.map(len)))
# PerThemeCount gives the most popular theme first
if sort == True:
per_theme_count.sort(key=lambda kv: kv[1], reverse=False)
elif sort is not None:
per_theme_count.sort(key=sort)
values_to_show = [] # (theme name, value to fill between - this is stacked, with the first layer to print last)
running_totals = None
other_total = 0
@ -228,7 +231,6 @@ def cumulative_changes_per(contents, index, subject, filenameextra="", cutoff=5,
if cumulative:
pyplot.fill_between(keys, kv[1], label=msg)
else:
print("Keys:"+str(keys)+" "+str(kv[1]))
pyplot.plot(keys, kv[1], label=msg)
if cumulative:
@ -253,7 +255,7 @@ def create_graphs(contents):
cumulative_changes_per(contents, 3, "theme", cutoff=10, cumulative=False)
cumulative_changes_per(contents, 1, "contributor", cutoff=15)
cumulative_changes_per(contents, 2, "language", cutoff=1)
cumulative_changes_per(contents, 4, "version number", cutoff=1)
cumulative_changes_per(contents, 4, "version number", cutoff=1, sort=lambda kv : kv[0])
cumulative_changes_per(contents, 8, "host", cutoff=1)
currentYear = datetime.now().year
@ -266,7 +268,8 @@ def create_graphs(contents):
cumulative_changes_per(contents_filtered, 3, "theme", extratext, cutoff=5, cumulative=False)
cumulative_changes_per(contents_filtered, 1, "contributor", extratext, cutoff=10)
cumulative_changes_per(contents_filtered, 2, "language", extratext, cutoff=1)
cumulative_changes_per(contents_filtered, 4, "version number", extratext, cutoff=1, cumulative=False)
cumulative_changes_per(contents_filtered, 4, "version number", extratext, cutoff=1, cumulative=False, sort=lambda kv : kv[0])
cumulative_changes_per(contents_filtered, 4, "version number", extratext, cutoff=1, sort=lambda kv : kv[0])
cumulative_changes_per(contents_filtered, 8, "host", extratext, cutoff=1)

View file

@ -2869,3 +2869,12 @@
"2021-03-12", "velosophe", "en", "bookcases", "MapComplete 0.5.9", 1, 4, "Adding data with #MapComplete for theme #bookcases", "mapcomplete.osm.be"
"2021-03-12", "velosophe", "en", "shops", "MapComplete 0.5.9", 0, 1, "Adding data with #MapComplete for theme #shops", "mapcomplete.osm.be"
"2021-03-13", "joost schouppe", "nl", "cyclofix", "MapComplete 0.5.9", 0, 2, "Adding data with #MapComplete for theme #cyclofix", "mapcomplete.osm.be"
"2021-03-13", "Pieter Vander Vennet", "en", "cyclofix", "MapComplete 0.5.9", 0, 1, "Adding data with #MapComplete for theme #cyclofix", "127.0.0.1:1234"
"2021-03-14", "joost schouppe", "en", "cyclofix", "MapComplete 0.5.9", 0, 1, "Adding data with #MapComplete for theme #cyclofix", "mapcomplete.osm.be"
"2021-03-14", "Koen Rijnsent", "en", "artworks", "MapComplete 0.5.9", 2, 4, "Adding data with #MapComplete for theme #artworks", "mapcomplete.osm.be"
"2021-03-14", "Pieter Vander Vennet", "nl", "speelplekken", "MapComplete 0.5.10", 0, 1, "Adding data with #MapComplete for theme #speelplekken", "127.0.0.1:1234"
"2021-03-14", "Pieter Vander Vennet", "nl", "speelplekken", "MapComplete 0.5.10", 0, 1, "Adding data with #MapComplete for theme #speelplekken", "pietervdvn.github.io"
"2021-03-14", "whturner", "en", "benches", "MapComplete 0.5.9", 4, 8, "Adding data with #MapComplete for theme #benches", "mapcomplete.osm.be"
"2021-03-14", "WinstonSmith", "en", "drinking_water", "MapComplete 0.5.9", 0, 1, "Adding data with #MapComplete for theme #drinking_water", "mapcomplete.osm.be"
"2021-03-15", "Pieter Nuytinck", "en", "bookcases", "MapComplete 0.5.10", 2, 4, "Adding data with #MapComplete for theme #bookcases", "pietervdvn.github.io"
"2021-03-15", "Technopolice_newBiE", "en", "surveillance", "MapComplete 0.5.5-unlocked", 68, 36, "Adding data with #MapComplete for theme #surveillance", "pietervdvn.github.io"

1 2020-07-05 Pieter Vander Vennet null null MapComplete 0.0.0 0 1 Beantwoorden van vragen met MapComplete voor vragenset #grb null
2869 2021-03-12 velosophe en bookcases MapComplete 0.5.9 1 4 Adding data with #MapComplete for theme #bookcases mapcomplete.osm.be
2870 2021-03-12 velosophe en shops MapComplete 0.5.9 0 1 Adding data with #MapComplete for theme #shops mapcomplete.osm.be
2871 2021-03-13 joost schouppe nl cyclofix MapComplete 0.5.9 0 2 Adding data with #MapComplete for theme #cyclofix mapcomplete.osm.be
2872 2021-03-13 Pieter Vander Vennet en cyclofix MapComplete 0.5.9 0 1 Adding data with #MapComplete for theme #cyclofix 127.0.0.1:1234
2873 2021-03-14 joost schouppe en cyclofix MapComplete 0.5.9 0 1 Adding data with #MapComplete for theme #cyclofix mapcomplete.osm.be
2874 2021-03-14 Koen Rijnsent en artworks MapComplete 0.5.9 2 4 Adding data with #MapComplete for theme #artworks mapcomplete.osm.be
2875 2021-03-14 Pieter Vander Vennet nl speelplekken MapComplete 0.5.10 0 1 Adding data with #MapComplete for theme #speelplekken 127.0.0.1:1234
2876 2021-03-14 Pieter Vander Vennet nl speelplekken MapComplete 0.5.10 0 1 Adding data with #MapComplete for theme #speelplekken pietervdvn.github.io
2877 2021-03-14 whturner en benches MapComplete 0.5.9 4 8 Adding data with #MapComplete for theme #benches mapcomplete.osm.be
2878 2021-03-14 WinstonSmith en drinking_water MapComplete 0.5.9 0 1 Adding data with #MapComplete for theme #drinking_water mapcomplete.osm.be
2879 2021-03-15 Pieter Nuytinck en bookcases MapComplete 0.5.10 2 4 Adding data with #MapComplete for theme #bookcases pietervdvn.github.io
2880 2021-03-15 Technopolice_newBiE en surveillance MapComplete 0.5.5-unlocked 68 36 Adding data with #MapComplete for theme #surveillance pietervdvn.github.io