diff --git a/report_builder/__pycache__/getData.cpython-312.pyc b/report_builder/__pycache__/getData.cpython-312.pyc index e550471..5d9347e 100644 Binary files a/report_builder/__pycache__/getData.cpython-312.pyc and b/report_builder/__pycache__/getData.cpython-312.pyc differ diff --git a/report_builder/__pycache__/settings.cpython-312.pyc b/report_builder/__pycache__/settings.cpython-312.pyc index 61164a3..38b5c65 100644 Binary files a/report_builder/__pycache__/settings.cpython-312.pyc and b/report_builder/__pycache__/settings.cpython-312.pyc differ diff --git a/report_builder/pdf_less.py b/report_builder/pdf_less.py index 17c0609..2856d9d 100644 --- a/report_builder/pdf_less.py +++ b/report_builder/pdf_less.py @@ -14,7 +14,7 @@ from datetime import datetime def get_data(emeis:list[str],scraper:DataScraper) -> list[pd.DataFrame]: dataframes = [] for imei in tqdm(emeis,ascii=True,desc="gather_data"): - resp = json.loads(scraper.get_data(imei,history_length=90)["response"].decode("utf-8"))["data"] + resp = json.loads(scraper.get_data(imei,history_length=90)["response"].decode("utf-8")) df = pd.DataFrame(resp) df['MeasurementTime'] = pd.to_datetime(df['MeasurementTime']) #fix time date dataframes.append(df) @@ -51,7 +51,7 @@ def fill_column(elements:list[str],column_index:int,img): """ column_shift = [900,1100,1330,1900] dist = 37 - row_shift = [720,760,925,1120,1295,1470,1510,1650,1650+dist,1650+dist*2,1650+dist*3,1650+dist*4,1650+dist*5,1650+dist*6,1650+dist*7,1650+dist*8,1650+dist*9,2135,2315,2315+dist*1,2315+dist*2,2315+dist*3,2560,2750,2750+dist] + row_shift = [720,760,925,1120,1295,1470,1510,1650,1650+dist,1650+dist*2,1650+dist*3,1650+dist*4,1650+dist*5,1650+dist*6,1650+dist*7,1650+dist*8,1650+dist*9,2135,2315,2315+dist*1,2315+dist*2,2315+dist*3,2560,2560+dist,2750,2750+dist] for row_index,elem in enumerate(elements): add_elem(elem,column_shift[column_index],row_shift[row_index],img) @@ -77,7 +77,7 @@ if __name__ == "__main__": week_number = date.isocalendar(current_date)[1] 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-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")]) + 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-0053","86366306494398"),("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-0082", "86620705863403"),("KW1100-0079","86620705864105"),("KW1100-0049","86366306491069")]) img = Image.open("template.png") img = add_elem(str(current_date),400,160,img,font_size=40) img = add_elem(str(week_number),400,110,img,font_size=40) @@ -101,7 +101,7 @@ if __name__ == "__main__": #static delta 7 daags deltas = [] for df in dfs: - x = get_data_within_n_days(df,7,current_date)["Sv4"] + x = get_data_within_n_days(df,7,current_date)["Sv5"] deltas.append(str(round(x.max()-x.min(),1))) diff --git a/report_builder/report.pdf b/report_builder/report.pdf index ef9a94f..0425402 100644 Binary files a/report_builder/report.pdf and b/report_builder/report.pdf differ diff --git a/report_builder/template.png b/report_builder/template.png index e72169b..744cdc8 100644 Binary files a/report_builder/template.png and b/report_builder/template.png differ diff --git a/report_builder_num_train_passages/Template.png b/report_builder_num_train_passages/Template.png index 7433a1e..668f091 100644 Binary files a/report_builder_num_train_passages/Template.png and b/report_builder_num_train_passages/Template.png differ diff --git a/report_builder_num_train_passages/__pycache__/Notitieblok openen.onetoc2 b/report_builder_num_train_passages/__pycache__/Notitieblok openen.onetoc2 deleted file mode 100644 index aa1ed71..0000000 Binary files a/report_builder_num_train_passages/__pycache__/Notitieblok openen.onetoc2 and /dev/null differ diff --git a/report_builder_num_train_passages/__pycache__/getData.cpython-312.pyc b/report_builder_num_train_passages/__pycache__/getData.cpython-312.pyc index e550471..781a2f9 100644 Binary files a/report_builder_num_train_passages/__pycache__/getData.cpython-312.pyc and b/report_builder_num_train_passages/__pycache__/getData.cpython-312.pyc differ diff --git a/report_builder_num_train_passages/__pycache__/settings.cpython-312.pyc b/report_builder_num_train_passages/__pycache__/settings.cpython-312.pyc index 61164a3..b3057b8 100644 Binary files a/report_builder_num_train_passages/__pycache__/settings.cpython-312.pyc and b/report_builder_num_train_passages/__pycache__/settings.cpython-312.pyc differ diff --git a/report_builder_num_train_passages/pdf_less.py b/report_builder_num_train_passages/pdf_less.py index 67eb96e..5dd3a6d 100644 --- a/report_builder_num_train_passages/pdf_less.py +++ b/report_builder_num_train_passages/pdf_less.py @@ -15,7 +15,7 @@ from datetime import datetime, timedelta def get_data(emeis:list[str],scraper:DataScraper) -> list[pd.DataFrame]: dataframes = [] for imei in tqdm(emeis,ascii=True,desc="gather_data"): - resp = json.loads(scraper.get_data(imei,history_length=90)["response"].decode("utf-8"))["data"] + resp = json.loads(scraper.get_data(imei,history_length=90)["response"].decode("utf-8")) df = pd.DataFrame(resp) df['MeasurementTime'] = pd.to_datetime(df['MeasurementTime']) #fix time date dataframes.append(df) diff --git a/report_builder_num_train_passages/report.pdf b/report_builder_num_train_passages/report.pdf index eb182c9..d257581 100644 Binary files a/report_builder_num_train_passages/report.pdf and b/report_builder_num_train_passages/report.pdf differ