Andy Eschbacher, Map Scientist, @MrEPhysics
Stuart Lynn, Map Scientist, @Stuart_Lynn
| #!/usr/bin/env python | |
| # encoding: utf-8 | |
| import MySQLdb | |
| from upsert import upsert | |
| db = MySQLdb.connect(host="localhost", user="root", passwd="", db="demo", charset="utf8") | |
| c = db.cursor() | |
| import warnings | |
| warnings.filterwarnings("ignore", "Unknown table.*") |
| #!/usr/bin/env python | |
| # encoding: utf-8 | |
| def nestedGet(d,p): | |
| if len(p) > 1: | |
| try: | |
| return nestedGet(d.get(p[0]),p[1:]) | |
| except AttributeError: | |
| return None | |
| if len(p) == 1: |
| #!/usr/bin/env python | |
| # encoding: utf-8 | |
| """ | |
| 1. Load places from CSV file | |
| 2. Run geocoders | |
| 3. Write results to files | |
| """ | |
| import geocoder |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <!--Edit the title of the page--> | |
| <title>CartoDB Point Clustering</title> | |
| <meta name="description" content=""> | |
| <meta name="author" content=""> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> | |
| <link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/themes/css/cartodb.css" /> |
| #!/bin/bash | |
| # Install csvkit with csvpys | |
| # (csvpys hasn't been pulled back into the main csvkit repo that you can pip install) | |
| git clone https://github.com/cypreess/csvkit.git | |
| cd csvkit | |
| python setup.py build | |
| sudo python setup.py install | |
| cd ~ |