Skip to content

Instantly share code, notes, and snippets.

View djq's full-sized avatar

David Quinn djq

  • Google
  • Dublin
View GitHub Profile
@djq
djq / gist:58558ac644a6c15f52ac
Last active November 2, 2015 16:06
Intro to spatial data using django
# ----
# Background
# ----
#
# Vectors:
# vectors consist of points, lines, polygons
# Within GeoDjango, data-types which are multipolygon and geometry also exist
#
# Projections:
# Projection systems facilitate translating data between a 3D and 2D space.
@djq
djq / sotm.md
Last active August 29, 2015 14:23
OpenStreetMap Conference - NYC June 2015
@djq
djq / network_visualization.R
Created May 7, 2017 20:08
R network visualizations
# examples from: http://kateto.net/network-visualization
library('igraph')
library('network')
library('sna')
library('ndtv')
library('visNetwork')
# load data
setwd('/Users/djq/Desktop/net-viz/data')
@djq
djq / table_summary.R
Created August 2, 2017 17:50
Table summary
# https://stackoverflow.com/questions/23629592/how-can-i-select-the-top-2-values-in-a-column-per-column-and-report-this-with-bo
t <- structure(c(0.333333333333333, 0.333333333333333, 0.333333333333333,
0.333333333333333, 0.333333333333333, 0.333333333333333, 0.166666666666667,
0.166666666666667, 0.166666666666667, 0.166666666666667, 0.166666666666667,
0.166666666666667, 0.166666666666667, 0.166666666666667, 0.166666666666667,
0.166666666666667, 0.166666666666667, 0.166666666666667, 0.333333333333333,
0.333333333333333, 0.333333333333333, 0.333333333333333, 0.333333333333333,
0.333333333333333), .Dim = c(6L, 4L), .Dimnames = list(c("1",
"2", "3", "4", "5", "6"), c("123", "124", "125", "126")))
# Docs
# https://rapidapi.com/skyscanner/api/skyscanner-flight-search?endpoint=5a9b572de4b06ec3937b1296
#
# Using the skyscanner API
# install unirest into virtual env "flight"
#
# activate virtualenv
#