Python Sankey Diagram, Pointplot, KDE, Choropleth, Cartogram Maps with geoplot

Поделиться
HTML-код
  • Опубликовано: 1 фев 2025

Комментарии • 7

  • @RyanNoonan
    @RyanNoonan  3 года назад +1

    The geometry column is part of a geodataframe and it represents a point or a line on a map or a geographic shape (polygon, multipolygon) such as a state or a country. You can take a pandas dataframe and add some geometry to it (pointplot example adds latitude and longitude geometry column) and it becomes a geodataframe. Creating geodataframes with complex geometries (geographic shapes) may be a little more difficult however this is something I am looking into currently. Geodataframes can also be created from shapefiles and geojson files. There are many sources for shapefiles and geojson files such as: USGS, Natural Earth, GADM, ArcGIS Hub, University / College websites often have shapefile layers available, etc. (some have different rules regarding usage). Finding geodataframes with all the needed data and geometries (geographic shapes, etc.) can be a challenge.
    A side note that might be helpful. I use the QGIS application to help me view and convert files. For example, if I have a shapefile I want to view quickly, I can view it in QGIS and convert it to other types of files and/or another coordinate reference system (crs) if needed.
    Often you can find geodataframes with geometry columns (geographic points, lines, polygons, etc.) already created (geoplot and geopandas have some geodataframes already created that you can pull into your code).
    Since geoplot uses geopandas, it can be helpful to learn about geopandas. I plan to do a tutorial on geopandas soon.

  • @jndorosey
    @jndorosey 2 года назад

    Hi @RyanNoonan, how would you write the code for a cartogram if you wanted to display total population individually by sex ('male' and 'female') from their respected columns?

  • @Kuzmar48
    @Kuzmar48 3 года назад

    Hi Ryan, how can i use folium maps and placed the Kdeplot on top of it ?

    • @RyanNoonan
      @RyanNoonan  3 года назад

      I am not sure if there is an easy way to do this. I'll have to think about it. Maybe it is possible with another package similar to folium like ipyleaflet or mplleaflet, etc. or an application like QGIS.

  • @bassamal-kaaki3253
    @bassamal-kaaki3253 3 года назад

    Where did you get the geometry information in the df’s from? What is it representing? Can you explain it?

    • @RyanNoonan
      @RyanNoonan  3 года назад +1

      This is a good question. I am going to pin a comment at the top of the comments that answers this question just in case anyone else has the same question. Thanks. Questions can be helpful for me to know what I need to explain better, etc.

    • @bassamal-kaaki3253
      @bassamal-kaaki3253 3 года назад +1

      @@RyanNoonan Thank you for replying;) appreciate it.