Skip to content

Instantly share code, notes, and snippets.

@darribas
darribas / theil_seg.py
Created Feb 20, 2012
Segregation Theil index
View theil_seg.py
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 Oct 11, 2015
Shapefile plotting with PySAL and Matplotlib
View pysal_choropleth_mapping.ipynb
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 Nov 20, 2012
A IPython Notebook to analyze the Gaza-Israel 2012 crisis
View guardian_gaza.ipynb
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 Dec 11, 2012
How to setup `landslide` to work with LaTeX rendering
View howto_setup_landslide.md

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 Aug 7, 2013
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
View mpex.py
'''
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 Jan 10, 2021
Fixed-Effects panel OLS
View panel_FE.ipynb
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 Aug 17, 2022
Spatial kernel density estimation wrapper
View kde_maps.ipynb
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 Mar 20, 2014
Extract NOAA's Climate Normals data
View climate_data
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@darribas
darribas / sp_corr.ipynb
Last active Aug 29, 2015
Interactive spatial autocorrelation
View sp_corr.ipynb
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 Apr 3, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console