diff --git a/DataAnalyser.py b/DataAnalyser.py index 1ff857a11bd0d6ff01c6cd1f61931158b81b93f9..fa89798d5f02cda1269a01b35845e5cdcd38de2e 100644 --- a/DataAnalyser.py +++ b/DataAnalyser.py @@ -1,4 +1,5 @@ import re +import string import pandas as pandas from fastf1.core import Session, Lap, Laps, DataNotLoadedError @@ -119,6 +120,12 @@ class DataAnalyser(DataHandler): # ===== Weather ===== + def isWet(self, weatherDescription: string): + keywords: list[string] = ["rain", "wet"] + for keyword in keywords: + if keyword in weatherDescription.lower(): return True + return False + def extractWeatherFromHtml(self, rawHtml): """ Extract an events weather conditions from its respective wikipedia page.