|
| 1 | +import streamlit as st |
| 2 | + |
| 3 | +st.set_page_config(page_title="Project Proposal & Reflection", layout="wide") |
| 4 | + |
| 5 | +st.title("Project Proposal, Feedback, and Reflections") |
| 6 | + |
| 7 | +st.markdown( |
| 8 | +""" |
| 9 | +This page documents the evolution of our project proposal, including reflections |
| 10 | +after initial implementation and feedback from the teaching team. |
| 11 | +""" |
| 12 | +) |
| 13 | + |
| 14 | +st.divider() |
| 15 | + |
| 16 | +# --------------------------------------------------- |
| 17 | +# REFLECTIONS AND TWEAKS (TOP SECTION) |
| 18 | +# --------------------------------------------------- |
| 19 | + |
| 20 | +st.header("Reflections and Project Adjustments") |
| 21 | + |
| 22 | +st.subheader("How the Project Scope Evolved") |
| 23 | +st.markdown(""" |
| 24 | +Our original proposal outlined a fairly ambitious project that aimed to simultaneously analyze electricity demand, fuel mix changes, interregional grid behavior, and weather impacts across multiple U.S. regions using high-frequency EIA data and NOAA weather data. In retrospect, Sneha's feedback correctly identified that this scope was too broad for the timeline of the assignment and the complexity of the datasets involved. |
| 25 | +In response, we significantly narrowed the scope of the project. Rather than attempting to integrate multiple datasets and compare behavior across many regions and weather events, we focused the project on a single analytical question using only the EIA Electricity Grid Monitor data: how electricity demand and generation by fuel type behave during unusually high or low demand periods. |
| 26 | +This adjustment allowed us to shift from a very broad universe of potetial research questions to a more focused and implementable analytical framework. Instead of attempting to build a large multi-region comparative system or honing in on one or more specific extreme weather events, we concentrated on developing a pipeline that could reliably ingest EIA data, clean and validate it, aggregate demand by fuel type, and identify anomalous periods of electricity demand. |
| 27 | +By narrowing the scope in this way, we were more confident that with the skills and in the time we have, we could produce a functioning analytical dashboard that clearly visualizes demand patterns, detects demand anomalies, and explores how the electricity generation mix changes during these periods. |
| 28 | +""") |
| 29 | + |
| 30 | +st.subheader("Defining and Detecting Grid Stress") |
| 31 | +st.markdown(""" |
| 32 | +Another key point of Sneha's feedback concerned how we intended to define and detect “periods of elevated grid stress.” When we wrote the original proposal, we had not yet decided how to define and operationalize this. |
| 33 | +As part of refining the project methodology, we implemented a statistical, data-driven definition of grid stress based on demand anomalies, rather than picking a theoretical or scientific definition from academic literature. Specifically, we compute total daily electricity demand and identify periods where demand deviates from the mean by a configurable number of standard deviations (a z-score threshold). Days with unusually high demand are classified as high-demand anomalies, while unusually low demand days are classified as low-demand anomalies. |
| 34 | +This approach simplfies the analysis and makes it reproducible and adjustable, since the anomaly threshold can be modified interactively in the dashboard. |
| 35 | +Once anomalous demand periods are detected, the application compares the fuel mix shares on those days to normal demand days in order to explore how generation composition shifts during periods of unusually high or low load. |
| 36 | +""") |
| 37 | + |
| 38 | +st.subheader("Methodological Learning") |
| 39 | +st.markdown(""" |
| 40 | +Through the implementation process we gained experience in several methodological areas: |
| 41 | +Working with APIs and automated data ingestion. |
| 42 | +We learned how to query the EIA API, normalize the returned JSON data into structured tables, and handle potential issues such as missing fields or inconsistent formats. |
| 43 | +
|
| 44 | +Data validation and cleaning. |
| 45 | +Because API responses can contain missing or malformed records, we implemented validation functions that check required columns, ensure timestamps are properly parsed, and filter out unusable rows before analysis. |
| 46 | +
|
| 47 | +Time-series aggregation and transformation. |
| 48 | +Although the original dataset is high-frequency, meaningful visualization required aggregating data across time and grouping it by fuel type. This required careful handling of timestamps and consistent units. |
| 49 | +
|
| 50 | +Designing interpretable anomaly detection. |
| 51 | +Translating an abstract idea like “grid stress” into a measurable indicator required selecting a clear statistical rule and implementing it in a way that users can understand and interact with. |
| 52 | +""") |
| 53 | + |
| 54 | +st.subheader("Decisions About Weather Data Integration") |
| 55 | +st.markdown(""" |
| 56 | +The original proposal included a second phase involving integration of NOAA weather data. After beginning exploratory work, we have decided thus far not to implement this component. |
| 57 | +While weather data are highly relevant to electricity demand patterns, matching weather station observations to EIA balancing authorities introduces several additional layers of complexity, including spatial aggregation, inconsistent station reporting, and potential differences in time resolution. Given the time constraints of the assignment, incorporating this dataset would have significantly expanded the scope of the project. |
| 58 | +Instead, we prioritized building a simple yet stable analysis we felt confident in using the EIA dataset alone. However, either weather integration or a case study analyzing a particular extreme event, remains two directions we can take future work, for example for analyzing demand spikes associated with a recent heat waves or winter storm. |
| 59 | +""") |
| 60 | + |
| 61 | +st.divider() |
| 62 | + |
| 63 | +# --------------------------------------------------- |
| 64 | +# TA FEEDBACK (MIDDLE SECTION) |
| 65 | +# --------------------------------------------------- |
| 66 | + |
| 67 | +st.header("Teaching Assistant Feedback") |
| 68 | + |
| 69 | +st.subheader("Sneha's Feedback and Suggestions") |
| 70 | +st.markdown(""" |
| 71 | +Hi team, thanks for your proposal! Good start; here are a few important concerns to resolve: |
| 72 | +
|
| 73 | +The project scope is currently very large. You’re mixing multiple dimensions at once: multi-region comparison, high-frequency time series, fuel mix analysis, weather integration, etc. You should narrow this significantly. |
| 74 | +For example, you might focus on peak demand behavior in one ISO/RTO, or analyze a single class of weather events (e.g., winter storms or heat waves), rather than trying to cover all extremes everywhere. |
| 75 | +You can also decide whether you are studying general demand patterns or specific case-study events. A well-defined event-driven analysis (e.g., one winter storm) can be analytically rich rather than a broad exploratory dashboard across all regions and times. |
| 76 | +Also, can you clarify how you are measuring or planning to look at “periods of elevated grid stress"? |
| 77 | +Are you defining stress based on demand spikes, external event lists, or some threshold rule? |
| 78 | +Would be helpful to dive a bit more deeply into how those periods will be detected, as well as what data source or metric makes them observable. |
| 79 | +The notebook currently doesn't have any code in it. Please update! It needs to demonstrate working code that actually loads and inspects the data from the EIA API. |
| 80 | +Please also verify early that the NOAA data is accessible, clean, and usable at the resolution you want. Weather datasets often look straightforward in documentation but can be messy in practice (inconsistent reporting, metadata issues, etc.). Before committing to Phase 2, try pulling a sample region and confirm that you can realistically match it to a balancing authority. |
| 81 | +Let me know if you have any questions or concerns about the feedback! Remember that these proposals are not set in stone, so feel free to modify as necessary. And of course, my and Professor Feldman's OH are always open to discuss. Good luck! |
| 82 | +""") |
| 83 | + |
| 84 | +st.divider() |
| 85 | + |
| 86 | +# --------------------------------------------------- |
| 87 | +# ORIGINAL PROPOSAL (BOTTOM SECTION) |
| 88 | +# --------------------------------------------------- |
| 89 | + |
| 90 | +st.header("Original Project Proposal") |
| 91 | + |
| 92 | +st.subheader("1) Dataset") |
| 93 | + |
| 94 | +st.markdown(""" |
| 95 | +**EIA Hourly Electric Grid Monitor** |
| 96 | +
|
| 97 | +Source: U.S. Energy Information Administration (EIA) |
| 98 | +API - Electric Power Operations (Daily and Hourly) |
| 99 | +https://www.eia.gov/opendata/browser/electricity/rto |
| 100 | +
|
| 101 | +API documentation: |
| 102 | +https://www.eia.gov/opendata/documentation.php |
| 103 | +
|
| 104 | +Frequency: Hourly, updated daily |
| 105 | +
|
| 106 | +Coverage: Balancing Authorities and Regional Transmission Organizations across the U.S. |
| 107 | +
|
| 108 | +Key variables: |
| 109 | +- Electricity demand (load) |
| 110 | +- Net generation |
| 111 | +- Generation by fuel type (coal, gas, nuclear, wind, solar, etc.) |
| 112 | +- Interchange (imports/exports) |
| 113 | +""") |
| 114 | + |
| 115 | +st.markdown(""" |
| 116 | +**Optional second dataset: NOAA Weather Data** |
| 117 | +
|
| 118 | +Source: NOAA Integrated Surface Database (ISD) |
| 119 | +
|
| 120 | +Variables: |
| 121 | +- Temperature |
| 122 | +- Precipitation |
| 123 | +- Snow depth |
| 124 | +- Wind speed |
| 125 | +- Severe weather indicators |
| 126 | +""") |
| 127 | + |
| 128 | +st.subheader("2) Research Questions") |
| 129 | + |
| 130 | +st.markdown(""" |
| 131 | +### Phase 1 Research Questions (EIA Data) |
| 132 | +
|
| 133 | +- How does the electricity generation mix change during periods of unusually high or low demand? |
| 134 | +- During demand spikes, which fuel types increase the most across regions? |
| 135 | +- Are periods of elevated grid stress observable in the EIA data? |
| 136 | +- Can we identify anomalous hours or days where regions rely more heavily on imports or rapid generation shifts? |
| 137 | +
|
| 138 | +### Phase 2 Research Questions (if time permits) |
| 139 | +
|
| 140 | +- How are temperature extremes associated with changes in electricity demand across regions? |
| 141 | +- Do regions exhibit different demand sensitivity to heat and cold? |
| 142 | +- Do adverse weather conditions coincide with changes in the electricity generation mix or power flows? |
| 143 | +- How quickly does the grid respond and recover from extreme weather events? |
| 144 | +""") |
| 145 | + |
| 146 | +st.subheader("3) Notebook Link") |
| 147 | + |
| 148 | +st.markdown(""" |
| 149 | +https://github.com/advanced-computing/purple-flamingo/pull/1 |
| 150 | +""") |
| 151 | + |
| 152 | +st.subheader("4) Target Visualization") |
| 153 | + |
| 154 | +st.markdown(""" |
| 155 | +Example: Visualization of a spike in coal generation in New England during Winter Storm Fern, |
| 156 | +using EIA hourly grid monitor data. |
| 157 | +""") |
| 158 | + |
| 159 | +st.subheader("5) Known Unknowns") |
| 160 | + |
| 161 | +st.markdown(""" |
| 162 | +- Which grid events will be most interesting to analyze? |
| 163 | +- Which ISO/RTO regions have the most reliable data? |
| 164 | +- Whether NOAA weather stations can be cleanly matched to balancing authorities |
| 165 | +- Whether fuel and load variables are consistently reported |
| 166 | +- Whether weather variables are standardized across stations |
| 167 | +""") |
| 168 | + |
| 169 | +st.subheader("Anticipated Challenges") |
| 170 | + |
| 171 | +st.markdown(""" |
| 172 | +**High-frequency time series data** |
| 173 | +- Managing hourly data volumes |
| 174 | +- Efficient ingestion and querying |
| 175 | +
|
| 176 | +**Data quality issues** |
| 177 | +- Missing observations |
| 178 | +- Reporting anomalies |
| 179 | +
|
| 180 | +**API limitations** |
| 181 | +- Learning API structure |
| 182 | +- Handling rate limits |
| 183 | +
|
| 184 | +**Definitions** |
| 185 | +- Defining grid stress |
| 186 | +- Defining adverse weather events |
| 187 | +
|
| 188 | +**Phase 2 integration** |
| 189 | +- Matching NOAA weather stations with EIA regions |
| 190 | +- Handling time-series alignment |
| 191 | +- Geospatial aggregation |
| 192 | +""") |
0 commit comments