Python Geojson, Folium & Leaflet - Create Maps & Routes

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

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

  • @tech-letters
    @tech-letters  5 лет назад +8

    Thank you all for 1000 VIEWS :-) you are amazing!!!!

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

    Thank you thank you thank you thank you! please do more videos! I'm trying to insert two or more pictures in a single pop-up

  • @LeiffNathanAMendoza
    @LeiffNathanAMendoza 8 месяцев назад +1

    Fully basic indeed ... awesome indeed thanks!

  • @danielsander6926
    @danielsander6926 5 лет назад +1

    Super Video, hab deinen Channel abonniert für mehr Content :). Eine Frage hätte ich, ist es möglich die Strecke "automatisiert" abzufahren, heisst das nach und nach die Marker mit den Bildern geöffnet werden?

    • @tech-letters
      @tech-letters  5 лет назад +1

      Hi Daniel, meeeega, vielen Dank dafür :-) das freut mich sehr. Das ist mit Python Folium leider nicht mögllich. Folium ist leider nicht sehr dynamisch. D.h. erst muss alles zur Map hinzugefügt werden und am Ende wird die Map einmal generiert. Da gibt es aber andere Möglichkeiten, z.B. mit Leaflet, also Javascript. Python kann dazu im Hintergrund aber die Daten liefern. Wenn ich Zeit finde, versuche ich das mal mit Leaflet abzubilden. Ein Beispiel für "dynamische Karten" mit Leaflet habe ich in der Serie hier aufgezeigt: ruclips.net/video/MuLMxeI7Ytk/видео.html

    • @danielsander6926
      @danielsander6926 5 лет назад +1

      @@tech-letters Super danke :)

  • @MrSharkrat
    @MrSharkrat 4 года назад +2

    hey!
    nice video! thank you
    little question: is it possible to execute some part of the python code by clicking on a marker?

    • @tech-letters
      @tech-letters  4 года назад +1

      Thanks. I think it is not possible. Folium generated a static HTML file. From there I think it is not possible to further interact with a python backend again :-( For dynamic stuff checkout leaflet, but that's Javascript, not Python

  • @marcelverhoeven3514
    @marcelverhoeven3514 4 года назад +3

    Great video!!
    Would it be possible to create on a RPi a Python program using a GPS for its own position. When now the RPi is moved and its location is equal to a given location stored in a GEO-JSON file then the RPi executes a task given in the Geo-Json file (example Led-ON)

    • @tech-letters
      @tech-letters  4 года назад +1

      I think this is possible. This would be a nice project :-)
      (a) You need a RPi configured as GPS receiver.
      (b) You need a program which receives the GPS data and transforms them to LAT,LONG and compares to the LAT,LONG you want to execute the task

  • @martinaraya2282
    @martinaraya2282 3 года назад +2

    nice video, i have a question, ¿how can i Find the first app that you use to get the coordinates?

    • @tech-letters
      @tech-letters  3 года назад

      thanks. That's a cool app. You can find it here: geojson.io/

  • @ASOT666
    @ASOT666 2 года назад +1

    This is really cool! Did you have a link to code/tutorials/source of the first few examples with the public transportation spots and crime maps?

    • @tech-letters
      @tech-letters  2 года назад

      Unfortunately I cant find it anymore :-(

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

      @@tech-letters can you maybe make a tutorial on the crime map?

  • @hwn123h
    @hwn123h 2 года назад +1

    hii thank you a lot:) this is really helpful to me^^ ah but do you know why some of images can't display on map??
    i want to know that.. so if you know the answer, please let me know:) thank you

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

    Hello, that is an amazing explanation, however, I would like to know if I can replace the image with a QR code? I am an amateur studen. And I'm doing a project with indoor maps. Can you recommend something to me about it? Thanks very much. Katherine.

  • @azlacullen638
    @azlacullen638 Год назад

    Great video. Thank you! I have a question. I want to build an app that when the user enter the number they want, the map will display the color of the number they entered. What should I do to create that?

  • @TheAlfman44
    @TheAlfman44 4 года назад +1

    thanks for the tutorial, btw what is the editor that you used?

  • @Arrato1977
    @Arrato1977 4 года назад +2

    Amazing tutorial, thank you !

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

    Hi!
    nice video.
    i wonders if it is possible to add string to the image. I mean if you click on the marker and is views the image and below the image shows maybe some text or a comment ?
    thanks

  • @shrekh
    @shrekh 4 года назад +1

    please make a video for using folium with flask for an interactive map

    • @tech-letters
      @tech-letters  4 года назад

      folium unfortunately is not that interactive/dynamic. it is better to use leaflet (javascript)

  • @marcoa5777
    @marcoa5777 4 года назад +1

    Tolles Video, Danke!

  • @isaacponsford1203
    @isaacponsford1203 5 лет назад +1

    I know you made this a while ago, but is there any way you can add functionality to these markers, where either you click them or click a button in the pop up in order to call a function in your code

    • @tech-letters
      @tech-letters  5 лет назад +1

      Hi Isaac, I have not yet found any possibility with Folium :-( if you find one please let me know. However with leaflet it seems to be possible, but this requires some Javascript skills. Will do more on leaflet once I am back from vacation

    • @isaacponsford1203
      @isaacponsford1203 5 лет назад +1

      @@tech-letters okay, haven't found anything yet, thank you very much

  • @josephdevlin6169
    @josephdevlin6169 5 лет назад +1

    Thanks - great video! I am trying to do this with some photos I have taken but my pop up is only displaying a white box. I have got the code to work with two pngs - one from the net and a screengrab - so I thought the problem was because I was using a jpg. However, I have downloaded a jpg from the net and it has displayed properly. Do you have any ideas what might be going wrong? I have tried converting my jpg to png but that didn't work.

    • @tech-letters
      @tech-letters  5 лет назад +1

      Hi Joseph, unfortunately I can't check before the weekend... Currently on a business trip. Will have a look at the weekend

    • @josephdevlin6169
      @josephdevlin6169 5 лет назад +1

      @@tech-letters Fantastic - thank you!

    • @tech-letters
      @tech-letters  5 лет назад +1

      Hi Joseph, I just checked and I can display also jpgs without any issue with the same code. I thought it might be related to the format or the size of the picture, but it was even working for large jpgs. I had some issues with .gif, but not yet found the problem.
      I think it might be related to some special base64 decoding required, but need to check. If you don't mind sending me the picture to codeanddogs@gmail.com I can check if I find the issue for your picture.

    • @josephdevlin6169
      @josephdevlin6169 5 лет назад +1

      @@tech-letters Thanks! I sent you an email :)

    • @tech-letters
      @tech-letters  5 лет назад +1

      @@josephdevlin6169 just checked and replied. Seems to be related to the size of the image. Can't tell you about the cause yet, but if I make the image smaller in size, it is working fine.

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

    Hey, I'll try to ask, maybe you can answer me! I'm trying to apply this code to my own code, and even if everything is working without any problem or warning, the marker is never appearing in the map and I can't understand why. Do you know if that script is still working nowadays? I guess it should be...
    Thanks!!

    • @tech-letters
      @tech-letters  3 года назад +1

      Hi there. So the map itself is working, but the marker does not? and there is no error at all? Do the standard Folium markers works?

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

      @@tech-letters Thanks for your answer! I found out that the problem was the coordinates, I did the perimeter with a certain EPSG and the popup with a different one, so even if there was not any error in the code, the Latitude and Longitude of the popup weren't the correct ones 😂
      PS: Sorry about my english hahaha

    • @tech-letters
      @tech-letters  3 года назад +1

      @@alvarodriguezms haha :-D great you solved it.No worries, I am also not a native english speaker! Have a nice weekend :-)

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

      @@tech-letters U too! Btw, thanks for ur videos, I'm watching them for work 😎

    • @tech-letters
      @tech-letters  3 года назад

      @@alvarodriguezms welcome. Glad I could help. Was doing it in my free time. Would be interested what job you have :-)

  • @wykonos
    @wykonos 4 года назад +1

    this video is very helpfull. very very thank you

  • @hank86211
    @hank86211 2 года назад +1

    nice video and dog

  • @syedasadullah7025
    @syedasadullah7025 4 года назад +1

    hey man i want to know can i change the color of path drawn in folium ??? please guide

    • @tech-letters
      @tech-letters  4 года назад

      hey there. Yes, you can do it with PolyLine color = choose your color, e.g.:
      folium.PolyLine(points, color="red", weight=2.5, opacity=1).add_to(my_map)

  • @khalidvlogger
    @khalidvlogger 4 года назад +1

    thank you sir,good tutorial

  • @businessrunner3037
    @businessrunner3037 4 года назад +2

    U know how to make an interactive map using python in which i can save the data of the states?

    • @businessrunner3037
      @businessrunner3037 4 года назад +2

      Please tell me how to do it

    • @businessrunner3037
      @businessrunner3037 4 года назад +2

      Say for a country like India

    • @tech-letters
      @tech-letters  4 года назад +2

      Jep, that's possible. I made a similar video with states (but German states) here. However there is also GeoJSON data available for all countries. If you need help to find it, let me know
      ruclips.net/video/6Xyf0_muqEo/видео.html

    • @businessrunner3037
      @businessrunner3037 4 года назад +2

      I want to make an interactive map
      In which data such as
      1) population
      2) age composition
      3) educational level
      4) income level
      5) Contact numbers of that area

    • @businessrunner3037
      @businessrunner3037 4 года назад +2

      Send me your mail ID sir?

  • @victorhugocubasbalbuena5274
    @victorhugocubasbalbuena5274 Год назад +1

    how do you implement geojson? so you can get de lat y lng?

    • @tech-letters
      @tech-letters  Год назад

      It was not implemented by me. It is a free website that you can use. If you have many addresses that you need to covert to lat and long, you might need an api

    • @tech-letters
      @tech-letters  Год назад

      Like I did in this video ruclips.net/video/tKy-IHAxt4s/видео.html

  • @virajjagtap9046
    @virajjagtap9046 5 лет назад +1

    You are awesome

    • @tech-letters
      @tech-letters  5 лет назад +1

      Thx :-) more videos will follow soon

  • @pritam7664
    @pritam7664 4 года назад +1

    is there any way we can create geojson file in python?

    • @tech-letters
      @tech-letters  4 года назад +1

      I never tried to do this. I just found some hints here: stackoverflow.com/questions/16920700/building-a-geojson-with-python

  • @shravanchaudhary9350
    @shravanchaudhary9350 5 лет назад +1

    There's no code in your repository, please update.

    • @tech-letters
      @tech-letters  5 лет назад +2

      SORRY!!! forgot to push my local repo :-( Now it is online :-)

    • @shravanchaudhary9350
      @shravanchaudhary9350 5 лет назад +1

      @James King can you elaborate your problem?

    • @shravanchaudhary9350
      @shravanchaudhary9350 5 лет назад +1

      @James King learn Google Maps JavaScript APIs.
      Reason: Folium is a wrapper around OSM javasript and was developed by some busy developers who aren't contributing any more. It lacks some functionalities. I needed the same functionality but I couldn't find a way to do it in Folium.
      Hence, I switched to the Google maps JavaScript and learned infowindow for my purpose.
      You can search for " infowindow in Folium" if you don't want to switch and search for a solution anyway.

    • @tech-letters
      @tech-letters  5 лет назад +1

      @James King you could do that for example with beautifulsoup in python. However Folium expects locations/addresses which can be transformed into latitude & longitude. Instead of prices, you could scrape addresses, transform them to lat/long and put them on the map. Will upload the next videos on my live maps series today. Perhaps this is also helpful

  • @vinceg3213
    @vinceg3213 4 года назад +1

    You sound very german :D

  • @mebratuteklehaimanot9229
    @mebratuteklehaimanot9229 5 лет назад +1

    Thanks ,I have a question how can send please tell me your email i will send my code.