dschandra commited on
Commit
21bfd3b
·
verified ·
1 Parent(s): dbc0b0b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -64,7 +64,7 @@ def generate_heatmap_for_site(site_name, df):
64
  layer = pdk.Layer(
65
  "ScatterplotLayer",
66
  data=site_df,
67
- get_position='[Longitude__c, Latitude__c]', # Ensure the column names are correct
68
  get_color="color",
69
  get_radius=80, # You can adjust the radius if needed
70
  pickable=True,
@@ -72,8 +72,8 @@ def generate_heatmap_for_site(site_name, df):
72
  )
73
 
74
  # Handle potential missing coordinates for map center
75
- latitude = site_df["Latitude__c"].mean() if not site_df["Latitude__c"].isnull().all() else 0
76
- longitude = site_df["Longitude__c"].mean() if not site_df["Longitude__c"].isnull().all() else 0
77
 
78
  # View state for the map
79
  view_state = pdk.ViewState(
 
64
  layer = pdk.Layer(
65
  "ScatterplotLayer",
66
  data=site_df,
67
+ get_position='[Location_Longitude__c, Location_Latitude__c]', # Ensure the column names are correct
68
  get_color="color",
69
  get_radius=80, # You can adjust the radius if needed
70
  pickable=True,
 
72
  )
73
 
74
  # Handle potential missing coordinates for map center
75
+ latitude = site_df["Location_Latitude__c"].mean() if not site_df["Location_Latitude__c"].isnull().all() else 0
76
+ longitude = site_df["Location_Longitude__c"].mean() if not site_df["Location_Longitude__c"].isnull().all() else 0
77
 
78
  # View state for the map
79
  view_state = pdk.ViewState(