Skip to content

Instantly share code, notes, and snippets.

@alexkapps
Created July 20, 2015 16:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexkapps/d5032ed85b85821c60b4 to your computer and use it in GitHub Desktop.
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
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