Skip to content

Instantly share code, notes, and snippets.

View sjsrey's full-sized avatar

Sergio Rey sjsrey

View GitHub Profile
@sjsrey
sjsrey / gini_scaling.ipynb
Last active February 25, 2022 23:28
Gini Optimization
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sjsrey
sjsrey / xarray.ipynb
Created August 23, 2020 00:18
xarray for pysal w indexing and compute
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.
@sjsrey
sjsrey / alphabug.ipynb
Last active October 10, 2019 13:41
alpha clipping bug
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.
@sjsrey
sjsrey / .crostini-setup
Created December 16, 2018 00:51 — forked from tjpalanca/.crostini-setup
Crostini Setup
These scripts set up Crostini on my Pixelbook
======================================================================
ERROR: Failure: AttributeError (module 'pandas' has no attribute 'rolling_mean')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/serge/anaconda3/envs/meta2/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/home/serge/anaconda3/envs/meta2/lib/python3.6/site-packages/nose/loader.py", line 417, in loadTestsFromName
addr.filename, addr.module)
File "/home/serge/anaconda3/envs/meta2/lib/python3.6/site-packages/nose/importer.py", line 47, in importFromPath
/home/serge/Dropbox/p/pysal/src/meta/pysal/pysal/model/spvcm/abstracts.py:10: UserWarning: The `dill` module is required to use the sqlite backend fully.
from .sqlite import head_to_sql, start_sql
/home/serge/Dropbox/p/pysal/src/meta/pysal/pysal/model/spvcm/spvcm/abstracts.py:9: UserWarning: The `dill` module is required to use the sqlite backend fully.
from .sqlite import head_to_sql, start_sql
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.........
======================================================================
ERROR: Failure: AttributeError (module 'pysal' has no attribute 'pdio')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/serge/anaconda3/envs/meta/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
@sjsrey
sjsrey / reprex.r
Last active September 1, 2017 00:59
Using reticulate to test pysal against spdep
library(reticulate)
use_condaenv("pysal2")
pysal <- import("pysal")
np <- import("numpy")
pth <- pysal$examples$get_path("stl_hom.txt")
f <- pysal$open(pth)
col <- f$by_col("HR8893")
y <- np$array(col)
w <- pysal$open(pysal$examples$get_path("stl.gal"))$read()
mi <- pysal$Moran(y, w, two_tailed=FALSE)
@sjsrey
sjsrey / joy.ipynb
Last active October 30, 2017 00:13
Exploring joy plots for use in regional income inequality dynamics
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.