Last active
June 6, 2019 13:46
-
-
Save kerel-fs/d8f14731cbe4ac8e6a016c1518f8c0ad to your computer and use it in GitHub Desktop.
Dannstadter Vergleichsfliegen 2019
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ID | CALL | CN | TYPE | HANDICAP | NAME | |
---|---|---|---|---|---|---|
FLRDF0E4E | D-0553 | 2A | Std. Libelle | 98 | Felix Maier | |
FLRDD93E8 | D-7826 | 4P | LS 4 | 104 | M.Laubender & M.Engisch | |
FLRDDB0CD | D-0894 | 4R | LS 4 | 104 | R.Fürderer & J.Medic | |
FLRDD9641 | D-0266 | 66 | ASK 13 | 79 | K.H.Müller & K.Müller | |
FLR3F0487 | D-9200 | 7J | LS 7 WL | 107 | Ch.Müller & J.Kiefer | |
FLRDDC010 | D-1372 | 7S | DG 300 | 105 | Juli Goll | |
FLRDD92E3 | D-0002 | CH | LS 7 WL | 107 | R.Hähndel & G.Sturm | |
FLRDD8443 | D-8568 | CL | ASK 21 | 92 | Team K.Leitner/S.Lorenz/LSeitz/Y.Strickler | |
FLRDDA8A8 | D-3693 | I | ASW-15 | 97 | Mika Zeyen | |
FLRDF1045 | D-5549 | IH | LS 4 | 104 | Frank Donnermeyer | |
FLRDDA30B | D-0914 | JF | Std. Libelle | 98 | Jana Schmidt | |
FLR0D9206 | D-9206 | JO | Ka 6CR | 82 | Wolfgang Zeyen | |
FLR3F05B0 | D-9497 | KT | Std. Cirrus | 99 | Stefan Schneider | |
FLRDDAF16 | D-8649 | R9 | LS 4 | 104 | A.Marcks & S.Gieß | |
FLRDD9266 | D-3717 | RP | LS 1 f | 100 | Sophie Müller | |
FLRDD51FF | D-0141 | S1 | Std. Libelle | 99 | Johannes Flieger | |
FLRDDB2CF | D-9413 | SM | LS 1 f Neo | 101 | Jan Bischoff | |
FLRDDD9AB | D-4891 | UB | ASW 15 | 97 | Christoph Kauf | |
FLRDDD820 | D-4621 | V1 | SB 5 E | 88 | Rene Kernbach | |
FLRDDE801 | D-6944 | W | Std. Libelle | 98 | Steffen Rogoll | |
FLRDDA30B | D-0914 | X4 | LS 4 | 104 | Fabian Pascal Schmidt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ID | CALL | CN | TYPE | HANDICAP | NAME | |
---|---|---|---|---|---|---|
FLRDD9C14 | 04 | Glasflugel 304 | 110 | Stephan Schnell | ||
FLR3A1FFF | 1G | Ventus 2 | 114 | Henrik Bieler | ||
ICA3ECBFF | D-KSFF | 63 | ASG 32Mi | 114 | Frank Fröhlich & M.Dupont & W.Decker & A.-L.Ludwig | |
FLRD004B2 | AG | JS 3-18m J | 121 | Bernd Hubka | ||
FLR3ED542 | D-KVSK | AI | Ventus bT/15m | 110 | Stefan Kuse | |
FLRDD9A37 | D-0274 | C1 | Ventus 2 | 114 | Peter Lutz | |
FLRDDA83F | D-6508 | DL | Duo Discus | 110 | Team D. Sailler & M.Grohe & A.Schottmüller & L. Hildebrandt | |
FLRDD9C1D | DR | Ventus 2 | 114 | Marc Schick | ||
FLRDDFE77 | EL | DG 200/17 | 109 | Alfred Perlich | ||
FLRDDA260 | D-KLEO | EO | LS 8 18m T | 114 | Jan Hertrich | |
FLRDD7295 | GIU | DG 1000T/20m | 110 | Team J.Schliephake & V.Schliephake & M.Ott & F.Müller | ||
FLRDDBFDE | D-6233 | GT | ASW 28 | 108 | Jochen Kuhn | |
FLRDDA36C | KB | Ventus bT/15m | 110 | Sebastian Bethge | ||
FLRDD9FBB | D-1524 | KD | Duo Discus | 110 | J.Schmidt & H.Rupp | |
FLRDD9612 | D-3976 | L8 | LS8 15 m | 108 | D.Lott & K.Goll | |
FLRDDF16B | LT | ASG 29 15m | 114 | Laurenz Theisinger | ||
FLRDD876F | D-0598 | MR | Kestrel 17m | 110 | M.Wallmer & L.Krause | |
RI | DG 1000T/20m | 110 | N.Kratz & P.Sobucki | |||
FLRDF0FD3 | D-3571 | SI | Ls 8 15m Neo | 108 | Johannes Dibbern | |
FLRDDF16B | T | JS 3-15m | 116 | Georg Theisinger | ||
FLRDDA79C | D-4169 | XL | Duo Discus | 110 | Team S.Theis & C.Theis & V.Stutzer | |
FLRDD99BC | D 8556 | XR | Glasflugel 304 | 110 | Juergen Sottung | |
FLRDD8713 | D-5574 | XXX | Duo Discus XL | 111 | Team A.Boml & H.Kreuzer & M.Deichmann | |
FLRDDEBCB | D-KSDG | YH | DG 1000T/20m | 110 | Team M.Althaus & M.Schmitt & M.Karl & J.Thomas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import sys | |
import logging | |
import requests | |
from bs4 import BeautifulSoup | |
soaringspot_pilots_url = "https://www.soaringspot.com/en_gb/{}/pilots" | |
def get_competitors(competition_name): | |
r = requests.get(soaringspot_pilots_url.format(competition_name)) | |
r.raise_for_status() | |
soup = BeautifulSoup(r.text, 'html.parser') | |
table = soup.find('table') | |
table_rows = table.find_all('tr') | |
competitors = [] | |
for tr in table_rows[1:]: | |
td = tr.find_all('td') | |
row = [i.text for i in td] | |
competitors.append({'CN': row[0], | |
'Contestant': row[1], | |
'Club': row[2], | |
'Glider': row[3], | |
'Class': row [4], | |
'Handicap': row[5]}) | |
return competitors | |
if __name__ == '__main__': | |
parser = argparse.ArgumentParser(description="Fetch the list of competitors of a given competition" | |
"hosted on soaringspot.com and generate an ogn-web-viewer-compatible" | |
"tracking filter file for the selected class.") | |
parser.add_argument('competition_name', type=str, help="Name of the competition as given in the soaringspot-URLs.") | |
parser.add_argument('selected_class', type=str, help="Competition class the list should be compiled for, e.g.: Club") | |
parser.add_argument('--sort-by', metavar="KEY", type=str, help="Sort by the given KEY, e.g.: CN") | |
args = parser.parse_args() | |
try: | |
competitors = get_competitors(args.competition_name) | |
except requests.exceptions.HTTPError: | |
logging.error("Couldn't fetch the competitors list from soaringspot.") | |
sys.exit(-1) | |
classes = set([c['Class'] for c in competitors]) | |
if not args.selected_class in classes: | |
logging.error('Selected competition class not found, only the following classes are available: {}'.format(classes)) | |
sys.exit(-1) | |
if args.sort_by: | |
competitors = sorted(competitors, key= lambda k: k[args.sort_by]) | |
print("ID,CALL,CN,TYPE,HANDICAP,NAME") | |
for c in competitors: | |
if c['Class'] != args.selected_class: | |
continue | |
print("{},{},{},{},{},{}".format("", "", c['CN'], c['Glider'], c['Handicap'], c['Contestant'])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import requests | |
import pandas as pd | |
# Load vergleichsfliegen filter list for Flarm-IDs | |
filter_list_url = "http://helpdesk.ssv-lu.de/vergleichsfliegen/ogn/competitors_club.php" | |
pilots = pd.read_csv(filter_list_url, keep_default_na=False, index_col=2) | |
pilots['device_id'] = pilots['ID'].apply(lambda k: k[2:].upper()) | |
# NOTE: The following step requires the previous creation of the file with: | |
# ./fetch_soaringspot_competitors_list.py --sort-by CN 34-dannstadter-vergleichsfliegen-ludwigshafen-2019 Club > competitors_club_soaringspot.lst | |
# Load soaringspot competitor list for pilot names and handicap | |
soaringspot = pd.read_csv("competitors_club_soaringspot.lst", keep_default_na=False, index_col=2) | |
soaringspot = soaringspot.drop(['ID', 'CALL'], axis=1) | |
m = pd.merge(soaringspot, pilots['device_id'], on="CN", how="left") | |
# Manually add missing or wrong IDs | |
m.at['JO', 'device_id'] = "0D9206" # source: IGC file 4.WT | |
m.at['7S', 'device_id'] = "DDC010" # source: OGN-DDB | |
m.at['X4', 'device_id'] = "DDA84A" # source: OGN-DDB | |
# Load DDB for the registration | |
r = requests.get("http://ddb.glidernet.org/download/?j=1") | |
ddb_devices = pd.DataFrame(r.json()['devices']) | |
m = pd.merge(m.reset_index(), ddb_devices[['device_id', 'registration']], on='device_id', how='left') | |
m = m.set_index('CN') | |
m.at['7J', 'registration'] = "D-9200" # source: 4.WT, OLC | |
m.at['IH', 'registration'] = "D-5549" # source: 4.WT, OLC | |
m.at['JO', 'registration'] = "D-9206" # source: 4.WT, OLC | |
m.at['S1', 'registration'] = "D-0141" # source: 3.WT, OLC | |
m.at['SM', 'registration'] = "D-9413" # source: OLC, https://www.onlinecontest.org/olc-3.0/gliding/flightinfo.html?dsId=7099455 | |
# Generate the filter list for ogn-web-viewer | |
print("ID,CALL,CN,TYPE,HANDICAP,NAME") | |
for k,v in m.iterrows(): | |
print("FLR{},{},{},{},{},{}".format(v['device_id'], v['registration'], k, v['TYPE'], v['HANDICAP'], v['NAME'])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import requests\n", | |
"import pandas as pd" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# Load vergleichsfliegen filter list for Flarm-IDs\n", | |
"filter_list_url = \"http://helpdesk.ssv-lu.de/vergleichsfliegen/ogn/competitors_mixed.php\"\n", | |
"\n", | |
"pilots = pd.read_csv(filter_list_url, keep_default_na=False, index_col=2)\n", | |
"pilots['device_id'] = pilots['ID'].apply(lambda k: k[2:].upper())" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>ID</th>\n", | |
" <th>CALL</th>\n", | |
" <th>TYPE</th>\n", | |
" <th>device_id</th>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>CN</th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>GT</th>\n", | |
" <td>06DDBFDE</td>\n", | |
" <td>GT</td>\n", | |
" <td>ASW 28</td>\n", | |
" <td>DDBFDE</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>63</th>\n", | |
" <td>063ECBFF</td>\n", | |
" <td>63</td>\n", | |
" <td>ASG 32 Mi</td>\n", | |
" <td>3ECBFF</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>SI</th>\n", | |
" <td>06DF0FD3</td>\n", | |
" <td>SI</td>\n", | |
" <td>LS 8</td>\n", | |
" <td>DF0FD3</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>D3</th>\n", | |
" <td>06DF107B</td>\n", | |
" <td>D3</td>\n", | |
" <td>HPH 304 S Shark</td>\n", | |
" <td>DF107B</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>EL</th>\n", | |
" <td>06DDFE77</td>\n", | |
" <td>EL</td>\n", | |
" <td>DG-200 17m</td>\n", | |
" <td>DDFE77</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>04</th>\n", | |
" <td>06DD9C14</td>\n", | |
" <td>04</td>\n", | |
" <td>H 304</td>\n", | |
" <td>DD9C14</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>KB</th>\n", | |
" <td>07DDA36C</td>\n", | |
" <td>KB</td>\n", | |
" <td>Ventus cT 15m</td>\n", | |
" <td>DDA36C</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>C1</th>\n", | |
" <td>06DD9A37</td>\n", | |
" <td>C1</td>\n", | |
" <td>Ventus 2</td>\n", | |
" <td>DD9A37</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>YH</th>\n", | |
" <td>06DDEBCB</td>\n", | |
" <td>YH</td>\n", | |
" <td>DG-1000 T</td>\n", | |
" <td>DDEBCB</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>DL</th>\n", | |
" <td>06DDA83F</td>\n", | |
" <td>DL</td>\n", | |
" <td>Duo Discus</td>\n", | |
" <td>DDA83F</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>KD</th>\n", | |
" <td>06DDA79C</td>\n", | |
" <td>KD</td>\n", | |
" <td>Duo Discus</td>\n", | |
" <td>DDA79C</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>XXX</th>\n", | |
" <td>06DD8713</td>\n", | |
" <td>XXX</td>\n", | |
" <td>Duo Discus XL</td>\n", | |
" <td>DD8713</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>LT</th>\n", | |
" <td>06DDF16B</td>\n", | |
" <td>LT</td>\n", | |
" <td>ASG 29 15m</td>\n", | |
" <td>DDF16B</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>EO</th>\n", | |
" <td></td>\n", | |
" <td>EO</td>\n", | |
" <td>LS 8 18m</td>\n", | |
" <td></td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>AG</th>\n", | |
" <td>06D004B2</td>\n", | |
" <td>AG</td>\n", | |
" <td>JS3 15m</td>\n", | |
" <td>D004B2</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>XL</th>\n", | |
" <td>06DDA79C</td>\n", | |
" <td>XL</td>\n", | |
" <td>Duo Discus</td>\n", | |
" <td>DDA79C</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>L8</th>\n", | |
" <td>06DD9612</td>\n", | |
" <td>L8</td>\n", | |
" <td>LS 8</td>\n", | |
" <td>DD9612</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>AI</th>\n", | |
" <td>063ED542</td>\n", | |
" <td>AI</td>\n", | |
" <td>Ventus cT 15m</td>\n", | |
" <td>3ED542</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>DR</th>\n", | |
" <td>06DD9C1D</td>\n", | |
" <td>DR</td>\n", | |
" <td>Ventus 2c 15m</td>\n", | |
" <td>DD9C1D</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1G</th>\n", | |
" <td>063A1FFF</td>\n", | |
" <td>1G</td>\n", | |
" <td>Ventus 2b 15m</td>\n", | |
" <td>3A1FFF</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>GIU</th>\n", | |
" <td>06DD7295</td>\n", | |
" <td>GIU</td>\n", | |
" <td>DG-1000 T</td>\n", | |
" <td>DD7295</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>MR</th>\n", | |
" <td>06DD876F</td>\n", | |
" <td>MR</td>\n", | |
" <td>Kestrel 17m</td>\n", | |
" <td>DD876F</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>T</th>\n", | |
" <td>06DDF16B</td>\n", | |
" <td>T</td>\n", | |
" <td>JS3 15m</td>\n", | |
" <td>DDF16B</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" ID CALL TYPE device_id\n", | |
"CN \n", | |
"GT 06DDBFDE GT ASW 28 DDBFDE\n", | |
"63 063ECBFF 63 ASG 32 Mi 3ECBFF\n", | |
" SI 06DF0FD3 SI LS 8 DF0FD3\n", | |
"D3 06DF107B D3 HPH 304 S Shark DF107B\n", | |
" EL 06DDFE77 EL DG-200 17m DDFE77\n", | |
"04 06DD9C14 04 H 304 DD9C14\n", | |
"KB 07DDA36C KB Ventus cT 15m DDA36C\n", | |
"C1 06DD9A37 C1 Ventus 2 DD9A37\n", | |
"YH 06DDEBCB YH DG-1000 T DDEBCB\n", | |
"DL 06DDA83F DL Duo Discus DDA83F\n", | |
"KD 06DDA79C KD Duo Discus DDA79C\n", | |
"XXX 06DD8713 XXX Duo Discus XL DD8713\n", | |
"LT 06DDF16B LT ASG 29 15m DDF16B\n", | |
"EO EO LS 8 18m \n", | |
"AG 06D004B2 AG JS3 15m D004B2\n", | |
"XL 06DDA79C XL Duo Discus DDA79C\n", | |
"L8 06DD9612 L8 LS 8 DD9612\n", | |
"AI 063ED542 AI Ventus cT 15m 3ED542\n", | |
"DR 06DD9C1D DR Ventus 2c 15m DD9C1D\n", | |
"1G 063A1FFF 1G Ventus 2b 15m 3A1FFF\n", | |
"GIU 06DD7295 GIU DG-1000 T DD7295\n", | |
"MR 06DD876F MR Kestrel 17m DD876F\n", | |
"T 06DDF16B T JS3 15m DDF16B" | |
] | |
}, | |
"execution_count": 3, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"pilots" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>TYPE</th>\n", | |
" <th>HANDICAP</th>\n", | |
" <th>NAME</th>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>CN</th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>04</th>\n", | |
" <td>Glasflugel 304</td>\n", | |
" <td>110</td>\n", | |
" <td>Stephan Schnell</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1G</th>\n", | |
" <td>Ventus 2</td>\n", | |
" <td>114</td>\n", | |
" <td>Henrik Bieler</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>63</th>\n", | |
" <td>ASG 32Mi</td>\n", | |
" <td>114</td>\n", | |
" <td>Frank Fröhlich & M.Dupont & W.Decker & A.-L.Lu...</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>AG</th>\n", | |
" <td>JS 3-18m J</td>\n", | |
" <td>121</td>\n", | |
" <td>Bernd Hubka</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>AI</th>\n", | |
" <td>Ventus bT/15m</td>\n", | |
" <td>110</td>\n", | |
" <td>Stefan Kuse</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>C1</th>\n", | |
" <td>Ventus 2</td>\n", | |
" <td>114</td>\n", | |
" <td>Peter Lutz</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>DL</th>\n", | |
" <td>Duo Discus</td>\n", | |
" <td>110</td>\n", | |
" <td>Team D. Sailler & M.Grohe & A.Schottmüller & L...</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>DR</th>\n", | |
" <td>Ventus 2</td>\n", | |
" <td>114</td>\n", | |
" <td>Marc Schick</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>EL</th>\n", | |
" <td>DG 200/17</td>\n", | |
" <td>109</td>\n", | |
" <td>Alfred Perlich</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>EO</th>\n", | |
" <td>LS 8 18m T</td>\n", | |
" <td>114</td>\n", | |
" <td>Jan Hertrich</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>GIU</th>\n", | |
" <td>DG 1000T/20m</td>\n", | |
" <td>110</td>\n", | |
" <td>Team J.Schliephake & V.Schliephake & M.Ott & F...</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>GT</th>\n", | |
" <td>ASW 28</td>\n", | |
" <td>108</td>\n", | |
" <td>Jochen Kuhn</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>KB</th>\n", | |
" <td>Ventus bT/15m</td>\n", | |
" <td>110</td>\n", | |
" <td>Sebastian Bethge</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>KD</th>\n", | |
" <td>Duo Discus</td>\n", | |
" <td>110</td>\n", | |
" <td>J.Schmidt & H.Rupp</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>L8</th>\n", | |
" <td>LS8 15 m</td>\n", | |
" <td>108</td>\n", | |
" <td>D.Lott & K.Goll</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>LT</th>\n", | |
" <td>ASG 29 15m</td>\n", | |
" <td>114</td>\n", | |
" <td>Laurenz Theisinger</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>MR</th>\n", | |
" <td>Kestrel 17m</td>\n", | |
" <td>110</td>\n", | |
" <td>M.Wallmer & L.Krause</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>RI</th>\n", | |
" <td>DG 1000T/20m</td>\n", | |
" <td>110</td>\n", | |
" <td>N.Kratz & P.Sobucki</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>SI</th>\n", | |
" <td>Ls 8 15m Neo</td>\n", | |
" <td>108</td>\n", | |
" <td>Johannes Dibbern</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>T</th>\n", | |
" <td>JS 3-15m</td>\n", | |
" <td>116</td>\n", | |
" <td>Georg Theisinger</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>XL</th>\n", | |
" <td>Duo Discus</td>\n", | |
" <td>110</td>\n", | |
" <td>Team S.Theis & C.Theis & V.Stutzer</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>XR</th>\n", | |
" <td>Glasflugel 304</td>\n", | |
" <td>110</td>\n", | |
" <td>Juergen Sottung</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>XXX</th>\n", | |
" <td>Duo Discus XL</td>\n", | |
" <td>111</td>\n", | |
" <td>Team A.Boml & H.Kreuzer & M.Deichmann</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>YH</th>\n", | |
" <td>DG 1000T/20m</td>\n", | |
" <td>110</td>\n", | |
" <td>Team M.Althaus & M.Schmitt & M.Karl & J.Thomas</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" TYPE HANDICAP \\\n", | |
"CN \n", | |
"04 Glasflugel 304 110 \n", | |
"1G Ventus 2 114 \n", | |
"63 ASG 32Mi 114 \n", | |
"AG JS 3-18m J 121 \n", | |
"AI Ventus bT/15m 110 \n", | |
"C1 Ventus 2 114 \n", | |
"DL Duo Discus 110 \n", | |
"DR Ventus 2 114 \n", | |
"EL DG 200/17 109 \n", | |
"EO LS 8 18m T 114 \n", | |
"GIU DG 1000T/20m 110 \n", | |
"GT ASW 28 108 \n", | |
"KB Ventus bT/15m 110 \n", | |
"KD Duo Discus 110 \n", | |
"L8 LS8 15 m 108 \n", | |
"LT ASG 29 15m 114 \n", | |
"MR Kestrel 17m 110 \n", | |
"RI DG 1000T/20m 110 \n", | |
"SI Ls 8 15m Neo 108 \n", | |
"T JS 3-15m 116 \n", | |
"XL Duo Discus 110 \n", | |
"XR Glasflugel 304 110 \n", | |
"XXX Duo Discus XL 111 \n", | |
"YH DG 1000T/20m 110 \n", | |
"\n", | |
" NAME \n", | |
"CN \n", | |
"04 Stephan Schnell \n", | |
"1G Henrik Bieler \n", | |
"63 Frank Fröhlich & M.Dupont & W.Decker & A.-L.Lu... \n", | |
"AG Bernd Hubka \n", | |
"AI Stefan Kuse \n", | |
"C1 Peter Lutz \n", | |
"DL Team D. Sailler & M.Grohe & A.Schottmüller & L... \n", | |
"DR Marc Schick \n", | |
"EL Alfred Perlich \n", | |
"EO Jan Hertrich \n", | |
"GIU Team J.Schliephake & V.Schliephake & M.Ott & F... \n", | |
"GT Jochen Kuhn \n", | |
"KB Sebastian Bethge \n", | |
"KD J.Schmidt & H.Rupp \n", | |
"L8 D.Lott & K.Goll \n", | |
"LT Laurenz Theisinger \n", | |
"MR M.Wallmer & L.Krause \n", | |
"RI N.Kratz & P.Sobucki \n", | |
"SI Johannes Dibbern \n", | |
"T Georg Theisinger \n", | |
"XL Team S.Theis & C.Theis & V.Stutzer \n", | |
"XR Juergen Sottung \n", | |
"XXX Team A.Boml & H.Kreuzer & M.Deichmann \n", | |
"YH Team M.Althaus & M.Schmitt & M.Karl & J.Thomas " | |
] | |
}, | |
"execution_count": 4, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# NOTE: The following step requires the previous creation of the file with:\n", | |
"# ./fetch_soaringspot_competitors_list.py --sort-by CN 34-dannstadter-vergleichsfliegen-ludwigshafen-2019 Mixed > competitors_mixed_soaringspot.lst\n", | |
"# Load soaringspot competitor list for pilot names and handicap\n", | |
"soaringspot = pd.read_csv(\"../lst/competitors_mixed_soaringspot.lst\", keep_default_na=False, index_col=2)\n", | |
"soaringspot = soaringspot.drop(['ID', 'CALL'], axis=1)\n", | |
"soaringspot" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>TYPE</th>\n", | |
" <th>HANDICAP</th>\n", | |
" <th>NAME</th>\n", | |
" <th>device_id</th>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>CN</th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>04</th>\n", | |
" <td>Glasflugel 304</td>\n", | |
" <td>110</td>\n", | |
" <td>Stephan Schnell</td>\n", | |
" <td>DD9C14</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1G</th>\n", | |
" <td>Ventus 2</td>\n", | |
" <td>114</td>\n", | |
" <td>Henrik Bieler</td>\n", | |
" <td>3A1FFF</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>63</th>\n", | |
" <td>ASG 32Mi</td>\n", | |
" <td>114</td>\n", | |
" <td>Frank Fröhlich & M.Dupont & W.Decker & A.-L.Lu...</td>\n", | |
" <td>3ECBFF</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>AG</th>\n", | |
" <td>JS 3-18m J</td>\n", | |
" <td>121</td>\n", | |
" <td>Bernd Hubka</td>\n", | |
" <td>D004B2</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>AI</th>\n", | |
" <td>Ventus bT/15m</td>\n", | |
" <td>110</td>\n", | |
" <td>Stefan Kuse</td>\n", | |
" <td>3ED542</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>C1</th>\n", | |
" <td>Ventus 2</td>\n", | |
" <td>114</td>\n", | |
" <td>Peter Lutz</td>\n", | |
" <td>DD9A37</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>DL</th>\n", | |
" <td>Duo Discus</td>\n", | |
" <td>110</td>\n", | |
" <td>Team D. Sailler & M.Grohe & A.Schottmüller & L...</td>\n", | |
" <td>DDA83F</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>DR</th>\n", | |
" <td>Ventus 2</td>\n", | |
" <td>114</td>\n", | |
" <td>Marc Schick</td>\n", | |
" <td>DD9C1D</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>EL</th>\n", | |
" <td>DG 200/17</td>\n", | |
" <td>109</td>\n", | |
" <td>Alfred Perlich</td>\n", | |
" <td>NaN</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>EO</th>\n", | |
" <td>LS 8 18m T</td>\n", | |
" <td>114</td>\n", | |
" <td>Jan Hertrich</td>\n", | |
" <td></td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>GIU</th>\n", | |
" <td>DG 1000T/20m</td>\n", | |
" <td>110</td>\n", | |
" <td>Team J.Schliephake & V.Schliephake & M.Ott & F...</td>\n", | |
" <td>DD7295</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>GT</th>\n", | |
" <td>ASW 28</td>\n", | |
" <td>108</td>\n", | |
" <td>Jochen Kuhn</td>\n", | |
" <td>DDBFDE</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>KB</th>\n", | |
" <td>Ventus bT/15m</td>\n", | |
" <td>110</td>\n", | |
" <td>Sebastian Bethge</td>\n", | |
" <td>DDA36C</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>KD</th>\n", | |
" <td>Duo Discus</td>\n", | |
" <td>110</td>\n", | |
" <td>J.Schmidt & H.Rupp</td>\n", | |
" <td>DDA79C</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>L8</th>\n", | |
" <td>LS8 15 m</td>\n", | |
" <td>108</td>\n", | |
" <td>D.Lott & K.Goll</td>\n", | |
" <td>DD9612</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>LT</th>\n", | |
" <td>ASG 29 15m</td>\n", | |
" <td>114</td>\n", | |
" <td>Laurenz Theisinger</td>\n", | |
" <td>DDF16B</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>MR</th>\n", | |
" <td>Kestrel 17m</td>\n", | |
" <td>110</td>\n", | |
" <td>M.Wallmer & L.Krause</td>\n", | |
" <td>DD876F</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>RI</th>\n", | |
" <td>DG 1000T/20m</td>\n", | |
" <td>110</td>\n", | |
" <td>N.Kratz & P.Sobucki</td>\n", | |
" <td>NaN</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>SI</th>\n", | |
" <td>Ls 8 15m Neo</td>\n", | |
" <td>108</td>\n", | |
" <td>Johannes Dibbern</td>\n", | |
" <td>NaN</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>T</th>\n", | |
" <td>JS 3-15m</td>\n", | |
" <td>116</td>\n", | |
" <td>Georg Theisinger</td>\n", | |
" <td>DDF16B</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>XL</th>\n", | |
" <td>Duo Discus</td>\n", | |
" <td>110</td>\n", | |
" <td>Team S.Theis & C.Theis & V.Stutzer</td>\n", | |
" <td>DDA79C</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>XR</th>\n", | |
" <td>Glasflugel 304</td>\n", | |
" <td>110</td>\n", | |
" <td>Juergen Sottung</td>\n", | |
" <td>NaN</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>XXX</th>\n", | |
" <td>Duo Discus XL</td>\n", | |
" <td>111</td>\n", | |
" <td>Team A.Boml & H.Kreuzer & M.Deichmann</td>\n", | |
" <td>DD8713</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>YH</th>\n", | |
" <td>DG 1000T/20m</td>\n", | |
" <td>110</td>\n", | |
" <td>Team M.Althaus & M.Schmitt & M.Karl & J.Thomas</td>\n", | |
" <td>DDEBCB</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" TYPE HANDICAP \\\n", | |
"CN \n", | |
"04 Glasflugel 304 110 \n", | |
"1G Ventus 2 114 \n", | |
"63 ASG 32Mi 114 \n", | |
"AG JS 3-18m J 121 \n", | |
"AI Ventus bT/15m 110 \n", | |
"C1 Ventus 2 114 \n", | |
"DL Duo Discus 110 \n", | |
"DR Ventus 2 114 \n", | |
"EL DG 200/17 109 \n", | |
"EO LS 8 18m T 114 \n", | |
"GIU DG 1000T/20m 110 \n", | |
"GT ASW 28 108 \n", | |
"KB Ventus bT/15m 110 \n", | |
"KD Duo Discus 110 \n", | |
"L8 LS8 15 m 108 \n", | |
"LT ASG 29 15m 114 \n", | |
"MR Kestrel 17m 110 \n", | |
"RI DG 1000T/20m 110 \n", | |
"SI Ls 8 15m Neo 108 \n", | |
"T JS 3-15m 116 \n", | |
"XL Duo Discus 110 \n", | |
"XR Glasflugel 304 110 \n", | |
"XXX Duo Discus XL 111 \n", | |
"YH DG 1000T/20m 110 \n", | |
"\n", | |
" NAME device_id \n", | |
"CN \n", | |
"04 Stephan Schnell DD9C14 \n", | |
"1G Henrik Bieler 3A1FFF \n", | |
"63 Frank Fröhlich & M.Dupont & W.Decker & A.-L.Lu... 3ECBFF \n", | |
"AG Bernd Hubka D004B2 \n", | |
"AI Stefan Kuse 3ED542 \n", | |
"C1 Peter Lutz DD9A37 \n", | |
"DL Team D. Sailler & M.Grohe & A.Schottmüller & L... DDA83F \n", | |
"DR Marc Schick DD9C1D \n", | |
"EL Alfred Perlich NaN \n", | |
"EO Jan Hertrich \n", | |
"GIU Team J.Schliephake & V.Schliephake & M.Ott & F... DD7295 \n", | |
"GT Jochen Kuhn DDBFDE \n", | |
"KB Sebastian Bethge DDA36C \n", | |
"KD J.Schmidt & H.Rupp DDA79C \n", | |
"L8 D.Lott & K.Goll DD9612 \n", | |
"LT Laurenz Theisinger DDF16B \n", | |
"MR M.Wallmer & L.Krause DD876F \n", | |
"RI N.Kratz & P.Sobucki NaN \n", | |
"SI Johannes Dibbern NaN \n", | |
"T Georg Theisinger DDF16B \n", | |
"XL Team S.Theis & C.Theis & V.Stutzer DDA79C \n", | |
"XR Juergen Sottung NaN \n", | |
"XXX Team A.Boml & H.Kreuzer & M.Deichmann DD8713 \n", | |
"YH Team M.Althaus & M.Schmitt & M.Karl & J.Thomas DDEBCB " | |
] | |
}, | |
"execution_count": 5, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"m = pd.merge(soaringspot, pilots['device_id'], on=\"CN\", how=\"left\")\n", | |
"m" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>TYPE</th>\n", | |
" <th>HANDICAP</th>\n", | |
" <th>NAME</th>\n", | |
" <th>device_id</th>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>CN</th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>1G</th>\n", | |
" <td>Ventus 2</td>\n", | |
" <td>114</td>\n", | |
" <td>Henrik Bieler</td>\n", | |
" <td>3A1FFF</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>63</th>\n", | |
" <td>ASG 32Mi</td>\n", | |
" <td>114</td>\n", | |
" <td>Frank Fröhlich & M.Dupont & W.Decker & A.-L.Lu...</td>\n", | |
" <td>3ECBFF</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>AI</th>\n", | |
" <td>Ventus bT/15m</td>\n", | |
" <td>110</td>\n", | |
" <td>Stefan Kuse</td>\n", | |
" <td>3ED542</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>AG</th>\n", | |
" <td>JS 3-18m J</td>\n", | |
" <td>121</td>\n", | |
" <td>Bernd Hubka</td>\n", | |
" <td>D004B2</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>GIU</th>\n", | |
" <td>DG 1000T/20m</td>\n", | |
" <td>110</td>\n", | |
" <td>Team J.Schliephake & V.Schliephake & M.Ott & F...</td>\n", | |
" <td>DD7295</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>XXX</th>\n", | |
" <td>Duo Discus XL</td>\n", | |
" <td>111</td>\n", | |
" <td>Team A.Boml & H.Kreuzer & M.Deichmann</td>\n", | |
" <td>DD8713</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>MR</th>\n", | |
" <td>Kestrel 17m</td>\n", | |
" <td>110</td>\n", | |
" <td>M.Wallmer & L.Krause</td>\n", | |
" <td>DD876F</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>L8</th>\n", | |
" <td>LS8 15 m</td>\n", | |
" <td>108</td>\n", | |
" <td>D.Lott & K.Goll</td>\n", | |
" <td>DD9612</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>XR</th>\n", | |
" <td>Glasflugel 304</td>\n", | |
" <td>110</td>\n", | |
" <td>Juergen Sottung</td>\n", | |
" <td>DD99BC</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>C1</th>\n", | |
" <td>Ventus 2</td>\n", | |
" <td>114</td>\n", | |
" <td>Peter Lutz</td>\n", | |
" <td>DD9A37</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>04</th>\n", | |
" <td>Glasflugel 304</td>\n", | |
" <td>110</td>\n", | |
" <td>Stephan Schnell</td>\n", | |
" <td>DD9C14</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>DR</th>\n", | |
" <td>Ventus 2</td>\n", | |
" <td>114</td>\n", | |
" <td>Marc Schick</td>\n", | |
" <td>DD9C1D</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>KD</th>\n", | |
" <td>Duo Discus</td>\n", | |
" <td>110</td>\n", | |
" <td>J.Schmidt & H.Rupp</td>\n", | |
" <td>DD9FBB</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>EO</th>\n", | |
" <td>LS 8 18m T</td>\n", | |
" <td>114</td>\n", | |
" <td>Jan Hertrich</td>\n", | |
" <td>DDA260</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>KB</th>\n", | |
" <td>Ventus bT/15m</td>\n", | |
" <td>110</td>\n", | |
" <td>Sebastian Bethge</td>\n", | |
" <td>DDA36C</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>XL</th>\n", | |
" <td>Duo Discus</td>\n", | |
" <td>110</td>\n", | |
" <td>Team S.Theis & C.Theis & V.Stutzer</td>\n", | |
" <td>DDA79C</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>DL</th>\n", | |
" <td>Duo Discus</td>\n", | |
" <td>110</td>\n", | |
" <td>Team D. Sailler & M.Grohe & A.Schottmüller & L...</td>\n", | |
" <td>DDA83F</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>GT</th>\n", | |
" <td>ASW 28</td>\n", | |
" <td>108</td>\n", | |
" <td>Jochen Kuhn</td>\n", | |
" <td>DDBFDE</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>YH</th>\n", | |
" <td>DG 1000T/20m</td>\n", | |
" <td>110</td>\n", | |
" <td>Team M.Althaus & M.Schmitt & M.Karl & J.Thomas</td>\n", | |
" <td>DDEBCB</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>T</th>\n", | |
" <td>JS 3-15m</td>\n", | |
" <td>116</td>\n", | |
" <td>Georg Theisinger</td>\n", | |
" <td>DDF16B</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>LT</th>\n", | |
" <td>ASG 29 15m</td>\n", | |
" <td>114</td>\n", | |
" <td>Laurenz Theisinger</td>\n", | |
" <td>DDF16B</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>EL</th>\n", | |
" <td>DG 200/17</td>\n", | |
" <td>109</td>\n", | |
" <td>Alfred Perlich</td>\n", | |
" <td>DDFE77</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>SI</th>\n", | |
" <td>Ls 8 15m Neo</td>\n", | |
" <td>108</td>\n", | |
" <td>Johannes Dibbern</td>\n", | |
" <td>DF0FD3</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>RI</th>\n", | |
" <td>DG 1000T/20m</td>\n", | |
" <td>110</td>\n", | |
" <td>N.Kratz & P.Sobucki</td>\n", | |
" <td>NaN</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" TYPE HANDICAP \\\n", | |
"CN \n", | |
"1G Ventus 2 114 \n", | |
"63 ASG 32Mi 114 \n", | |
"AI Ventus bT/15m 110 \n", | |
"AG JS 3-18m J 121 \n", | |
"GIU DG 1000T/20m 110 \n", | |
"XXX Duo Discus XL 111 \n", | |
"MR Kestrel 17m 110 \n", | |
"L8 LS8 15 m 108 \n", | |
"XR Glasflugel 304 110 \n", | |
"C1 Ventus 2 114 \n", | |
"04 Glasflugel 304 110 \n", | |
"DR Ventus 2 114 \n", | |
"KD Duo Discus 110 \n", | |
"EO LS 8 18m T 114 \n", | |
"KB Ventus bT/15m 110 \n", | |
"XL Duo Discus 110 \n", | |
"DL Duo Discus 110 \n", | |
"GT ASW 28 108 \n", | |
"YH DG 1000T/20m 110 \n", | |
"T JS 3-15m 116 \n", | |
"LT ASG 29 15m 114 \n", | |
"EL DG 200/17 109 \n", | |
"SI Ls 8 15m Neo 108 \n", | |
"RI DG 1000T/20m 110 \n", | |
"\n", | |
" NAME device_id \n", | |
"CN \n", | |
"1G Henrik Bieler 3A1FFF \n", | |
"63 Frank Fröhlich & M.Dupont & W.Decker & A.-L.Lu... 3ECBFF \n", | |
"AI Stefan Kuse 3ED542 \n", | |
"AG Bernd Hubka D004B2 \n", | |
"GIU Team J.Schliephake & V.Schliephake & M.Ott & F... DD7295 \n", | |
"XXX Team A.Boml & H.Kreuzer & M.Deichmann DD8713 \n", | |
"MR M.Wallmer & L.Krause DD876F \n", | |
"L8 D.Lott & K.Goll DD9612 \n", | |
"XR Juergen Sottung DD99BC \n", | |
"C1 Peter Lutz DD9A37 \n", | |
"04 Stephan Schnell DD9C14 \n", | |
"DR Marc Schick DD9C1D \n", | |
"KD J.Schmidt & H.Rupp DD9FBB \n", | |
"EO Jan Hertrich DDA260 \n", | |
"KB Sebastian Bethge DDA36C \n", | |
"XL Team S.Theis & C.Theis & V.Stutzer DDA79C \n", | |
"DL Team D. Sailler & M.Grohe & A.Schottmüller & L... DDA83F \n", | |
"GT Jochen Kuhn DDBFDE \n", | |
"YH Team M.Althaus & M.Schmitt & M.Karl & J.Thomas DDEBCB \n", | |
"T Georg Theisinger DDF16B \n", | |
"LT Laurenz Theisinger DDF16B \n", | |
"EL Alfred Perlich DDFE77 \n", | |
"SI Johannes Dibbern DF0FD3 \n", | |
"RI N.Kratz & P.Sobucki NaN " | |
] | |
}, | |
"execution_count": 6, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"for cn, device_id in {'EL': 'DDFE77', # 4.WT igc file\n", | |
" 'EO': 'DDA260', # OLC & OGN-DDB\n", | |
" 'SI': 'DF0FD3', # 4.WT igc file\n", | |
" 'XR': 'DD99BC',\n", | |
" 'KD': 'DD9FBB'}.items(): # OGN-DDB\n", | |
" m.at[cn, 'device_id'] = device_id\n", | |
"\n", | |
"m.sort_values('device_id')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# Load DDB for the registration\n", | |
"r = requests.get(\"http://ddb.glidernet.org/download/?j=1\")\n", | |
"ddb_devices = pd.DataFrame(r.json()['devices'])\n", | |
"\n", | |
"\n", | |
"m = pd.merge(m.reset_index(), ddb_devices[['device_id', 'device_type', 'registration']], on='device_id', how='left')\n", | |
"m = m.set_index('CN')\n", | |
"m = m.fillna(value='')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 8, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>TYPE</th>\n", | |
" <th>HANDICAP</th>\n", | |
" <th>NAME</th>\n", | |
" <th>device_id</th>\n", | |
" <th>device_type</th>\n", | |
" <th>registration</th>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>CN</th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>04</th>\n", | |
" <td>Glasflugel 304</td>\n", | |
" <td>110</td>\n", | |
" <td>Stephan Schnell</td>\n", | |
" <td>DD9C14</td>\n", | |
" <td></td>\n", | |
" <td></td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1G</th>\n", | |
" <td>Ventus 2</td>\n", | |
" <td>114</td>\n", | |
" <td>Henrik Bieler</td>\n", | |
" <td>3A1FFF</td>\n", | |
" <td></td>\n", | |
" <td></td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>63</th>\n", | |
" <td>ASG 32Mi</td>\n", | |
" <td>114</td>\n", | |
" <td>Frank Fröhlich & M.Dupont & W.Decker & A.-L.Lu...</td>\n", | |
" <td>3ECBFF</td>\n", | |
" <td>I</td>\n", | |
" <td>D-KSFF</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>AG</th>\n", | |
" <td>JS 3-18m J</td>\n", | |
" <td>121</td>\n", | |
" <td>Bernd Hubka</td>\n", | |
" <td>D004B2</td>\n", | |
" <td></td>\n", | |
" <td></td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>AI</th>\n", | |
" <td>Ventus bT/15m</td>\n", | |
" <td>110</td>\n", | |
" <td>Stefan Kuse</td>\n", | |
" <td>3ED542</td>\n", | |
" <td>F</td>\n", | |
" <td>D-KVSK</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>C1</th>\n", | |
" <td>Ventus 2</td>\n", | |
" <td>114</td>\n", | |
" <td>Peter Lutz</td>\n", | |
" <td>DD9A37</td>\n", | |
" <td>F</td>\n", | |
" <td>D-0274</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>DL</th>\n", | |
" <td>Duo Discus</td>\n", | |
" <td>110</td>\n", | |
" <td>Team D. Sailler & M.Grohe & A.Schottmüller & L...</td>\n", | |
" <td>DDA83F</td>\n", | |
" <td>F</td>\n", | |
" <td>D-6508</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>DR</th>\n", | |
" <td>Ventus 2</td>\n", | |
" <td>114</td>\n", | |
" <td>Marc Schick</td>\n", | |
" <td>DD9C1D</td>\n", | |
" <td></td>\n", | |
" <td></td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>EL</th>\n", | |
" <td>DG 200/17</td>\n", | |
" <td>109</td>\n", | |
" <td>Alfred Perlich</td>\n", | |
" <td>DDFE77</td>\n", | |
" <td></td>\n", | |
" <td></td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>EO</th>\n", | |
" <td>LS 8 18m T</td>\n", | |
" <td>114</td>\n", | |
" <td>Jan Hertrich</td>\n", | |
" <td>DDA260</td>\n", | |
" <td>F</td>\n", | |
" <td>D-KLEO</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>GIU</th>\n", | |
" <td>DG 1000T/20m</td>\n", | |
" <td>110</td>\n", | |
" <td>Team J.Schliephake & V.Schliephake & M.Ott & F...</td>\n", | |
" <td>DD7295</td>\n", | |
" <td></td>\n", | |
" <td></td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>GT</th>\n", | |
" <td>ASW 28</td>\n", | |
" <td>108</td>\n", | |
" <td>Jochen Kuhn</td>\n", | |
" <td>DDBFDE</td>\n", | |
" <td>F</td>\n", | |
" <td>D-6233</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>KB</th>\n", | |
" <td>Ventus bT/15m</td>\n", | |
" <td>110</td>\n", | |
" <td>Sebastian Bethge</td>\n", | |
" <td>DDA36C</td>\n", | |
" <td></td>\n", | |
" <td></td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>KD</th>\n", | |
" <td>Duo Discus</td>\n", | |
" <td>110</td>\n", | |
" <td>J.Schmidt & H.Rupp</td>\n", | |
" <td>DD9FBB</td>\n", | |
" <td>F</td>\n", | |
" <td>D-1524</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>L8</th>\n", | |
" <td>LS8 15 m</td>\n", | |
" <td>108</td>\n", | |
" <td>D.Lott & K.Goll</td>\n", | |
" <td>DD9612</td>\n", | |
" <td>F</td>\n", | |
" <td>D-3976</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>LT</th>\n", | |
" <td>ASG 29 15m</td>\n", | |
" <td>114</td>\n", | |
" <td>Laurenz Theisinger</td>\n", | |
" <td>DDF16B</td>\n", | |
" <td></td>\n", | |
" <td></td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>MR</th>\n", | |
" <td>Kestrel 17m</td>\n", | |
" <td>110</td>\n", | |
" <td>M.Wallmer & L.Krause</td>\n", | |
" <td>DD876F</td>\n", | |
" <td>F</td>\n", | |
" <td>D-0598</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>RI</th>\n", | |
" <td>DG 1000T/20m</td>\n", | |
" <td>110</td>\n", | |
" <td>N.Kratz & P.Sobucki</td>\n", | |
" <td></td>\n", | |
" <td></td>\n", | |
" <td></td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>SI</th>\n", | |
" <td>Ls 8 15m Neo</td>\n", | |
" <td>108</td>\n", | |
" <td>Johannes Dibbern</td>\n", | |
" <td>DF0FD3</td>\n", | |
" <td>F</td>\n", | |
" <td>D-3571</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>T</th>\n", | |
" <td>JS 3-15m</td>\n", | |
" <td>116</td>\n", | |
" <td>Georg Theisinger</td>\n", | |
" <td>DDF16B</td>\n", | |
" <td></td>\n", | |
" <td></td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>XL</th>\n", | |
" <td>Duo Discus</td>\n", | |
" <td>110</td>\n", | |
" <td>Team S.Theis & C.Theis & V.Stutzer</td>\n", | |
" <td>DDA79C</td>\n", | |
" <td>F</td>\n", | |
" <td>D-4169</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>XR</th>\n", | |
" <td>Glasflugel 304</td>\n", | |
" <td>110</td>\n", | |
" <td>Juergen Sottung</td>\n", | |
" <td>DD99BC</td>\n", | |
" <td>F</td>\n", | |
" <td>D 8556</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>XXX</th>\n", | |
" <td>Duo Discus XL</td>\n", | |
" <td>111</td>\n", | |
" <td>Team A.Boml & H.Kreuzer & M.Deichmann</td>\n", | |
" <td>DD8713</td>\n", | |
" <td>F</td>\n", | |
" <td>D-5574</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>YH</th>\n", | |
" <td>DG 1000T/20m</td>\n", | |
" <td>110</td>\n", | |
" <td>Team M.Althaus & M.Schmitt & M.Karl & J.Thomas</td>\n", | |
" <td>DDEBCB</td>\n", | |
" <td>F</td>\n", | |
" <td>D-KSDG</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" TYPE HANDICAP \\\n", | |
"CN \n", | |
"04 Glasflugel 304 110 \n", | |
"1G Ventus 2 114 \n", | |
"63 ASG 32Mi 114 \n", | |
"AG JS 3-18m J 121 \n", | |
"AI Ventus bT/15m 110 \n", | |
"C1 Ventus 2 114 \n", | |
"DL Duo Discus 110 \n", | |
"DR Ventus 2 114 \n", | |
"EL DG 200/17 109 \n", | |
"EO LS 8 18m T 114 \n", | |
"GIU DG 1000T/20m 110 \n", | |
"GT ASW 28 108 \n", | |
"KB Ventus bT/15m 110 \n", | |
"KD Duo Discus 110 \n", | |
"L8 LS8 15 m 108 \n", | |
"LT ASG 29 15m 114 \n", | |
"MR Kestrel 17m 110 \n", | |
"RI DG 1000T/20m 110 \n", | |
"SI Ls 8 15m Neo 108 \n", | |
"T JS 3-15m 116 \n", | |
"XL Duo Discus 110 \n", | |
"XR Glasflugel 304 110 \n", | |
"XXX Duo Discus XL 111 \n", | |
"YH DG 1000T/20m 110 \n", | |
"\n", | |
" NAME device_id device_type \\\n", | |
"CN \n", | |
"04 Stephan Schnell DD9C14 \n", | |
"1G Henrik Bieler 3A1FFF \n", | |
"63 Frank Fröhlich & M.Dupont & W.Decker & A.-L.Lu... 3ECBFF I \n", | |
"AG Bernd Hubka D004B2 \n", | |
"AI Stefan Kuse 3ED542 F \n", | |
"C1 Peter Lutz DD9A37 F \n", | |
"DL Team D. Sailler & M.Grohe & A.Schottmüller & L... DDA83F F \n", | |
"DR Marc Schick DD9C1D \n", | |
"EL Alfred Perlich DDFE77 \n", | |
"EO Jan Hertrich DDA260 F \n", | |
"GIU Team J.Schliephake & V.Schliephake & M.Ott & F... DD7295 \n", | |
"GT Jochen Kuhn DDBFDE F \n", | |
"KB Sebastian Bethge DDA36C \n", | |
"KD J.Schmidt & H.Rupp DD9FBB F \n", | |
"L8 D.Lott & K.Goll DD9612 F \n", | |
"LT Laurenz Theisinger DDF16B \n", | |
"MR M.Wallmer & L.Krause DD876F F \n", | |
"RI N.Kratz & P.Sobucki \n", | |
"SI Johannes Dibbern DF0FD3 F \n", | |
"T Georg Theisinger DDF16B \n", | |
"XL Team S.Theis & C.Theis & V.Stutzer DDA79C F \n", | |
"XR Juergen Sottung DD99BC F \n", | |
"XXX Team A.Boml & H.Kreuzer & M.Deichmann DD8713 F \n", | |
"YH Team M.Althaus & M.Schmitt & M.Karl & J.Thomas DDEBCB F \n", | |
"\n", | |
" registration \n", | |
"CN \n", | |
"04 \n", | |
"1G \n", | |
"63 D-KSFF \n", | |
"AG \n", | |
"AI D-KVSK \n", | |
"C1 D-0274 \n", | |
"DL D-6508 \n", | |
"DR \n", | |
"EL \n", | |
"EO D-KLEO \n", | |
"GIU \n", | |
"GT D-6233 \n", | |
"KB \n", | |
"KD D-1524 \n", | |
"L8 D-3976 \n", | |
"LT \n", | |
"MR D-0598 \n", | |
"RI \n", | |
"SI D-3571 \n", | |
"T \n", | |
"XL D-4169 \n", | |
"XR D 8556 \n", | |
"XXX D-5574 \n", | |
"YH D-KSDG " | |
] | |
}, | |
"execution_count": 8, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"m" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 14, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"ID,CALL,CN,TYPE,HANDICAP,NAME\n", | |
"FLRDD9C14,,04,Glasflugel 304,110,Stephan Schnell\n", | |
"FLR3A1FFF,,1G,Ventus 2,114,Henrik Bieler\n", | |
"ICA3ECBFF,D-KSFF,63,ASG 32Mi,114,Frank Fröhlich & M.Dupont & W.Decker & A.-L.Ludwig\n", | |
"FLRD004B2,,AG,JS 3-18m J,121,Bernd Hubka\n", | |
"FLR3ED542,D-KVSK,AI,Ventus bT/15m,110,Stefan Kuse\n", | |
"FLRDD9A37,D-0274,C1,Ventus 2,114,Peter Lutz\n", | |
"FLRDDA83F,D-6508,DL,Duo Discus,110,Team D. Sailler & M.Grohe & A.Schottmüller & L. Hildebrandt\n", | |
"FLRDD9C1D,,DR,Ventus 2,114,Marc Schick\n", | |
"FLRDDFE77,,EL,DG 200/17,109,Alfred Perlich\n", | |
"FLRDDA260,D-KLEO,EO,LS 8 18m T,114,Jan Hertrich\n", | |
"FLRDD7295,,GIU,DG 1000T/20m,110,Team J.Schliephake & V.Schliephake & M.Ott & F.Müller\n", | |
"FLRDDBFDE,D-6233,GT,ASW 28,108,Jochen Kuhn\n", | |
"FLRDDA36C,,KB,Ventus bT/15m,110,Sebastian Bethge\n", | |
"FLRDD9FBB,D-1524,KD,Duo Discus,110,J.Schmidt & H.Rupp\n", | |
"FLRDD9612,D-3976,L8,LS8 15 m,108,D.Lott & K.Goll\n", | |
"FLRDDF16B,,LT,ASG 29 15m,114,Laurenz Theisinger\n", | |
"FLRDD876F,D-0598,MR,Kestrel 17m,110,M.Wallmer & L.Krause\n", | |
",,RI,DG 1000T/20m,110,N.Kratz & P.Sobucki\n", | |
"FLRDF0FD3,D-3571,SI,Ls 8 15m Neo,108,Johannes Dibbern\n", | |
"FLRDDF16B,,T,JS 3-15m,116,Georg Theisinger\n", | |
"FLRDDA79C,D-4169,XL,Duo Discus,110,Team S.Theis & C.Theis & V.Stutzer\n", | |
"FLRDD99BC,D 8556,XR,Glasflugel 304,110,Juergen Sottung\n", | |
"FLRDD8713,D-5574,XXX,Duo Discus XL,111,Team A.Boml & H.Kreuzer & M.Deichmann\n", | |
"FLRDDEBCB,D-KSDG,YH,DG 1000T/20m,110,Team M.Althaus & M.Schmitt & M.Karl & J.Thomas\n" | |
] | |
} | |
], | |
"source": [ | |
"# Generate the filter list for ogn-web-viewer\n", | |
"print(\"ID,CALL,CN,TYPE,HANDICAP,NAME\")\n", | |
"for k,v in m.iterrows():\n", | |
" if v['device_type'] == 'F':\n", | |
" device_address = 'FLR{}'.format(v['device_id'])\n", | |
" elif v['device_type'] == 'I':\n", | |
" device_address = 'ICA{}'.format(v['device_id'])\n", | |
" else:\n", | |
" if v['device_id']:\n", | |
" device_address = 'FLR{}'.format(v['device_id'])\n", | |
" else:\n", | |
" device_address = ''\n", | |
"\n", | |
" print(\"{},{},{},{},{},{}\".format(device_address, v['registration'], k, v['TYPE'], v['HANDICAP'], v['NAME'])) " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "ipy3 2019 Dannstadt Env", | |
"language": "python", | |
"name": "2019_dannstadt_env" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.7.3" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
beautifulsoup4==4.7.1 | |
opensoar==0.1.3 | |
pandas==0.24.2 | |
requests==2.22.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment