in build_pipeline/pipelines/preprocess.py [0:0]
def load_zones(zones_dir: str):
logging.info(f"Loading zones from {zones_dir}")
# Load the shape file and get the geometry and lat/lon
zone_df = gpd.read_file(os.path.join(zones_dir, "taxi_zones.shp"))
# Get centroids as EPSG code of 3310 to measure distance
zone_df["centroid"] = zone_df.geometry.centroid.to_crs(epsg=3310)
# Convert cordinates to the WSG84 lat/long CRS has a EPSG code of 4326.
zone_df["latitude"] = zone_df.centroid.to_crs(epsg=4326).x
zone_df["longitude"] = zone_df.centroid.to_crs(epsg=4326).y
return zone_df