TDAI-DS commited on
Commit
75e4b7b
·
verified ·
1 Parent(s): 1d3c65d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +35 -14
app.py CHANGED
@@ -16,9 +16,9 @@ st.title("Faculty Collaboration Network Analysis -FY23 & FY24")
16
  # Load data
17
  @st.cache_data
18
  def load_data():
19
- award_df = pd.read_csv('award_cleaned.csv')
20
- award_df_remove_amount = pd.read_csv('award_cleaned_remove_amount.csv')
21
- faculty_college_df = pd.read_csv('faculty_college_jenny_manual.csv')
22
  return award_df, award_df_remove_amount, faculty_college_df
23
 
24
 
@@ -42,6 +42,27 @@ def create_network(df, college_map):
42
  # faculty_colleges = defaultdict(list)
43
  faculty_amounts = defaultdict(float)
44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  # colorblind_palette =[
46
  # '#FF6B6B', '#4ECDC4', '#45B7D1', '#96CEB4',
47
  # '#FFEEAD', '#D4A5A5', '#779ECB', '#FFB347',
@@ -49,16 +70,16 @@ def create_network(df, college_map):
49
  # '#FFAAA5', '#C8C6A7', '#92967D'
50
  # ]
51
 
52
- colorblind_palette = [
53
- '#E6194B', # Bright red
54
- '#3CB44B', # Green
55
- '#4363D8', # Blue
56
- '#FFE119', # Yellow
57
- '#911EB4', # Purple
58
- '#F58231', # Orange
59
- '#42D4F4', # Cyan
60
- '#FABEBE' # Light pink
61
- ]
62
 
63
 
64
  # colorblind_palette = [
@@ -164,7 +185,7 @@ nt = Network(
164
  )
165
  nt.from_nx(G)
166
  nt.toggle_hide_edges_on_drag(True)
167
- nt.show_buttons(filter_=['physics', 'nodes'])
168
 
169
  # Save and show network
170
  nt.save_graph('network.html')
 
16
  # Load data
17
  @st.cache_data
18
  def load_data():
19
+ award_df = pd.read_csv('award.csv')
20
+ award_df_remove_amount = pd.read_csv('award_display.csv')
21
+ faculty_college_df = pd.read_csv('faculty_college.csv')
22
  return award_df, award_df_remove_amount, faculty_college_df
23
 
24
 
 
42
  # faculty_colleges = defaultdict(list)
43
  faculty_amounts = defaultdict(float)
44
 
45
+ colorblind_palette = [
46
+ '#E6194B', # Emergency Red (stop-sign red)
47
+ '#3CB44B', # Traffic Cone Green
48
+ '#4363D8', # Deep Ocean Blue
49
+ '#FFE119', # Taxi Yellow
50
+ '#911EB4', # Royal Purple
51
+ '#F58231', # Construction Orange
52
+ '#42D4F4', # Poolside Cyan
53
+ '#FABEBE', # Bubblegum Pink (lightest pink kept)
54
+ '#00A4CC', # Airplane Blue (sky-cyan hybrid)
55
+ '#A6FF47', # Alien Green (neon yellow-green)
56
+ '#FF4500', # Lava Orange (red-orange differentiation)
57
+ '#5E0DAC', # Amethyst Purple (blue-purple hybrid)
58
+ '#00FFAF', # Glowstick Green (blue-green)
59
+ '#FF9933', # Highway Orange (golden orange)
60
+ '#4B0082', # Midnight Indigo (deep blue-purple)
61
+ '#8B0000', # Barn Red (dark red differentiation)
62
+ '#00CED1', # Tropical Teal (bright blue-green)
63
+ '#FFD300' # School Bus Yellow (pure golden yellow)
64
+ ]
65
+
66
  # colorblind_palette =[
67
  # '#FF6B6B', '#4ECDC4', '#45B7D1', '#96CEB4',
68
  # '#FFEEAD', '#D4A5A5', '#779ECB', '#FFB347',
 
70
  # '#FFAAA5', '#C8C6A7', '#92967D'
71
  # ]
72
 
73
+ # colorblind_palette = [
74
+ # '#E6194B', # Bright red
75
+ # '#3CB44B', # Green
76
+ # '#4363D8', # Blue
77
+ # '#FFE119', # Yellow
78
+ # '#911EB4', # Purple
79
+ # '#F58231', # Orange
80
+ # '#42D4F4', # Cyan
81
+ # '#FABEBE' # Light pink
82
+ # ]
83
 
84
 
85
  # colorblind_palette = [
 
185
  )
186
  nt.from_nx(G)
187
  nt.toggle_hide_edges_on_drag(True)
188
+ # nt.show_buttons(filter_=['physics', 'nodes'])
189
 
190
  # Save and show network
191
  nt.save_graph('network.html')