Skip to content

Instantly share code, notes, and snippets.

@darribas
darribas / climate_data
Created March 20, 2014 17:10
Extract NOAA's Climate Normals data
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@darribas
darribas / sp_corr.ipynb
Last active August 29, 2015 13:58
Interactive spatial autocorrelation
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@darribas
darribas / 0_reuse_code.js
Created April 3, 2014 15:42
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@darribas
darribas / cont_block.ipynb
Last active August 29, 2015 14:01
Contiguity and block -based weights in PySAL
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@darribas
darribas / geo_postcard.ipynb
Created August 11, 2014 03:51
(Geo-)postcard from Chicago
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@darribas
darribas / pred_prob.py
Created September 15, 2014 17:20
Predictions in a probit
import numpy as np
import pandas as pd
import statsmodels.api as sm
from scipy.stats import norm as N
n, k = 1000, 2
x = np.random.random((n, k+1))
x[:, 0] = 1
b = np.ones((k+1, ))
e = np.random.normal(size=(n, ))
@darribas
darribas / pdf2handout
Created October 7, 2014 17:40
pdf2handout
#!/usr/bin/python
import os, sys
args = sys.argv
if len(args) > 1:
inpath = args[1]
if len(args)==2:
outpath = inpath.replace('.pdf', '_handout.pdf')
@darribas
darribas / .gitignore
Last active August 29, 2015 14:08
PySAL-R benchmarking
.ipynb_checkpoints
*.pyc
*.swp
@darribas
darribas / main_effect_plots.ipynb
Created July 17, 2015 15:05
Main Effect Plots
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@darribas
darribas / pysal_choropleth_mapping.ipynb
Last active October 11, 2015 16:57
Shapefile plotting with PySAL and Matplotlib
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.