Skip to content

Instantly share code, notes, and snippets.

View powersa's full-sized avatar

Andrew Powers powersa

View GitHub Profile

Find a tutorial that works for you: AWS Jupyter Notebook

  • I got burned on this one, watch the fine print and stick with it if it doesn't work right away

Key Pair

  • Create
  • chmod 0400

Launch in a way that works for you: Command Line or Console

Configure Your Cluster

@powersa
powersa / CUGOS20171018.md
Created October 18, 2017 15:11
Notes on building a transportation Neo4j db with gtfs data.

Goal

Identify Seattle bus stops that are within 1 hour of the Food Bank on public transportation.

  • From where in the city is the Food Bank accessible within 1 hour?
  • Where in the city is accessible from the Food Bank within 1 hour?

Data

GTFS: https://developers.google.com/transit/gtfs/

@powersa
powersa / bus-stop-bus-relationships.txt
Last active March 14, 2017 05:27
Neo4j Transit Data
64 65 35235 28th Ave NE and NE 125th St
41 795 35233 NE 125th St and 25th Ave NE
41 64 35230 NE 125th St and Lake City Way NE
41 65 35230 NE 125th St and Lake City Way NE
41 795 35230 NE 125th St and Lake City Way NE
64 65 35230 NE 125th St and Lake City Way NE
64 795 35230 NE 125th St and Lake City Way NE
65 795 35230 NE 125th St and Lake City Way NE
41 795 35231 NE 125th St and 28th Ave NE
41 994 35231 NE 125th St and 28th Ave NE
@powersa
powersa / Seattle-Transit-Neo4j.md
Last active March 17, 2017 05:18
Import Seattle Transit data into Neo4j

Grab data from data portal: http://www5.kingcounty.gov/gisdataportal/

Explore in QGIS

Export busstop.shp as geojson: busstop-layer.geojson

Generate routes.txt:

jq -r '.features | .[] | .properties | .ROUTES | split(",") | .[]' busstop-layer.geojson | sort -u >routes.txt
@powersa
powersa / bsm.md
Last active August 29, 2015 14:20
CUGOS Spring Fling 2015

Mapping for Health: Opportunities and Obstacles in Open Source

Anna Clements & Isabel Shaw, Broad Street Maps

In the developing world, physical access to health care can be the number one factor in the utilization of services, and consequently, the health of a population. At Broad Street Maps, we believe that where you live shouldn't determine if you live.

Anna and Isabel will give a brief overview of Broad Street Maps’ current work, introduce some exciting opportunities emerging in the open source world for global health, and reflect on what it is like for non-developers engaging with open-source technology and communities.

@powersa
powersa / us.json
Created January 7, 2015 07:48
US states as GeoJson
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@powersa
powersa / 110m_land.json
Created January 7, 2015 06:28
110m natural earth land as GeoJSON
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@powersa
powersa / index.html
Created January 6, 2015 06:00
Simple SVG document...
<!doctype html>
<html lang="en">
<head>
</head>
<body>
<svg width="720" height="120">
<circle cx="40" cy="60" r="10"></circle>
@powersa
powersa / writer.py
Created December 18, 2014 02:56
A function that writes a csv
import csv
# out_file is a file path and out is an array of arrays of the data you want to write
def write_data_to_csv(out_file, out):
with open(out_file, "w") as f:
wr = csv.writer(f, delimiter='\t')
for row in out:
wr.writerow(row)