Good evening, I am currently trying to download data from a polygon and I can't compile the code because kernel keeps dying. Here is the code:
import geopandas as gpd
import pandas as pd
from shapely.geometry import Point, LineString, Polygon
import networkx as nx
import osmnx as ox
import matplotlib.pyplot as plt
from descartes import PolygonPatch
from IPython.display import IFrame
ox.config(log_console=True, use_cache=True)
place = 'Portugal'
G = ox.gdf_from_place(place)
exploded_G = G.explode()
exploded_G['area'] = exploded_G.area
exploded_G.sort_values(by='area', inplace=True)
Portugal= exploded_G.iloc[-1]['geometry']
g = ox.graph_from_polygon(polygon = Portugal, network_type = 'drive')
Kernel dies in the last line of code I have shared. I don't know why, I have created a new environment in anaconda and ran the code again and once again kernel died. I have uninstalled and installed anaconda and several packages. And yet my efforts have been unsuccessful.
Thank you in advance for the help.
Best regards.