plotting maps with geopandas and matplotlib

Поділитися
Вставка
  • Опубліковано 4 вер 2024
  • hello there, in this lesson, we will use geopandas and matplotlib to plot a geographic map from a CSV file with longitude and latitudes. we will convert the longitude and latitude to geopandas points.
    checkout my python for beginners courses here
    How to Build GUI Apps with Python and Tkinter
    www.udemy.com/...
    Learn Python From Scratch and Build 10 Programs
    www.udemy.com/...
    A Practical Guide to Coding With Python
    www.udemy.com/...

КОМЕНТАРІ • 44

  • @nonemanful
    @nonemanful 3 роки тому +3

    This video really helped me in my MSc project thanks. That windows key and R shortcut for the path is soooooo useful. Keep up the good work Thanks

  • @minecraft-brickops
    @minecraft-brickops 2 роки тому +3

    Your explanations are very useful.

  • @vitoalvarez5416
    @vitoalvarez5416 2 роки тому +1

    Thank you, your explanation was complete but straightforward c:

  • @tahirhanif9669
    @tahirhanif9669 3 роки тому +1

    Thank you for a great presentation

  • @neutral_8803
    @neutral_8803 3 роки тому +1

    This was really well summed up, thanks

  • @shailesh1981able
    @shailesh1981able 2 роки тому +5

    Explicitly explained!!!
    Sir, can you please advise what to write at the below line of code, if i have all geo-coordinates of one courty (i.e. India)? I tried the below code but it's not working somehow.
    axis = world_data[world_data.continent=='india']

  • @abiyedanagogo1577
    @abiyedanagogo1577 2 роки тому +1

    Great video

  • @adrianmisak07
    @adrianmisak07 3 роки тому +5

    at 8:44: what if we wanted each city in a different color? for example, if the dataframe had a column with city population, and we wanted to have cities with bigger populations in a darker color, and cities with less population in brighter color? thanks, great video

    • @Chazgd
      @Chazgd Рік тому +1

      I've not tried it myself but in more standard matplotlib plots you can add another column which has the color for each row and pass that entire column into the color argument.

  • @yuhanwu2649
    @yuhanwu2649 Рік тому +1

    thank uuu!

  • @franklimmaciel
    @franklimmaciel 2 роки тому +1

    Thanks!

  • @izzyfiction
    @izzyfiction 9 місяців тому +1

    how would I set the continent to display a map of the United Kingdom? (UK)

    • @101touchapps
      @101touchapps  9 місяців тому

      you could use a list to manually load the longitudes and latitudes. or use the country code in the api

  • @astro7060
    @astro7060 2 роки тому +1

    im not getting the desired image, like the points are plotted at one corner and the country image is plotted on other corner, how can i solve this and get them into position, someone please help me.

  • @shanegrimes8367
    @shanegrimes8367 5 місяців тому +1

    Can we draw a line connecting those dots?

    • @101touchapps
      @101touchapps  4 місяці тому

      yes we can. the lines can even have color, thickness etc

  • @User-op1be
    @User-op1be 3 роки тому

    Does this work on pycharm, with the modules installed ?? I am having trouble with this on pycharm right now

  • @t0mmy-Sun
    @t0mmy-Sun 3 роки тому

    Hey !! awesome video!! thanks a lot bro !! I am just wondering is there any way for us to change the map projection of the final choropleth map?

    • @101touchapps
      @101touchapps  2 роки тому

      hello tom. sorry this is coming very late. yes you can change the projection to "orthographic" etc using plotly

  • @perfecteer
    @perfecteer 2 роки тому

    Thank you

  • @maatouknadia4824
    @maatouknadia4824 2 роки тому

    Hi, thank you for this intersting vedeo. Where can I find a geojson file for morocco including sahara? Thank a lot for your help

    • @101touchapps
      @101touchapps  2 роки тому +1

      hello Nadia. you can google search for free geojson files. there are quite free to get.

  • @thalesaragao8634
    @thalesaragao8634 3 роки тому

    Hi! I could not find the csv file. where is it? Thanks!

  • @mikeholad
    @mikeholad Рік тому

    Can this be applied too on google colab

  • @mikeholad
    @mikeholad Рік тому

    Instead of country map can it be applied to states map and local government area maps?

    • @101touchapps
      @101touchapps  Рік тому

      sure. it can. all you need are filters to point to your data

  • @carlotaabarzuacontreras7986
    @carlotaabarzuacontreras7986 2 роки тому +1

  • @beeaeey
    @beeaeey 3 роки тому

    I tried to import geopandas but I couldn't, and this error has appeared
    ModuleNotFoundError: No module named 'geopandas'

    • @t0mmy-Sun
      @t0mmy-Sun 3 роки тому

      lol my error is no module named "plotly"

    • @t0mmy-Sun
      @t0mmy-Sun 3 роки тому

      hey I found out that it's related to your python environment. if you are using jupyter notebook, you could try the code "pip list". it will list all installed packages. if geopandas is not installed in this environment, just get it. I bet it will sort your issue.

    • @beeaeey
      @beeaeey 3 роки тому

      @@t0mmy-Sun I’ll try this! Thanks for help

  • @mikeholad
    @mikeholad Рік тому

    Is there a way to contact you

  • @armandosilvavelazquez4476
    @armandosilvavelazquez4476 3 роки тому

    I could not isntall geopandas.

  • @nazeefkhan517
    @nazeefkhan517 10 місяців тому

    ModuleNotFoundError: No module named 'matplotlib.pylplot'
    What should I do to fix this?

    • @101touchapps
      @101touchapps  10 місяців тому

      hello. you can try typing "pip install matplot lib" in your command line. also installing pandas will usually come with the matplot lib library installed

    • @nazeefkhan517
      @nazeefkhan517 10 місяців тому +1

      Thanks I fixed.