Created
July 20, 2015 16:44
-
-
Save alexkapps/d5032ed85b85821c60b4 to your computer and use it in GitHub Desktop.
Plotting lat+lon from a csv on a simple leaflet map using folium and pandas
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas, folium | |
inputfile = '/home/alex/Desktop/test/data/level_1a.tsv' | |
df1a = pandas.read_csv(inputfile, sep='\t') | |
map_1 = folium.Map(location=[34.5242, 69.17935], zoom_start=7)#, width='100%', height='100%') | |
for index, row in df1a.iterrows(): | |
map_1.circle_marker([row['latitude'], row['longitude']], popup = row['project_id'], line_color='#3186cc', fill_color='#3186cc', fill_opacity=0.2)#, radius=(row['even_split_commitments'])) | |
map_1.create_map(path='iconTest.html') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment