This gist demonstrates the combined use of the Python Spatial Analysis Library PySAL together with Folium.
Author: Serge Rey
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# Pandoc filter that grabs the BibTeX code block from each note file | |
# and then uses bibtexparser to add a "short title" entry in the "note" field, | |
# appending finished BibTeX entry to a bibliography file. | |
from pandocfilters import toJSONFilter, CodeBlock | |
# https://github.com/sciunto/python-bibtexparser | |
import bibtexparser |
airport_id | name | city | country | iata_faa | iaco | latitude | longitude | altitude | zone | dst | |
---|---|---|---|---|---|---|---|---|---|---|---|
1 | Goroka | Goroka | Papua New Guinea | GKA | AYGA | -6.081689 | 145.391881 | 5282 | 10 | U | |
2 | Madang | Madang | Papua New Guinea | MAG | AYMD | -5.207083 | 145.7887 | 20 | 10 | U | |
3 | Mount Hagen | Mount Hagen | Papua New Guinea | HGU | AYMH | -5.826789 | 144.295861 | 5388 | 10 | U | |
4 | Nadzab | Nadzab | Papua New Guinea | LAE | AYNZ | -6.569828 | 146.726242 | 239 | 10 | U | |
5 | Port Moresby Jacksons Intl | Port Moresby | Papua New Guinea | POM | AYPY | -9.443383 | 147.22005 | 146 | 10 | U | |
6 | Wewak Intl | Wewak | Papua New Guinea | WWK | AYWK | -3.583828 | 143.669186 | 19 | 10 | U | |
7 | Narsarsuaq | Narssarssuaq | Greenland | UAK | BGBW | 61.160517 | -45.425978 | 112 | -3 | E | |
8 | Nuuk | Godthaab | Greenland | GOH | BGGH | 64.190922 | -51.678064 | 283 | -3 | E | |
9 | Sondre Stromfjord | Sondrestrom | Greenland | SFJ | BGSF | 67.016969 | -50.689325 | 165 | -3 | E |
#!/usr/bin/env ruby | |
require 'time' | |
require 'erb' | |
require 'cgi' | |
filename = "~/.gitlogger" | |
## File format, One per line | |
# Repo Name:/path/to/base | |
dayone = false # log to day one? (true or false) | |
textlog = false # "~/Dropbox/nvALT2.2/GitLogger.md" # set to false to disable |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
MACHINE_NAME = "PYVM" | |
Vagrant.configure("2") do |config| | |
#config.vm.box = "1404amd64" | |
config.vm.box = "base" | |
# config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box" |
A Leaflet.js map created with Folium and a custom D3 threshold scale, with data bound between the Pandas DataFrame and the TopoJSON. See the Gist for the python code to generate the dataframe. The map was generated with the following Python code:
map_3 = folium.Map(location=[40, -99], zoom_start=4)
map_3.geo_json(geo_path=county_geo, data_out='data3.json', data=df,
columns=['GEO_ID', 'Median_Household_Income_2011'],
key_on='feature.id',
fill_color='PuRd', line_opacity=0.3,