-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dashboard extentions #34
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Flags with carried forward coverage won't be shown. Click here to find out more. |
@@ -12,8 +14,12 @@ | |||
DB_PASSWORD = os.getenv('DB_PASSWORD') | |||
DB_NAME = os.getenv('DB_NAME') | |||
|
|||
CURRENT_TIME = dt.datetime.now() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, reasonable time window.
raise ConnectionError("Failed to connect to Database") | ||
|
||
def submit_form(self, name, email, postcode, hours_to_charge, charging_preference): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this susceptible to an injection attacks? Okay got MVP but will need altering.
return alt.Chart(df_fuel_types[["publish_time", "generated", "fuel_type"]]).mark_line().encode( | ||
x=alt.X('publish_time:T', title='Time'), y=alt.Y('generated:Q', title='Energy Generated MW'), | ||
color="fuel_type").properties(width=1000, height=1000) | ||
|
||
def generate_piechart(self, pie_df): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a surprisingly simple code snippet for a chart.
with st.container(): | ||
st.header("Where is your energy coming from ? ") | ||
st.write("Interconnectors are high-voltage links allowing electricity to flow between regions or countries, providing crucial flexibility and reliability to power supplies. They help balance energy demand and supply, integrate renewable energy sources, and enhance grid resilience and sustainability. This leads to more stable electricity prices and a more reliable power supply for everyone.") | ||
st.altair_chart(self.generation_interconnection(filtered_df)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good.
Piechart added with small reforrmatting.