Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,33 @@ import pyarrow.parquet as pq
|
|
11 |
# Set page config for a wider layout and custom theme
|
12 |
st.set_page_config(layout="wide", page_title="Job Listings Dashboard")
|
13 |
|
14 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
# Hugging Face setup
|
17 |
HF_TOKEN = st.secrets["HF_TOKEN"]
|
@@ -69,7 +95,13 @@ def create_chart(data, _x, y, title, color_sequence):
|
|
69 |
def create_time_series(df):
|
70 |
df_by_date = df.groupby('date_posted').size().reset_index(name='count')
|
71 |
fig = px.line(df_by_date, x='date_posted', y='count', title="Job Postings Over Time", color_discrete_sequence=['#4e79a7'])
|
72 |
-
fig.update_layout(
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
return fig
|
74 |
|
75 |
@st.cache_data
|
@@ -135,7 +167,7 @@ def display_dashboard(df):
|
|
135 |
st.plotly_chart(fig, use_container_width=True)
|
136 |
|
137 |
# Job Postings Over Time Chart
|
138 |
-
fig_time_series = create_time_series(
|
139 |
st.plotly_chart(fig_time_series, use_container_width=True)
|
140 |
|
141 |
col3, col4 = st.columns(2)
|
|
|
11 |
# Set page config for a wider layout and custom theme
|
12 |
st.set_page_config(layout="wide", page_title="Job Listings Dashboard")
|
13 |
|
14 |
+
# Custom CSS for black background and styling
|
15 |
+
st.markdown("""
|
16 |
+
<style>
|
17 |
+
.stApp {
|
18 |
+
background-color: #000000;
|
19 |
+
color: #FFFFFF;
|
20 |
+
}
|
21 |
+
.stButton>button {
|
22 |
+
background-color: #4e79a7;
|
23 |
+
color: white;
|
24 |
+
}
|
25 |
+
.stSelectbox, .stMultiSelect {
|
26 |
+
color: #FFFFFF;
|
27 |
+
}
|
28 |
+
.stDataFrame {
|
29 |
+
background-color: #1E1E1E;
|
30 |
+
}
|
31 |
+
.plotly-graph-div {
|
32 |
+
background-color: #1E1E1E;
|
33 |
+
}
|
34 |
+
.big-font {
|
35 |
+
font-size: 48px;
|
36 |
+
font-weight: bold;
|
37 |
+
text-align: center;
|
38 |
+
}
|
39 |
+
</style>
|
40 |
+
""", unsafe_allow_html=True)
|
41 |
|
42 |
# Hugging Face setup
|
43 |
HF_TOKEN = st.secrets["HF_TOKEN"]
|
|
|
95 |
def create_time_series(df):
|
96 |
df_by_date = df.groupby('date_posted').size().reset_index(name='count')
|
97 |
fig = px.line(df_by_date, x='date_posted', y='count', title="Job Postings Over Time", color_discrete_sequence=['#4e79a7'])
|
98 |
+
fig.update_layout(
|
99 |
+
plot_bgcolor='rgba(0,0,0,0)',
|
100 |
+
paper_bgcolor='rgba(0,0,0,0)',
|
101 |
+
font_color='#FFFFFF',
|
102 |
+
xaxis_title="Date",
|
103 |
+
yaxis_title="Number of Job Postings"
|
104 |
+
)
|
105 |
return fig
|
106 |
|
107 |
@st.cache_data
|
|
|
167 |
st.plotly_chart(fig, use_container_width=True)
|
168 |
|
169 |
# Job Postings Over Time Chart
|
170 |
+
fig_time_series = create_time_series(df)
|
171 |
st.plotly_chart(fig_time_series, use_container_width=True)
|
172 |
|
173 |
col3, col4 = st.columns(2)
|