[Python] How to Create Plotly Choropleth Plot of Metropolitan Statistical Areas(MSA)

Discussão em 'Python' iniciado por Stack, Julho 13, 2025.

  1. Stack

    Stack Membro Participativo

    Using the pygris library, I have been able to access the geo dataframe for all Core Based Statistical Areas in the US.

    msa_gdf = core_based_statistical_areas(cache = True, year = 2024)


    I also have the FIPS Place Code and population (from Wikipedia) for each area; however, whenever I try to plot the data using either plotly.express or plotly.graphing_objects, either two things happen. A plain map appears, or a JS Error appears. What can/should I do. I beleive the problem is not having geojson data so I tried pulling it from this link: https://gist.githubusercontent.com/...1c6d60e7c67ad7164de4b97c723158e78/msa.geojson.

    Any help would be much appreciated.

    Continue reading...

Compartilhe esta Página