Spaces:
Sleeping
Sleeping
File size: 959 Bytes
949d1e6 c3713aa 949d1e6 c3713aa 949d1e6 c3713aa 949d1e6 c3713aa |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import streamlit as st
# Title of the app
st.title('Solar Panel Calculator')
# Input fields for user to enter data
avg_monthly_usage = st.number_input('Average Monthly Usage (kWh)', min_value=0.0, step=1.0)
peak_demand = st.number_input('Peak Demand (kW)', min_value=0.0, step=0.1)
solar_panel_efficiency = st.number_input('Solar Panel Efficiency (%)', min_value=0.0, max_value=100.0, step=1.0)
# Calculations
annual_energy_consumption = avg_monthly_usage * 12
daily_energy_requirement = annual_energy_consumption / 365
solar_panel_output = daily_energy_requirement / solar_panel_efficiency
# Display results
st.write('### Calculated Results:')
st.write(f'- Annual Energy Consumption: {annual_energy_consumption} kWh')
st.write(f'- Daily Energy Requirement: {daily_energy_requirement} kWh')
st.write(f'- Solar Panel Output: {solar_panel_output} kWh')
# Cost calculations and payback period can be added here based on the specific formula you have in mind |