Research Impact Statement: New framework developed for modeling the upper limits of biodiversity as a function of streamflow using principles of the river continuum concept and widely available hydrologic and ecological data. ABSTRACT: Effective water resource management requires practical, data-driven determination of instream flow needs. Newly developed, high-resolution flow models and aquatic species databases provide enormous opportunity, but the volume of data can prove challenging to manage without automated tools. The objective of this study was to develop a framework of analytical methods and best practices to reduce costs of entry into flow-ecology analysis by integrating widely available hydrologic and ecological datasets. Ecological limit functions (ELFs) describing the relation between maximum species richness and stream size characteristics (streamflow or drainage area) were developed. Species richness is expected to increase with streamflow through a watershed up to a point where it either plateaus or transitions to a decreasing trend in larger streams. Our results show that identifying the location of this "breakpoint" is critical for producing optimal ELF model fit. We found that richness breakpoints can be estimated using automated low-supervision methods, with high-supervision providing negligible improvement in detection accuracy. Model fit (and predictive capability) was found to be superior in smaller hydrologic units. The ELF model ("elfgen" R package available on GitHub: https://github.c om/HARPgroup/elfgen) can be used to generate ELFs using built-in datasets for the conterminous United States, or applied anywhere else streamflow and biodiversity data inputs are available.