@@ -16,14 +16,24 @@ def load_data(url):
1616 return pd .read_csv (url )
1717
1818# 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+
2737
2838# Filter the 2020 dataframe
2939df2020 = df [df ['SalaryUSD' ] < 200000 ]
@@ -136,7 +146,7 @@ def plot_value_counts(column_name):
136146
137147if year == '2018' :
138148 main .main_analysis (df2018 )
139- main .main_analysis_2 (df2018 )
149+ main .main_analysis_2 (df2018 , year )
140150
141151 visual , analysis = st .columns ((3 , 1 ))
142152 with visual :
@@ -209,7 +219,7 @@ def plot_value_counts(column_name):
209219
210220elif year == '2019' :
211221 main .main_analysis (df2019 )
212- main .main_analysis_2 (df2019 )
222+ main .main_analysis_2 (df2019 , year )
213223
214224 visual , analysis = st .columns ((3 , 1 ))
215225 with visual :
@@ -228,7 +238,7 @@ def plot_value_counts(column_name):
228238
229239elif year == '2020' :
230240 main .main_analysis (df2020 )
231- main .main_analysis_2 (df2020 )
241+ main .main_analysis_2 (df2020 , year )
232242
233243 visual , analysis = st .columns ((3 , 1 ))
234244 with visual :
@@ -247,7 +257,7 @@ def plot_value_counts(column_name):
247257
248258elif year == '2021' :
249259 main .main_analysis (df2021 )
250- main .common_analysis_2021_2022 (df2021 )
260+ main .common_analysis_2021_2022 (df2021 , year )
251261 visual , analysis = st .columns ((3 , 1 ))
252262 with visual :
253263 fig = func .plot_valuecounts_plotly (df2021 ,'NEWStuck' )
@@ -281,7 +291,7 @@ def plot_value_counts(column_name):
281291
282292else :
283293 main .main_analysis (df2022 )
284- main .common_analysis_2021_2022 (df2022 )
294+ main .common_analysis_2021_2022 (df2022 , year )
285295
286296 fig = func .compare_language_columns_and_plot (df2022 , 'OpSysPersonal use' , 'OpSysProfessional use' )
287297
0 commit comments