Load data with a different CRS

This example illustrates how to load data from a GeoPandas dataset with a CRS different than EPSG:4326, the one that CARTOframes needs to visualize layers, and the one CARTO needs to upload data.


In [1]:
from cartoframes.viz import Layer
from geopandas import datasets, read_file

In [2]:
gdf = read_file(datasets.get_path('nybb'))

In [3]:
str(gdf.crs)


Out[3]:
'epsg:2263'

In [4]:
gdf.to_crs(epsg=4326, inplace=True)

In [5]:
Layer(gdf)


Out[5]:
:
StackTrace
    ">