Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -88,24 +88,9 @@ filtered_data = data # Initialize with the entire dataset
|
|
88 |
# Calculate a zoom level based on the maximum distance
|
89 |
zoom_level = 13
|
90 |
|
91 |
-
font_url = "https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap"
|
92 |
-
|
93 |
-
title_html = f"""
|
94 |
-
<style>
|
95 |
-
@import url('{font_url}');
|
96 |
-
h1 {{
|
97 |
-
font-family: 'Quicksand', sans-serif;
|
98 |
-
}}
|
99 |
-
</style>
|
100 |
-
<span style='color: #566f71; font-size: 50px;'>aval</span>
|
101 |
-
<span style='color: #edb600; font-size: 50px;'>ia</span>
|
102 |
-
<span style='color: #566f71; font-size: 50px;'>.se</span>
|
103 |
-
"""
|
104 |
-
|
105 |
# Create a sidebar for controls
|
106 |
with st.sidebar:
|
107 |
st.image(image1, width=200)
|
108 |
-
#st.markdown(title_html, unsafe_allow_html=True)
|
109 |
|
110 |
# Add a dropdown for filtering "Fonte"
|
111 |
selected_fonte = st.selectbox('Finalidade', data['Fonte'].unique(), index=data['Fonte'].unique().tolist().index('Venda'))
|
@@ -176,9 +161,6 @@ with st.sidebar:
|
|
176 |
data_tipo = data_tipo[(data_tipo['Atotal'].between(atotal_min, atotal_max)) &
|
177 |
(data_tipo['Apriv'].between(apriv_min, apriv_max))]
|
178 |
|
179 |
-
# Links to other apps at the bottom of the sidebar
|
180 |
-
#st.sidebar.markdown(factor_html, unsafe_allow_html=True)
|
181 |
-
#st.sidebar.markdown(evo_html, unsafe_allow_html=True)
|
182 |
|
183 |
filtered_data = data_tipo[data_tipo.apply(lambda x: calculate_distance(x['latitude'], x['longitude'], custom_lat, custom_lon), axis=1) <= radius_in_meters]
|
184 |
filtered_data = filtered_data.dropna() # Drop rows with NaN values
|
@@ -292,7 +274,22 @@ with tab3:
|
|
292 |
else:
|
293 |
st.warning(f"**Dados insuficientes para inferência do valor. Mínimo necessário:** {k_threshold}")
|
294 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
|
|
|
|
|
|
|
296 |
# Generate the profile report
|
297 |
with st.spinner('Carregando análise...'):
|
298 |
profile = ProfileReport(filtered_data, title="Análise Exploratória dos Dados", explorative=True)
|
|
|
88 |
# Calculate a zoom level based on the maximum distance
|
89 |
zoom_level = 13
|
90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
# Create a sidebar for controls
|
92 |
with st.sidebar:
|
93 |
st.image(image1, width=200)
|
|
|
94 |
|
95 |
# Add a dropdown for filtering "Fonte"
|
96 |
selected_fonte = st.selectbox('Finalidade', data['Fonte'].unique(), index=data['Fonte'].unique().tolist().index('Venda'))
|
|
|
161 |
data_tipo = data_tipo[(data_tipo['Atotal'].between(atotal_min, atotal_max)) &
|
162 |
(data_tipo['Apriv'].between(apriv_min, apriv_max))]
|
163 |
|
|
|
|
|
|
|
164 |
|
165 |
filtered_data = data_tipo[data_tipo.apply(lambda x: calculate_distance(x['latitude'], x['longitude'], custom_lat, custom_lon), axis=1) <= radius_in_meters]
|
166 |
filtered_data = filtered_data.dropna() # Drop rows with NaN values
|
|
|
274 |
else:
|
275 |
st.warning(f"**Dados insuficientes para inferência do valor. Mínimo necessário:** {k_threshold}")
|
276 |
|
277 |
+
# CSS para alterar as cores
|
278 |
+
custom_css = """
|
279 |
+
<style>
|
280 |
+
.variable-title {
|
281 |
+
color: #FFD700; /* Amarelo Ouro */
|
282 |
+
}
|
283 |
+
.tab-title {
|
284 |
+
color: #FFD700; /* Amarelo Ouro */
|
285 |
+
}
|
286 |
+
/* Adicione mais seletores conforme necessário */
|
287 |
+
</style>
|
288 |
+
"""
|
289 |
|
290 |
+
# Injeta o CSS na página
|
291 |
+
st.markdown(custom_css, unsafe_allow_html=True)
|
292 |
+
|
293 |
# Generate the profile report
|
294 |
with st.spinner('Carregando análise...'):
|
295 |
profile = ProfileReport(filtered_data, title="Análise Exploratória dos Dados", explorative=True)
|