Skip to content

Commit cdbbb5b

Browse files
author
Adriano Sanges
committed
Update main.py to enhance UI and improve user interaction
- Changed the title to "Dati immobiliari Agenzia delle Entrate" for clarity. - Replaced sidebar selectboxes with standard selectboxes for region, comune, and tipologia to streamline the user interface.
1 parent e62b7f0 commit cdbbb5b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

main.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ def main():
2222
init_db(conn)
2323

2424
st.set_page_config(layout="wide")
25-
st.title("Dati immobiliari")
25+
26+
st.title("Dati immobiliari Agenzia delle Entrate")
2627
st.caption("Dati del 2024")
2728

2829

@@ -39,15 +40,15 @@ def main():
3940
}
4041

4142
regioni_dataset = get_regioni(conn)["Regione"]
42-
selected_regione =st.sidebar.selectbox("Seleziona la regione", regioni_dataset)
43+
selected_regione =st.selectbox("Seleziona la regione", regioni_dataset)
4344

4445
if(selected_regione != None):
4546
comuni_dataset = get_comuni(conn, selected_regione)["Comune_descrizione"]
46-
selected_comune = st.sidebar.selectbox("Seleziona il comune", comuni_dataset)
47+
selected_comune = st.selectbox("Seleziona il comune", comuni_dataset)
4748

4849
if(selected_comune != None):
4950

50-
selected_tipologia = st.sidebar.selectbox("Seleziona la tipologia", ("Abitazioni civili", "Uffici", "Negozi"))
51+
selected_tipologia = st.selectbox("Seleziona la tipologia", ("Abitazioni civili", "Uffici", "Negozi"))
5152

5253
if(selected_tipologia != None):
5354
result = conn.execute(f"SELECT * FROM joined_data WHERE Regione = '{selected_regione}' and Comune_descrizione = '{selected_comune}' and Descr_Tipologia = '{selected_tipologia}'").df()

0 commit comments

Comments
 (0)