Ashar086 commited on
Commit
548822f
·
verified ·
1 Parent(s): 701b8e3

Update geospatial_visualization.py

Browse files
Files changed (1) hide show
  1. geospatial_visualization.py +3 -2
geospatial_visualization.py CHANGED
@@ -4,7 +4,8 @@ import matplotlib.pyplot as plt
4
 
5
  class GeospatialVisualizer:
6
  def __init__(self):
7
- self.world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))
 
8
 
9
  def visualize(self, data, location_column, value_column):
10
  # Merge data with world map
@@ -51,4 +52,4 @@ class GeospatialVisualizer:
51
  ax.set_title(f'Bubble Map: {size_column} by Location')
52
  ax.axis('off')
53
 
54
- return fig
 
4
 
5
  class GeospatialVisualizer:
6
  def __init__(self):
7
+ # Replace the path below with the actual path where you've downloaded the shapefile
8
+ self.world = gpd.read_file("/path_to_your_downloaded_shapefile/naturalearth_lowres.shp")
9
 
10
  def visualize(self, data, location_column, value_column):
11
  # Merge data with world map
 
52
  ax.set_title(f'Bubble Map: {size_column} by Location')
53
  ax.axis('off')
54
 
55
+ return fig