0

I have a CSV file which basically contains this info (Pandas dataframe in Python):

Kepler Pandas dataframe

I uploaded it to Kepler.gl to visualize the data, but the site doesn't read the coordinates.

Could it be because of the type of the data?

 user_home_lat     float64
 user_home_long    float64
 dtype: object

Or any other reason?

Thanks.

Hernan
  • 63
  • 3
  • 8

1 Answers1

0

So there's a few ways to approach this, but I may suggest

Points = gpd.GeoDataFrame(df_kepler , geometry=gpd.points_from_xy(df_kepler.user_home_long, df_kepler.user_home_lat), crs = "EPSG:4326")

to create a geodataframe with a point geometry you can then import into Kepler.gl.

if you need to change data types, you can use (in this example, turning your long column to an int)

df_kepler['Cuser_home_long'] = df_kepler['user_home_long'].astype(int)