Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

Question about mapping multiple position on world map in Folium

$
0
0

I am new to python and hoping I can get some help direction on here. I'm having a hard time plotting multiple data points with marker on the world map in Folium.

The goal of this small project is to pinpoint each person on the map according to their longitude and latitude of their birthplace.

The popup will include their name, job title, and age. The error gave me was the error message is KeyError: 'lat, lon'. I have tried to create a csv file and build a dataFrame out of the data but seems like I'm not doing this correctly.

This is the dataframe I created:List in a dictionary

running the code

KeyError: 'lat,lon'

Another way I tried was to create a csv file:birthplace = '/Users/xuanlam/Desktop/python_work/Birthplace - Sheet1.csv'data2 = pd.read_csv(birthplace)data2which shows csv table:enter image description here

and I used the same syntax as above:enter image description here

and it gave me the same error: Keyerror: 'lat,lon'. So I'm stuck now. Looking forward to some help. Thanks.


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>