Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,6 +15,8 @@ st.title('Final Project')
|
|
| 15 |
|
| 16 |
st.text("The URL for this app is: https://huggingface.co/spaces/445final/final2.moved")
|
| 17 |
|
|
|
|
|
|
|
| 18 |
df = pd.read_csv('State_Employee_Pay.csv')
|
| 19 |
|
| 20 |
df_copy = df.copy
|
|
@@ -32,7 +34,7 @@ df['Position Title'] = df['Position Title'].str.lower()
|
|
| 32 |
df_c = df[df['Agency'] == 'corrections']
|
| 33 |
df_t = df[df['Agency'] == 'transportation']
|
| 34 |
|
| 35 |
-
df1 =
|
| 36 |
|
| 37 |
#agency_division_list = df1['Agency Division'].value_counts().tolist()
|
| 38 |
agency_division_list = df1['Agency Division'].unique().tolist()
|
|
@@ -57,7 +59,7 @@ def division_positions(selected_division):
|
|
| 57 |
y=alt.Y('Position Title:O'),
|
| 58 |
tooltip=['Position Title', 'employeeCount', alt.Tooltip(
|
| 59 |
'meanYTDGross:Q', format='$,.0f', title='Avg YTD Gross')]
|
| 60 |
-
).properties(title=f'Employee Count by Position in: {selected_division}
|
| 61 |
height=alt.Step(20)).interactive()
|
| 62 |
return chart_bar
|
| 63 |
|
|
@@ -66,3 +68,5 @@ if selected_division:
|
|
| 66 |
final_chart = division_positions(selected_division)
|
| 67 |
st.altair_chart(final_chart, use_container_width=True)
|
| 68 |
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
st.text("The URL for this app is: https://huggingface.co/spaces/445final/final2.moved")
|
| 17 |
|
| 18 |
+
|
| 19 |
+
|
| 20 |
df = pd.read_csv('State_Employee_Pay.csv')
|
| 21 |
|
| 22 |
df_copy = df.copy
|
|
|
|
| 34 |
df_c = df[df['Agency'] == 'corrections']
|
| 35 |
df_t = df[df['Agency'] == 'transportation']
|
| 36 |
|
| 37 |
+
df1 = df_t
|
| 38 |
|
| 39 |
#agency_division_list = df1['Agency Division'].value_counts().tolist()
|
| 40 |
agency_division_list = df1['Agency Division'].unique().tolist()
|
|
|
|
| 59 |
y=alt.Y('Position Title:O'),
|
| 60 |
tooltip=['Position Title', 'employeeCount', alt.Tooltip(
|
| 61 |
'meanYTDGross:Q', format='$,.0f', title='Avg YTD Gross')]
|
| 62 |
+
).properties(title=f'Employee Count by Position in: {selected_division}',
|
| 63 |
height=alt.Step(20)).interactive()
|
| 64 |
return chart_bar
|
| 65 |
|
|
|
|
| 68 |
final_chart = division_positions(selected_division)
|
| 69 |
st.altair_chart(final_chart, use_container_width=True)
|
| 70 |
|
| 71 |
+
st.text('Overall Future Edits: Figure out what to do with positions with 1 employee (if anything), Decide whether to use transportation or corrections data, Re-capitalize agency departments')
|
| 72 |
+
st.text('Chart A Future Edits: Order bars by mean YTD Gross, Make all position titles readable, add title')
|