fschwartzer commited on
Commit
c603f69
1 Parent(s): dc425c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -5
app.py CHANGED
@@ -2,6 +2,7 @@ import streamlit as st
2
  import pandas as pd
3
  import numpy as np
4
  from datetime import datetime, timedelta
 
5
 
6
  #st.set_page_config(layout="wide")
7
 
@@ -80,13 +81,23 @@ filtered_df = pd.concat(adjusted_rows)
80
  #col1, col2, col3 = st.columns(3) # This divides the page into three equal parts
81
 
82
  # Set custom width for columns
83
- col1_width = 260
84
- col2_width = 260
85
- col3_width = 260
86
  col1, col2, col3 = st.columns([col1_width, col2_width, col3_width])
87
 
88
  # Display the Forecasts values in the first column
89
  col1.header('Composição da RLIT')
 
 
 
 
 
 
 
 
 
 
90
 
91
  # Display the Forecasts values in the first column
92
  col2.header('Valores previstos')
@@ -146,8 +157,8 @@ else:
146
  # Display the table in the third column
147
  #col3 = st.columns(1) # You can use st.columns(1) to create a single column layout
148
 
149
- col4_width = 400
150
- col5_width = 400
151
  col4, col5 = st.columns([col4_width, col5_width])
152
 
153
  col4.header('Realizado X Previsto')
 
2
  import pandas as pd
3
  import numpy as np
4
  from datetime import datetime, timedelta
5
+ import matplotlib.pyplot as plt
6
 
7
  #st.set_page_config(layout="wide")
8
 
 
81
  #col1, col2, col3 = st.columns(3) # This divides the page into three equal parts
82
 
83
  # Set custom width for columns
84
+ col1_width = 300
85
+ col2_width = 300
86
+ col3_width = 300
87
  col1, col2, col3 = st.columns([col1_width, col2_width, col3_width])
88
 
89
  # Display the Forecasts values in the first column
90
  col1.header('Composição da RLIT')
91
+ labels = table_data['Conta']
92
+ sizes = for i in table_data['Próximos 12 meses'] : (i/total_sum)*100
93
+
94
+ fig1, ax1 = plt.subplots()
95
+ ax1.pie(sizes, labels=labels, autopct='%1.1f%%',
96
+ shadow=True, startangle=90)
97
+ ax1.axis('equal') # Equal aspect ratio ensures that pie is drawn as a circle.
98
+
99
+ col.pyplot(fig1)
100
+
101
 
102
  # Display the Forecasts values in the first column
103
  col2.header('Valores previstos')
 
157
  # Display the table in the third column
158
  #col3 = st.columns(1) # You can use st.columns(1) to create a single column layout
159
 
160
+ col4_width = 450
161
+ col5_width = 450
162
  col4, col5 = st.columns([col4_width, col5_width])
163
 
164
  col4.header('Realizado X Previsto')