API Reference¶
Aktiia Utils¶
copyright: paul@mikadosoftware.com
so the adhoc row calc stuff is getting awkward. I will extract every row, and see if I can find enought signal - I think : will be useful
I haver broken this into two stages - first get a reasinable text extractin and then convert that text to valid dataframe
the first part give us
[‘27’, ‘May,’, ‘24’, ‘16:01’, ‘127’, ‘83’, ‘65’, ‘1 June,’, ‘24’, ‘09:43’, ‘145’, ‘97’, ‘72’, ‘’] [‘1’, ‘June,’, ‘24’, ‘00:19’, ‘133’, ‘85’, ‘73’, ‘1 June,’, ‘24’, ‘09:51’, ‘131’, ‘83’, ‘62’, ‘’] [‘1’, ‘June,’, ‘24’, ‘00:36’, ‘151’, ‘98’, ‘72’, ‘1 June,’, ‘24’, ‘09:59’, ‘135’, ‘86’, ‘60’, ‘’] [‘1’, ‘June,’, ‘24’, ‘00:45’, ‘137’, ‘87’, ‘76’, ‘1 June,’, ‘24’, ‘13:19’, ‘136’, ‘85’, ‘77’, ‘’] [‘1’, ‘June,’, ‘24’, ‘00:54’, ‘132’, ‘84’, ‘63’, ‘1 June,’, ‘24’, ‘14:02’, ‘138’, ‘86’, ‘76’, ‘’] [‘1’, ‘June,’, ‘24’, ‘01:34’, ‘122’, ‘77’, ‘61’, ‘1 June,’, ‘24’, ‘14:10’, ‘137’, ‘86’, ‘74’, ‘’] [‘1’, ‘June,’, ‘24’, ‘02:54’, ‘128’, ‘81’, ‘58’, ‘1 June,’, ‘24’, ‘14:54’, ‘132’, ‘82’, ‘65’, ‘’] [‘1’, ‘June,’, ‘24’, ‘03:34’, ‘138’, ‘86’, ‘74’, ‘1 June,’, ‘24’, ‘15:03’, ‘138’, ‘86’, ‘71’, ‘’] [‘1’, ‘June,’, ‘24’, ‘04:14’, ‘131’, ‘83’, ‘55’, ‘1 June,’, ‘24’, ‘15:16’, ‘136’, ‘87’, ‘64’, ‘’] [‘1’, ‘June,’, ‘24’, ‘04:54’, ‘121’, ‘76’, ‘53’, ‘1 June,’, ‘24’, ‘15:30’, ‘140’, ‘88’, ‘65’, ‘’]
there is some variablility but for the most part I think we can work with - dates up to :, then three readings,
[ ] for each day grab max and min and plot them [ ] surely better ways with jupyter etc
we convert a aktiia pdf to a dataframe of readings
we store the readings in one place
we can see whole readings as one df
we can plot the whole readings
- mikado.aktiia.aktiia_utils.convertdates(timestring)¶
>>> convertdates("1June2400:19") 2024-06-01 00:19:00
- mikado.aktiia.aktiia_utils.extract_pdf(filepath)¶
open filepath (assuming it is a formatted aktiia pdf report) and walk each page finding tables and extracting bp readings.
- mikado.aktiia.aktiia_utils.find_bp_readings(tbl_as_extract)¶
Given a table from pdf, find the rows of BP readings if any
- mikado.aktiia.aktiia_utils.grab_row(row, rawtgtpath)¶
- mikado.aktiia.aktiia_utils.parse_intermediate_row_data(rawpath)¶
- mikado.aktiia.aktiia_utils.plotit(dframe)¶
- mikado.aktiia.aktiia_utils.process_text_row(row)¶
- mikado.aktiia.aktiia_utils.run(f)¶
- mikado.aktiia.aktiia_utils.run_all_pdfs_on_disk()¶
- mikado.aktiia.aktiia_utils.run_script()¶
- mikado.aktiia.aktiia_utils.table_to_df_captureonly(tbl_extract, rawtgtpath)¶
- mikado.aktiia.aktiia_utils.test_process_rows()¶