def download(cls, **kwargs): city_limits = CityLimits.get().to_crs(epsg=4326) subway = osm2gpd.get(*city_limits.total_bounds, where="station=subway").to_crs(epsg=4326) return (gpd.sjoin(subway, city_limits, op="within").to_crs(epsg=EPSG).assign( x=lambda df: df.geometry.x, y=lambda df: df.geometry.y))
def download(cls, **kwargs): city_limits = CityLimits.get().to_crs(epsg=4326) df = osm2gpd.get(*city_limits.total_bounds, where="amenity=bar").to_crs(epsg=4326) return (gpd.sjoin(df, city_limits, op="within").to_crs(epsg=EPSG).assign( x=lambda df: df.geometry.x, y=lambda df: df.geometry.y))