EPA SWMM5 Inp File Reader App for Stats and Images of the Network Elements
Introduction
As a long-term water resources professional associated with SWMM, I found myself repeatedly hitting the same wall. I have a collection of 1,729 EPA SWMM5 input files stored in my GitHub repository and many more on my various PCs. But every time I wanted to analyze the statistical patterns across these models, I faced the same tedious workflow: manually importing files into EPA SWMM 5, InfoSWMM, or ICM, then painstakingly extracting data one parameter at a time.
The existing tools, while powerful for hydraulic modeling, weren't designed for the kind of comprehensive statistical analysis I needed. InfoSWMM came closest with its data visualization capabilities, but it could only generate histograms for one variable at a time—hardly efficient when you're trying to understand patterns across dozens of parameters and thousands of models. The EPA SWMM 5 interface offered even less in terms of bulk statistical analysis, and ICM, despite its sophistication, wasn't built for this type of meta-analysis across large model collections.
That's when I realized I needed to build my own solution. Fortunately, during my stay at the Network School in Forest City, Malaysia, I learned about Replit, which makes Python code interfaces.
Using Python and deploying it on Replit, I created the EPA SWMM5 Inp File Reader—a web application that could directly access my GitHub repository of 1,729 SWMM models and generate comprehensive statistical analyses without requiring any traditional SWMM software. The application parses .inp files directly, extracting every numerical parameter from subcatchments, nodes, and conduits, then automatically generates histograms, correlation matrices, and advanced statistical visualizations for all variables simultaneously.
What started as a personal productivity tool quickly evolved into something much more powerful. The application now features interactive geographic mapping with elevation contours, schema-compliant JSON exports for API integration, social sharing capabilities for collaboration, and even animated UI elements that make data exploration easier. It includes model export, embedded videos, and all source code.
The app is philosophical. Instead of adapting my workflow to existing software limitations, I built exactly what I needed: a tool that treats SWMM models as data sets to be analyzed, not just hydraulic systems to be simulated. It does not use the SWMM5 engine, as I wanted to see and understand the input better. Here is the link if you want to try it someday: https://swmm5fileanalyzer.com/
How the Code Works
The application's architecture reflects the complexity of modern stormwater analysis. Built with over 10,000 lines of Python code across 17 specialized modules, it handles everything from file parsing to advanced statistical visualization. The core parsing engine can process SWMM5 .inp files of any size, extracting and categorizing hundreds of parameters while maintaining 4-decimal precision for all calculations—crucial when dealing with engineering data where small variations matter.
The statistical engine generates over 20 different chart types simultaneously: probability density functions, Q-Q plots, violin plots, statistical heatmaps, ridge plots, polar coordinate visualizations, and multi-dimensional bubble charts. Each visualization includes statistical overlays showing mean, median, and standard deviation, with correlation analysis providing R-squared calculations for parameter relationships. This level of detail simply isn't available in traditional SWMM interfaces.
The geographic mapping component uses Delaunay triangulation and spatial interpolation algorithms to create elevation contour visualizations from coordinate data, something that requires expensive GIS software in traditional workflows. The interactive network analysis, powered by NetworkX, reveals connectivity patterns and flow relationships that are invisible in standard model views.
Integration and Collaboration Features
Recognizing that engineering is increasingly collaborative, I built comprehensive sharing capabilities. The application generates platform-specific content for Twitter, LinkedIn, Reddit, WhatsApp, and Telegram, with customizable templates for technical summaries, project updates, and educational content. Engineers can now share analysis results instantly, complete with downloadable reports in both text and JSON formats.
The GitHub integration was particularly challenging to implement. With rate limiting and API constraints, I developed animated loading indicators and intelligent caching to provide seamless access to the SWMMEnablement repository's 1,729 models. Users can browse, categorize, and analyze models with a single click, transforming what used to be an hours-long process into seconds.
Performance and User Experience Innovation
The application employs lazy loading for heavy libraries like Matplotlib and Plotly, ensuring rapid startup times even with complex visualizations. Session state management maintains data persistence across different analysis views, while comprehensive error handling ensures reliability when processing varied file formats and edge cases.
The enhanced UI features represent a departure from typical engineering software. Playful animations (fadeIn, slideIn, and bounce effects) make data exploration engaging, while an interactive onboarding system guides new users through complex features. The customizable color palette system allows users to personalize visualizations for presentations and reports.
Real-World Impact and Future Vision
Since deployment, the application has transformed how I approach stormwater model analysis. What once required days of manual work now happens in minutes. Pattern recognition across large model collections has revealed insights about regional design practices, parameter relationships, and modeling trends that were previously hidden in isolated files.
The schema-compliant JSON export capability has opened new possibilities for automated workflows and API integration. Engineering firms can now incorporate SWMM analysis into broader data pipelines, enabling automated report generation and quality assurance processes.
Looking ahead, the modular architecture supports easy expansion. Machine learning integration for pattern recognition, automated model validation, and predictive analytics are natural next steps. The foundation is there for AI-assisted model review and optimization
Autodesk Technologist, models ICM InfoWorks and SWMM Networks with Ruby, Python and AI Agents / 20 Years at Innovyze/Autodesk | 50 Years with EPASWMM
1dI will note that there is a 25 mb file inp limit to directly read the inp file, I am trying some other options to allow bigger models
Sr. Water Resources PM at MSA
1dFantastic tool!
Team Lead - Water Resources at KBR | PhD CPEng | Stormwater SA Treasurer | Stormwater Australia Director
5dReplit is awesome - a great use case for it. I'm building an optimisation algorithm for drainage design that asks an LLM to review the design parameters based on engineering judgement - all though just iterating in Replit
Water Resources, Hydrology Professor, Advanced Modeling, Green Infrastructure, Asset Management, Digital Water
5dAwesome Bob - really cool, inspired, and useful. Nice UI as well!!
Graduate Research Assistant || Water & Environmental Systems Analysis (WESA) Lab || Urban Hydrology & AI Enthusiast
6dI gave it a try and it was really cool Robert Dickinson 👏 . This saves a lot of tedious work. I wish I could upload a bit larger .inp file as well.