Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@darribas
darribas / theil_seg.py
Created February 20, 2012 23:25
Segregation Theil index
import numpy as np
import multiprocessing as mp
def theil_seg(g):
'''
Compute segregation Theil index for one observation
...
g : array
Array of shape (g, ) with counts for each group in the tract
@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.
@darribas
darribas / guardian_gaza.ipynb
Created November 20, 2012 22:58
A IPython Notebook to analyze the Gaza-Israel 2012 crisis
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@darribas
darribas / howto_setup_landslide.md
Created December 11, 2012 09:54
How to setup `landslide` to work with LaTeX rendering

How to setup landslide to work with LaTeX rendering

This short howto is intended to be a mental note for myself so I don't have to spend all the wasted hours that took me to figure out howto get landslide up and running and beautifully displaying LaTeX on the slides. If you find it useful, good for you ;-)


Disclaimer

@darribas
darribas / mpex.py
Created August 7, 2013 08:01
Example for testing PySAL issue #314 relating ROD dicts and multiprocessing ... Running this file before PR #315 will trigger a nasty error in multiprocessing. Running in on a later version of PySAL's trunk will just work Links ------- Issue #314: https://github.com/pysal/pysal/issues/314 PR #315: https://github.com/pysal/pysal/pull/315
'''
Example for testing PySAL issue #314 relating ROD dicts and multiprocessing
...
Running this file before PR #315 will trigger a nasty error in
multiprocessing. Running in on a later version of PySAL's trunk will just work
'''
import time
import pysal as ps
@darribas
darribas / panel_FE.ipynb
Last active January 10, 2021 18:41
Fixed-Effects panel OLS
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@darribas
darribas / kde_maps.ipynb
Last active August 17, 2022 16:40
Spatial kernel density estimation wrapper
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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