Pydeck arc map not rendering properly

If you’re creating a debugging post, please include the following info:

  1. Are you running your app locally or is it deployed? locally-deployed

  2. If your app is deployed:
    a. Is it deployed on Community Cloud or another hosting platform?
    b. Share the link to the public deployed app. (https://skylite.streamlit.app/)

  3. Share the link to your app’s public GitHub repository (including a requirements file). (streamlit-skylite/pages/geospatial_stats.py at main · yvesmango/streamlit-skylite · GitHub)

  4. Share the full text of the error message (not a screenshot). no error, just the data not rendering on the map.

  5. Share the Streamlit and Python versions.

python 3.12 and Streamlit version 1.32.1

more context:

as you can see from the screenshot, i’m trying to render an arc map via pydeck but my data is not rendering sadly. i turn to the experts on this message board for some troubleshooting help. based on the screenshot provided, the map is rendering but the data is not. my suspicion is that it maybe to do with how i am configuring the layer variable? but i’m not sure…

fyi, my coordinates are in long-lat format, which is the format that pydeck accepts from what i gather.

expectation:

the map should represent the many different flights from the my dataset as “connections” between cities (coordinates_origin vs coordinates_destination).

i figured it out: the coordinates column in question were being treated as objects, so i had to simply convert them into list of floats (or tuple will work)

# Function to convert string coordinates to lists
def convert_coordinates(coord_str):
    try:
        # Split the string and convert to floats
        lon, lat = map(float, coord_str.split(','))
        return [lon, lat]
    except Exception as e:
        st.write(f"Error converting coordinates: {coord_str} -> {e}")
        return None

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.