new template
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -9,7 +9,6 @@ import json
|
|||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from copy import deepcopy
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
def get_data(emeis:list[str],scraper:DataScraper) -> list[pd.DataFrame]:
|
def get_data(emeis:list[str],scraper:DataScraper) -> list[pd.DataFrame]:
|
||||||
@@ -78,7 +77,7 @@ if __name__ == "__main__":
|
|||||||
week_number = date.isocalendar(current_date)[1]
|
week_number = date.isocalendar(current_date)[1]
|
||||||
|
|
||||||
scraper = DataScraper(USERNAME,PASSWORD,BASE_URL)
|
scraper = DataScraper(USERNAME,PASSWORD,BASE_URL)
|
||||||
imeis = OrderedDict([("KW1100-0070","86620705863754"),("KW1100-0071","86620705863410"),("KW1100-0080", "86620705863765"),("KW1100-0069","86620705863772"),("KW1100-0065","86620705864160"),("KW1100-0078","86620705863735"),("KW1100-0061","86620705863782"),("KW1100-0059","86620705863392"),("KW1100-0062","86620705863715"),("KW1100-0075","86620705863575"),("KW1100-0073","86620705864180"),("KW1100-0064","86620705863719"),("KW1100-0063","86620705863729"),("KW1100-0066","86620705863736"),("KW1100-0068","86620705864119"),("KW1100-0054","86366306494401"),("KW1100-0074","86620705864162"),("KW1100-0060","86620705863639"),("KW1100-0055","86620705863526"),("KW1100-0058","86620705864178"),("KW1100-0057","86620705864123") , ("KW1100-0056","86620705864099"),("KW1100-0051","86366306494409"),("KW1100-0079","86620705864105"),("KW1100-0049","86366306491069")])
|
imeis = OrderedDict([("KW1100-0070","86620705863754"),("KW1100-0071","86620705863410"),("KW1100-0080", "86620705863765"),("KW1100-0069","86620705863772"),("KW1100-0065","86620705864160"),("KW1100-0078","86620705863735"),("KW1100-0061","86620705863782"),("KW1100-0059","86620705863392"),("KW1100-0062","86620705863715"),("KW1100-0075","86620705863575"),("KW1100-0073","86620705864180"),("KW1100-0064","86620705863719"),("KW1100-0063","86620705863729"),("KW1100-0066","86620705863736"),("KW1100-0052","86366306494384"),("KW1100-0054","86366306494401"),("KW1100-0074","86620705864162"),("KW1100-0060","86620705863639"),("KW1100-0055","86620705863526"),("KW1100-0058","86620705864178"),("KW1100-0057","86620705864123") , ("KW1100-0056","86620705864099"),("KW1100-0051","86366306494409"),("KW1100-0079","86620705864105"),("KW1100-0049","86366306491069")])
|
||||||
img = Image.open("template.png")
|
img = Image.open("template.png")
|
||||||
img = add_elem(str(current_date),400,160,img,font_size=40)
|
img = add_elem(str(current_date),400,160,img,font_size=40)
|
||||||
img = add_elem(str(week_number),400,110,img,font_size=40)
|
img = add_elem(str(week_number),400,110,img,font_size=40)
|
||||||
@@ -89,7 +88,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
dfs = [get_data_after_date(df) for df in dfs] #cull the herd of old data
|
dfs = [get_data_after_date(df) for df in dfs] #cull the herd of old data
|
||||||
|
|
||||||
seven_day_median = [str(round(get_data_within_n_days(df,7,current_date)["Sv4"].median(),1)) for df in dfs]
|
seven_day_median = [str(round(get_data_within_n_days(df,7,current_date)["Sv4"].max(),1)) for df in dfs]
|
||||||
ninety_day_median = [str(round(get_data_within_n_days(df,90,current_date)["Sv4"].median(),1)) for df in dfs]
|
ninety_day_median = [str(round(get_data_within_n_days(df,90,current_date)["Sv4"].median(),1)) for df in dfs]
|
||||||
|
|
||||||
img = fill_column(seven_day_median,0,img) #7 + current day
|
img = fill_column(seven_day_median,0,img) #7 + current day
|
||||||
|
|||||||
-198461
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 515 KiB After Width: | Height: | Size: 468 KiB |
Reference in New Issue
Block a user