Skip to content
This repository was archived by the owner on Jul 15, 2024. It is now read-only.
This repository was archived by the owner on Jul 15, 2024. It is now read-only.

Add league rounds diagram #197

@frantzheld

Description

@frantzheld

Describe the Feature
Add a diagram to show the developing of league ranking. See example below.

Screenshots
image

Python code

import requests
import pandas as pd

season = 2022
df = pd.DataFrame()

for i in range(14):
    url = 'https://api.weglide.org/v1/league/total/' + str(i) + '?name=DN&season=' + str(season)
    league = requests.get(url).json()
    
    club_names = [club['club']['name'] for club in league]
    points = [club['league_points'] for club in league]

    df2 = pd.DataFrame([points],columns=club_names)
    df = pd.concat([df,df2], ignore_index=True)
    
    
#%% Plot data
df.columns.name = 'Verein'
df.index.name = 'Runde'
clubs=['Hannoverscher Aero-Club','FSV Celle','LSV Stade','HVL Boberg','AC Hodenhagen','VfL Südheide']
df[clubs].plot(figsize=(12,8),markersize=10,grid=True,marker='.',title='Verlauf Regionalliga Nord')

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions