Skip to content

Commit

Permalink
Merge pull request #875 from TaylorOshan/spint_constant
Browse files Browse the repository at this point in the history
Spint constant
  • Loading branch information
sjsrey committed Oct 25, 2016
2 parents 642b496 + 831d5f0 commit 2ee2715
Show file tree
Hide file tree
Showing 13 changed files with 498 additions and 1,192 deletions.
4 changes: 2 additions & 2 deletions pysal/contrib/spint/count_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class CountModelResults(object):
value of the loglikelihood function evaluated with only an
intercept; see family.py for distribution-specific
loglikelihoods
aic : float
AIC : float
Akaike information criterion
resid : array
response residuals; defined as y-mu
Expand All @@ -167,7 +167,7 @@ def __init__(self, results):
self.X = results.X
self.family = results.family
self.params = results.params
self.aic = results.aic
self.AIC = results.aic
self.df_model = results.df_model
self.df_resid = results.df_resid
self.llf = results.llf
Expand Down
108 changes: 65 additions & 43 deletions pysal/contrib/spint/gravity.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 465,
"metadata": {
"collapsed": false
},
Expand All @@ -18,9 +18,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"//anaconda/envs/spint/lib/python2.7/site-packages/IPython/html.py:14: ShimWarning: The `IPython.html` package has been deprecated. You should import from `notebook` instead. `IPython.html.widgets` has moved to `ipywidgets`.\n",
" \"`IPython.html.widgets` has moved to `ipywidgets`.\", ShimWarning)\n",
"//anaconda/envs/spint/lib/python2.7/site-packages/IPython/core/magics/pylab.py:161: UserWarning: pylab import has clobbered these variables: ['plt']\n",
"//anaconda/envs/spint/lib/python2.7/site-packages/IPython/core/magics/pylab.py:161: UserWarning: pylab import has clobbered these variables: ['plt', 'Polygon']\n",
"`%matplotlib` prevents importing * from pylab and numpy\n",
" \"\\n`%matplotlib` prevents importing * from pylab and numpy\"\n"
]
Expand All @@ -46,7 +44,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 466,
"metadata": {
"collapsed": false
},
Expand Down Expand Up @@ -240,7 +238,7 @@
"[5 rows x 35 columns]"
]
},
"execution_count": 2,
"execution_count": 466,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -253,7 +251,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 467,
"metadata": {
"collapsed": false
},
Expand Down Expand Up @@ -307,7 +305,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 468,
"metadata": {
"collapsed": false
},
Expand Down Expand Up @@ -883,15 +881,6 @@
"#model implementation avaialble\n",
"#from pysal.weights.spintW import vecW, netW, ODW"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
Binary file not shown.
82 changes: 82 additions & 0 deletions pysal/contrib/spint/notebooks/examples/austria.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
,Origin,Destination,Data,Oi,Dj,Dij
0,AT11,AT11,0,4016,5146,1e-300
1,AT11,AT12,1131,4016,25741,103.001845
2,AT11,AT13,1887,4016,26980,84.204666
3,AT11,AT21,69,4016,4117,220.811933
4,AT11,AT22,738,4016,8634,132.00748
5,AT11,AT31,98,4016,8193,214.511814
6,AT11,AT32,31,4016,4902,246.933305
7,AT11,AT33,43,4016,3952,390.85611
8,AT11,AT34,19,4016,1910,505.089539
9,AT12,AT11,1633,20080,5146,103.001845
10,AT12,AT12,0,20080,25741,1e-300
11,AT12,AT13,14055,20080,26980,45.796272
12,AT12,AT21,416,20080,4117,216.994739
13,AT12,AT22,1276,20080,8634,129.878172
14,AT12,AT31,1850,20080,8193,140.706671
15,AT12,AT32,388,20080,4902,201.232355
16,AT12,AT33,303,20080,3952,343.50075
17,AT12,AT34,159,20080,1910,453.515594
18,AT13,AT11,2301,29142,5146,84.204666
19,AT13,AT12,20164,29142,25741,45.796272
20,AT13,AT13,0,29142,26980,1e-300
21,AT13,AT21,1080,29142,4117,249.932874
22,AT13,AT22,1831,29142,8634,158.630661
23,AT13,AT31,1943,29142,8193,186.420738
24,AT13,AT32,742,29142,4902,244.108305
25,AT13,AT33,674,29142,3952,387.61776
26,AT13,AT34,407,29142,1910,498.407152
27,AT21,AT11,85,4897,5146,220.811933
28,AT21,AT12,379,4897,25741,216.994739
29,AT21,AT13,1597,4897,26980,249.932874
30,AT21,AT21,0,4897,4117,1e-300
31,AT21,AT22,1608,4897,8634,92.407958
32,AT21,AT31,328,4897,8193,151.777157
33,AT21,AT32,317,4897,4902,92.894408
34,AT21,AT33,469,4897,3952,194.851669
35,AT21,AT34,114,4897,1910,306.105825
36,AT22,AT11,762,8487,5146,132.00748
37,AT22,AT12,1110,8487,25741,129.878172
38,AT22,AT13,2973,8487,26980,158.630661
39,AT22,AT21,1252,8487,4117,92.407958
40,AT22,AT22,0,8487,8634,1e-300
41,AT22,AT31,1081,8487,8193,124.563096
42,AT22,AT32,622,8487,4902,122.433524
43,AT22,AT33,425,8487,3952,261.893783
44,AT22,AT34,262,8487,1910,376.34667
45,AT31,AT11,196,10638,5146,214.511814
46,AT31,AT12,2027,10638,25741,140.706671
47,AT31,AT13,3498,10638,26980,186.420738
48,AT31,AT21,346,10638,4117,151.777157
49,AT31,AT22,1332,10638,8634,124.563096
50,AT31,AT31,0,10638,8193,1e-300
51,AT31,AT32,2144,10638,4902,81.753652
52,AT31,AT33,821,10638,3952,208.456383
53,AT31,AT34,274,10638,1910,314.793199
54,AT32,AT11,49,5790,5146,246.933305
55,AT32,AT12,378,5790,25741,201.232355
56,AT32,AT13,1349,5790,26980,244.108305
57,AT32,AT21,310,5790,4117,92.894408
58,AT32,AT22,851,5790,8634,122.433524
59,AT32,AT31,2117,5790,8193,81.753652
60,AT32,AT32,0,5790,4902,1e-300
61,AT32,AT33,630,5790,3952,145.076472
62,AT32,AT34,106,5790,1910,258.591197
63,AT33,AT11,87,4341,5146,390.85611
64,AT33,AT12,424,4341,25741,343.50075
65,AT33,AT13,978,4341,26980,387.61776
66,AT33,AT21,490,4341,4117,194.851669
67,AT33,AT22,670,4341,8634,261.893783
68,AT33,AT31,577,4341,8193,208.456383
69,AT33,AT32,546,4341,4902,145.076472
70,AT33,AT33,0,4341,3952,1e-300
71,AT33,AT34,569,4341,1910,114.46325
72,AT34,AT11,33,2184,5146,505.089539
73,AT34,AT12,128,2184,25741,453.515594
74,AT34,AT13,643,2184,26980,498.407152
75,AT34,AT21,154,2184,4117,306.105825
76,AT34,AT22,328,2184,8634,376.34667
77,AT34,AT31,199,2184,8193,314.793199
78,AT34,AT32,112,2184,4902,258.591197
79,AT34,AT33,587,2184,3952,114.46325
80,AT34,AT34,0,2184,1910,1e-300
Binary file not shown.
1 change: 1 addition & 0 deletions pysal/contrib/spint/notebooks/examples/austria.prj
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GEOGCS["ETRS89",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
1 change: 1 addition & 0 deletions pysal/contrib/spint/notebooks/examples/austria.qpj
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]]
Binary file not shown.
Binary file added pysal/contrib/spint/notebooks/examples/austria.shx
Binary file not shown.
Loading

0 comments on commit 2ee2715

Please sign in to comment.