- ~1 day → 3 minweekly report that used to take six people most of a day
- 1click for Excel and PowerPoint
- 10years of same-week storage ranking
- 5reservoirs simulated
The water report goes out every week. It used to take six colleagues nearly a full day to copy figures from several sources into Excel and then rebuild the charts as slides.
I built a tool that produces the workbook and the deck together once you pick a period and click. It covers reservoir storage ranked against the same period over the past ten years, gridded rainfall by county, and hydrograph simulations for five reservoirs. The copying and layout work that used to be manual is now done by the program.
One report, three modules
The report has three parts, and each answers a different question. The reservoir module ranks current storage against the same period over the past ten years. The rainfall module maps accumulated rainfall and summarizes it by region. The simulation module shows how a reservoir’s storage curve changes under different inputs. The calculations differ, but the steps are the same for all three. You pick a period, check the inputs and produce the output, so I put them in one interface.
- Pick the periodChoose a reporting date and the modules to run.
- Read and check dataLoad observations, the slide template and simulation parameters, and check each one.
- CalculateRank storage, total the rainfall and run the hydrograph simulations.
- Write the filesOutput Excel files, slides and a run log for colleagues to check.
Check the sources before charting
Before a report goes out, colleagues need to confirm a few things, such as which period is being processed, which previous deck supplies the layout, and whether each value came from a data source or was adjusted by hand. So I put those choices directly in the interface. The simulation panel lists the parameter table and the source of each parameter, and the run screen shows which modules are selected, how far the run has progressed and whether every expected file was written.
The interface below and the chart demo further down use synthetic data. You can switch modules and compare reservoir rankings, regional rainfall and the storage simulation.
Press “Run sample report” and the interface lists the files each selected module produces.
Explore the three modules
Pick a sample week and a module. The chart, the value table and the run trace update together.
The sample values at the bottom follow the same selection and can be downloaded as a CSV file.
Sample data · local fixtureRun trace
Sample values
Files colleagues can keep editing
The tool writes Excel workbooks and PowerPoint decks, so the numbers in tables and charts can still be checked and changed, and the layout stays editable. I used openpyxl for the workbook, matplotlib for the charts and python-pptx for the deck. Each run leaves a log with the period and the data sources and checks that every expected file was written. That makes it easy to tell a finished run from one that stopped with files missing.
The hydrological methods in the report are not all my own, and my part was turning data access, calculations and report output into one automated process.
What the project called for
Data workflow engineering
Separated data access, period handling and calculations, and labelled each output with its data sources.
Spatial and scenario interfaces
Put rainfall statistics next to the map and built a panel for editing simulation parameters directly.
Office report integration
Produced editable workbooks and slides with a run log, and checked the path and version of every file.