@@ -16,14 +16,24 @@ def load_data(url):
16
16
return pd .read_csv (url )
17
17
18
18
# Loading data files from the 'streamlit' directory
19
- df = load_data ('https://raw.githubusercontent.com/Recode-Hive/Stackoverflow-Analysis/main/streamlit/df2020.csv' )
20
- df2018 = load_data ('https://raw.githubusercontent.com/Recode-Hive/Stackoverflow-Analysis/main/streamlit/df2018.csv' )
21
- full_data2018 = load_data ('https://raw.githubusercontent.com/Recode-Hive/Stackoverflow-Analysis/main/streamlit/survey_results_sample_2018.csv' )
22
- full_data2019 = load_data ('https://raw.githubusercontent.com/Recode-Hive/Stackoverflow-Analysis/main/streamlit/survey_results_sample_2019.csv' )
23
- full_df2020 = load_data ('https://raw.githubusercontent.com/Recode-Hive/Stackoverflow-Analysis/main/streamlit/survey_results_sample_2020.csv' )
24
- df2019 = load_data ('https://raw.githubusercontent.com/Recode-Hive/Stackoverflow-Analysis/main/streamlit/df2019.csv' )
25
- df2021 = load_data ('https://raw.githubusercontent.com/Recode-Hive/Stackoverflow-Analysis/main/streamlit/df2021.csv' )
26
- df2022 = load_data ('https://raw.githubusercontent.com/Recode-Hive/Stackoverflow-Analysis/main/streamlit/df2022.csv' )
19
+ # df = load_data('https://raw.githubusercontent.com/Recode-Hive/Stackoverflow-Analysis/main/streamlit/df2020.csv')
20
+ # df2018 = load_data('https://raw.githubusercontent.com/Recode-Hive/Stackoverflow-Analysis/main/streamlit/df2018.csv')
21
+ # full_data2018 = load_data('https://raw.githubusercontent.com/Recode-Hive/Stackoverflow-Analysis/main/streamlit/survey_results_sample_2018.csv')
22
+ # full_data2019 = load_data('https://raw.githubusercontent.com/Recode-Hive/Stackoverflow-Analysis/main/streamlit/survey_results_sample_2019.csv')
23
+ # full_df2020 = load_data('https://raw.githubusercontent.com/Recode-Hive/Stackoverflow-Analysis/main/streamlit/survey_results_sample_2020.csv')
24
+ # df2019 = load_data('https://raw.githubusercontent.com/Recode-Hive/Stackoverflow-Analysis/main/streamlit/df2019.csv')
25
+ # df2021 = load_data('https://raw.githubusercontent.com/Recode-Hive/Stackoverflow-Analysis/main/streamlit/df2021.csv')
26
+ # df2022 = load_data('https://raw.githubusercontent.com/Recode-Hive/Stackoverflow-Analysis/main/streamlit/df2022.csv')
27
+
28
+ df = load_data ('df2020.csv' )
29
+ df2018 = load_data ('df2018.csv' )
30
+ full_data2018 = load_data ('survey_results_sample_2018.csv' )
31
+ full_data2019 = load_data ('survey_results_sample_2019.csv' )
32
+ full_df2020 = load_data ('survey_results_sample_2020.csv' )
33
+ df2019 = load_data ('df2019.csv' )
34
+ df2021 = load_data ('df2021.csv' )
35
+ df2022 = load_data ('df2022.csv' )
36
+
27
37
28
38
# Filter the 2020 dataframe
29
39
df2020 = df [df ['SalaryUSD' ] < 200000 ]
@@ -136,7 +146,7 @@ def plot_value_counts(column_name):
136
146
137
147
if year == '2018' :
138
148
main .main_analysis (df2018 )
139
- main .main_analysis_2 (df2018 )
149
+ main .main_analysis_2 (df2018 , year )
140
150
141
151
visual , analysis = st .columns ((3 , 1 ))
142
152
with visual :
@@ -209,7 +219,7 @@ def plot_value_counts(column_name):
209
219
210
220
elif year == '2019' :
211
221
main .main_analysis (df2019 )
212
- main .main_analysis_2 (df2019 )
222
+ main .main_analysis_2 (df2019 , year )
213
223
214
224
visual , analysis = st .columns ((3 , 1 ))
215
225
with visual :
@@ -228,7 +238,7 @@ def plot_value_counts(column_name):
228
238
229
239
elif year == '2020' :
230
240
main .main_analysis (df2020 )
231
- main .main_analysis_2 (df2020 )
241
+ main .main_analysis_2 (df2020 , year )
232
242
233
243
visual , analysis = st .columns ((3 , 1 ))
234
244
with visual :
@@ -247,7 +257,7 @@ def plot_value_counts(column_name):
247
257
248
258
elif year == '2021' :
249
259
main .main_analysis (df2021 )
250
- main .common_analysis_2021_2022 (df2021 )
260
+ main .common_analysis_2021_2022 (df2021 , year )
251
261
visual , analysis = st .columns ((3 , 1 ))
252
262
with visual :
253
263
fig = func .plot_valuecounts_plotly (df2021 ,'NEWStuck' )
@@ -281,7 +291,7 @@ def plot_value_counts(column_name):
281
291
282
292
else :
283
293
main .main_analysis (df2022 )
284
- main .common_analysis_2021_2022 (df2022 )
294
+ main .common_analysis_2021_2022 (df2022 , year )
285
295
286
296
fig = func .compare_language_columns_and_plot (df2022 , 'OpSysPersonal use' , 'OpSysProfessional use' )
287
297
0 commit comments