Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ps.knnW_from_shapefile returns wrong W ids when idVariable specified #244

Closed
darribas opened this issue Apr 20, 2013 · 8 comments
Closed
Assignees
Labels
Milestone

Comments

@darribas
Copy link
Member

The following code:

import pysal as ps

shp = ps.examples.get_path('Chicago77.shp')
w = ps.weights.knnW_from_shapefile(shp, k=5, idVariable="COMMUNITY")
print "ID order (first 5): ", w.id_order[:5]
print "Neighbors (first 5): ", w.neighbors.keys()[:5]

produces this output:

In [5]: run ~/Desktop/ex.py
ID order (first 5):  ['ROGERS PARK', 'WEST RIDGE', 'EDISON PARK', 'FOREST GLEN', 'OHARE']
Neighbors (first 5):  [0, 1, 2, 3, 4]

There must be some inconsistency in how the ids are (not) replaced in the neighbors/weights dictionaries.

@sjsrey
Copy link
Member

sjsrey commented Apr 20, 2013

import pysal as ps
shp = ps.examples.get_path('Chicago77.shp')
w = ps.weights.knnW_from_shapefile(shp, k=5, idVariable="COMMUNITY")
print "ID order (first 5): ", w.id_order[:5]
print "Neighbors (first 5): ", w.neighbors.keys()[:5]

for i in w.neighbors.keys()[:5]:
     print w.id_order[i]

Generates:

ID order (first 5):  ['ROGERS PARK', 'WEST RIDGE', 'EDISON PARK', 'FOREST GLEN', 'OHARE']
Neighbors (first 5):  [0, 1, 2, 3, 4]
ROGERS PARK
WEST RIDGE
EDISON PARK
FOREST GLEN
OHARE

The ids attribute is not replaced since when it comes time to write out the gal things can go south with strings (West Ridge) might be considered two neighbors instead of one.

For a bridge between the idVariable and the position/row in the weights see:

In [2]: w.id2i
Out[2]:
{'ALBANY PARK': 11,
 'ARCHER HEIGHTS': 41,
 'ARMOUR SQUARE': 35,
 'ASHBURN': 59,
 'AUBURN GRESHAM': 60,
 'AUSTIN': 23,
 'AVALON PARK': 61,
 'AVONDALE': 17,
 'BELMONT CRAGIN': 19,
 'BEVERLY': 67,
 'BRIDGEPORT': 36,
 'BRIGHTON PARK': 39,
 'BURNSIDE': 66,
 'CALUMET HEIGHTS': 64,
 'CHATHAM': 63,
 'CHICAGO LAWN': 54,
 'CLEARING': 56,
 'DOUGLAS': 37,
 'DUNNING': 16,
 'EAST GARFIELD PARK': 29,
 'EAST SIDE': 68,
 'EDGEWATER': 6,
 'EDISON PARK': 2,
 'ENGLEWOOD': 51,
 'FOREST GLEN': 3,
 'FULLER PARK': 43,
 'GAGE PARK': 48,
 'GARFIELD RIDGE': 45,
 'GRAND BOULEVARD': 42,
 'GREATER GRAND CROSSING': 57,
 'HEGEWISCH': 74,
 'HERMOSA': 18,
 'HUMBOLDT PARK': 25,
 'HYDE PARK': 49,
 'IRVING PARK': 13,
 'JEFFERSON PARK': 8,
 'KENWOOD': 46,
 'LAKE VIEW': 14,
 'LINCOLN PARK': 21,
 'LINCOLN SQUARE': 9,
 'LOGAN SQUARE': 22,
 'LOOP': 28,
 'LOWER WEST SIDE': 33,
 'MCKINLEY PARK': 38,
 'MONTCLARE': 20,
 'MORGAN PARK': 73,
 'MOUNT GREENWOOD': 72,
 'NEAR NORTH SIDE': 26,
 'NEAR SOUTH SIDE': 32,
 'NEAR WEST SIDE': 27,
 'NEW CITY': 44,
 'NORTH CENTER': 15,
 'NORTH LAWNDALE': 31,
 'NORTH PARK': 7,
 'NORWOOD PARK': 5,
 'OAKLAND': 40,
 'OHARE': 4,
 'PORTAGE PARK': 12,
 'PULLMAN': 71,
 'RIVERDALE': 75,
 'ROGERS PARK': 0,
 'ROSELAND': 65,
 'SOUTH CHICAGO': 62,
 'SOUTH DEERING': 70,
 'SOUTH LAWNDALE': 34,
 'SOUTH SHORE': 58,
 'UPTOWN': 10,
 'WASHINGTON HEIGHTS': 69,
 'WASHINGTON PARK': 50,
 'WEST ELSDON': 47,
 'WEST ENGLEWOOD': 52,
 'WEST GARFIELD PARK': 30,
 'WEST LAWN': 55,
 'WEST PULLMAN': 76,
 'WEST RIDGE': 1,
 'WEST TOWN': 24,
 'WOODLAWN': 53}

@darribas
Copy link
Member Author

Correct, but if you try to write it out, it fails:

fo = ps.open('test.gwt', 'w')
fo.write(w)
fo.close()

Returns:

In [5]: fo.write(w)
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-5-8009ae4bdfd6> in <module>()
----> 1 fo.write(w)

/home/dani/code/pysal/pysal/core/IOHandlers/gwt.pyc in write(self, obj)
    247             header = '%s %i %s %s\n' % ('0', obj.n, self.shpName, self.varName)
    248             self.file.write(header)
--> 249             self._writelines(obj)
    250             #obj.transform = transform
    251 

/home/dani/code/pysal/pysal/core/IOHandlers/gwt.pyc in _writelines(self, obj)
    176         """
    177         for id in obj.id_order:
--> 178             neighbors = zip(obj.neighbors[id], obj.weights[id])
    179             for neighbor, weight in neighbors:
    180                 self.file.write('%s %s %6G\n' % (str(id),

KeyError: 'ROGERS PARK'

In [6]:

A similar approach to, say, ps.threshold_continuousW_from_shapefile would change all the dictionaries:

import pysal as ps
import numpy as np
shp = ps.examples.get_path('Chicago77.shp')
w = ps.threshold_continuousW_from_shapefile(shp, np.inf, idVariable="COMMUNITY")
print "ID order (first 5): ", w.id_order[:5]
print "Neighbors (first 5): ", w.neighbors.keys()[:5]

would return:

ID order (first 5):  ['ROGERS PARK', 'WEST RIDGE', 'EDISON PARK', 'FOREST GLEN', 'OHARE']
Neighbors (first 5):  ['CALUMET HEIGHTS', 'ROGERS PARK', 'WEST TOWN', 'EDISON PARK', 'FOREST GLEN']

(Ignore the order as neighbors is a dictionary and won't preserve it)

@sjsrey
Copy link
Member

sjsrey commented Apr 20, 2013

This is a bug that raises its head in several places. If you write out the gwt for your last example, you will see that it looks something like (first few lines):

0 77 Unknown Unknown
ROGERS PARK ARCHER HEIGHTS 1.35026E-05
ROGERS PARK GARFIELD RIDGE 1.22131E-05
ROGERS PARK WEST ELSDON 1.24567E-05
ROGERS PARK WEST LAWN 1.12682E-05
ROGERS PARK CLEARING 1.13634E-05
ROGERS PARK ASHBURN 1.03377E-05
ROGERS PARK AUBURN GRESHAM 1.03276E-05
ROGERS PARK BEVERLY 9.25702E-06

This is obviously not what we want. The two Unknown should be replaced with the id_variable and name of shapefile
and the i and j in each row should be integers corresponding to the position of each in the order of the shapes.
The "names" associated with each i and j are in the id_variable.

@ghost ghost assigned sjsrey Apr 20, 2013
@sjsrey
Copy link
Member

sjsrey commented Apr 20, 2013

on #244 (comment)

there are two issues. first, if i read the example correctly you are generating a knn weight, but then writing to a gwt file extension. the writers are dispatched based on the extension, so this would be a mismatch (knn vs. gwt).

but, the second issue is if you write it to a gal, the same error is triggered (key error). this is the bug we need to fix.

while i started on this, it raises a couple of more issues.

  • how are multi-word string ids (ROGERS PARK) to be dealt with in the gwt specification?
  • how do we support that with our readers and writers for W objects
  • same questions can be asked about the gal format.

we should have a discussion about this as many fingers have been involved in the weights, reader, writers, so there are likely interdependencies that no single person has knowledge of.

@sjsrey
Copy link
Member

sjsrey commented Apr 20, 2013

One options is to follow GeoDa's approach and restrict the type of variable that can be used for the idVariable to be integer. in that case no string variables are allowed and the issue of multi word strings goes away.

@sjsrey
Copy link
Member

sjsrey commented Jun 28, 2013

I think we don't mess with this in 1.6. I started a branch https://github.com/pysal/pysal/tree/weight_ids to look at the refactoring of the idVariable.

@darribas
Copy link
Member Author

darribas commented Dec 7, 2013

I've come across a slightly different but related issue with idVariable on knnW_from_shapefile so, rather than putting it in a separate issue, I'll add it to this thread. For some reason, in some cases, the method fails if an idVariable is passed. Example:

import pysal as ps
l = ps.examples.get_path('10740.shp')
w = ps.knnW_from_shapefile(l, 3) #Works fine
w = ps.knnW_from_shapefile(l, 3, idVariable='STFID') #Fails

The error returned is:

In [9]: w = ps.knnW_from_shapefile(l, 3, idVariable='STFID')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-9-82b98fb8dab8> in <module>()
----> 1 w = ps.knnW_from_shapefile(l, 3, idVariable='STFID')

/home/dani/code/pysal_darribas/pysal/weights/user.pyc in knnW_from_shapefile(shapefile, k, p, idVariable, radius)
    322     if idVariable:
    323         ids = get_ids(shapefile, idVariable)
--> 324         return knnW(data, k=k, p=p, ids=ids)
    325     return knnW(data, k=k, p=p)
    326 

/home/dani/code/pysal_darribas/pysal/weights/Distance.pyc in knnW(data, k, p, ids, pct_unique)
    146         idset = np.arange(len(info))
    147 
--> 148     neighbors = dict( [ (idset[i],row[row!=idset[i]].tolist()[:k]) for i,row in enumerate(info)  ] )
    149     return pysal.weights.W(neighbors,  id_order=ids)
    150 

TypeError: 'int' object has no attribute '__getitem__'

In [10]:

spreg-git pushed a commit to spreg-git/pysal that referenced this issue Jan 13, 2014
mamash pushed a commit to TritonDataCenter/pkgsrc-wip that referenced this issue Jan 31, 2014
	using FETCH_USING=curl
	v<1.7.0>, 2014-01-29
36d268f Philip Stephens -Merge pull request #400 from sjsrey/mldoc
c2c4741 Serge Rey -Formatting ml docs
685f5e3 Sergio Rey -Merge pull request #399 from sjsrey/master
481ccb4 Serge Rey -correct thanks
4a5cce3 Sergio Rey -Update index.txt
1fe7aeb Philip Stephens -Merge pull request #396 from sjsrey/mldoc
e731278 Serge Rey -EHN: fixing link to bleeding edge docs.
e4e9930 Serge Rey -ENH: adding ml docs to api
9b3c77e Serge Rey -Merge branch 'master' of github.com:pysal/pysal
dda3c01 Philip Stephens -Merge pull request #389 from dfolch/master
74b26d5 Philip Stephens -Merge pull request #392 from pedrovma/spreg17
b47ba84 pedrovma -Bump.
3d8504c Sergio Rey -Merge pull request #386 from pastephens/master
f9b59ea Philip Stephens -Merge branch 'master' of https://github.com/pysal/pysal
429e19e pedrovma -Upgrading to spreg 1.7.
c698747 David Folch -removing legacy speedup hack that is no longer relevant
88177d0 Sergio Rey -Merge pull request #387 from sjsrey/scipy13
64a4089 Serge Rey -BUG: sorting ijs for asymmetries
5539ef5 Sergio Rey -Merge pull request #1 from sjsrey/scipy13
8a86951 Serge Rey -BUG: fixes for scipy .0.9.0 to 0.13.0 induced errors
fe02796 Philip Stephens -tweaking travis to only run master commits
8c1fbe8 jlaura -Merge pull request #385 from sjsrey/docupdate
b71aedc Serge Rey -ENH: update date
4f237e4 Sergio Rey -Merge pull request #384 from sjsrey/moran
01da3be Serge Rey -ENH: Analytical p-values for Moran are two-tailed by default #337
918fe60 Philip Stephens -further travis tweaks
3920d73 Sergio Rey -Merge pull request #382 from sjsrey/st_docs
d90bc70 Serge Rey -DOC: updating refs for concordance algorithm
0db2790 Philip Stephens -tweaks to travis
063e057 Philip Stephens -upgrading scipy on travis
f90e742 Philip Stephens -Merge branch 'master' of https://github.com/pysal/pysal
edc9c07 Dani Arribas-Bel -Merge pull request #379 from sjsrey/b244
82479bb Serge Rey -BUG: fix for the comment pysal/pysal#244 (comment)
57ba485 jlaura -Update README.md
981ed31 Sergio Rey -Merge pull request #377 from darribas/master
3320c39 darribas -Changing cmap default in plot_choropleth so every type defaults to its own adecuate colormap
e063bee darribas -Fixing ignorance of argument cmap in base_choropleth_unique
1f10906 Dani Arribas-Bel -Merge pull request #375 from sjsrey/viz
94aa3e7 Dani Arribas-Bel -Merge pull request #376 from pedrovma/baltim_data
7568b0b pedrovma -Adding Baltimore example dataset for use with LM models.
5b23f89 Serge Rey -greys for classless map
d4eae1e Dani Arribas-Bel -Merge pull request #374 from sjsrey/viz
652440d Serge Rey -shrinking colorbar
c17bf67 Sergio Rey -Merge pull request #373 from darribas/master
a71c3cb darribas -Fixing minor conflict to merge darribas viz branch into darribas master
ec27e30 Dani Arribas-Bel -Merge pull request #372 from sjsrey/viz
8c03170 Serge Rey -option for resolution of output figs
3fc5bd4 Philip Stephens -Merge branch 'master' of https://github.com/pysal/pysal
2b5cb23 jlaura -Merge pull request #371 from sjsrey/geopandas
469afa7 Serge Rey -fix for #370
59cdafc jlaura -Merge pull request #369 from pedrovma/south_data
6b88e13 jlaura -Merge pull request #368 from schmidtc/issue367
40fe928 pedrovma -Adding south data to be used in ML doctests.
bcc257e schmidtc -fixes #367
87e057f jlaura -Merge pull request #366 from sjsrey/ml_lag
a64eb27 Serge Rey -queen contiguity for nat.shp
77add5c Sergio Rey -Merge pull request #365 from sjsrey/news
82464ef Serge Rey -narsc workshop
fd79424 Sergio Rey -Merge pull request #364 from sjsrey/news
bc7f25a Serge Rey -Merge branch 'master' of https://github.com/sjsrey/pysal
d669913 David Folch -Merge pull request #363 from sjsrey/maxp
22f9e36 Serge Rey -update example for bug fix #362
fac3b8a Serge Rey -- update tests for bug fix #362
44b4b06 Sergio Rey -Merge pull request #1 from sjsrey/maxp
1e6f1e5 Serge Rey -- fix for #362
68ab3e9 Sergio Rey -Merge pull request #361 from sjsrey/components
aa27c7e Serge Rey -doc test fix
7c08208 Serge Rey -putting Graph class back in for component checking
003b519 Serge Rey -alternative efficient component checker
2080e62 Serge Rey -- fixing doc
4fda442 Serge Rey -Merge branch 'components' of github.com:sjsrey/pysal into components
e9e613b Serge Rey -reverting back to old component check
83d855e Serge Rey -updating example
9defd86 jlaura -Merge pull request #360 from sjsrey/components
6f92335 Serge Rey -more efficient connectivity test
ebde3d1 Dani Arribas-Bel -Adding try/except for ogr since it's only used to reprojection methods but not on the plotting toolkit
5b170eb Sergio Rey -Merge pull request #356 from sjsrey/classification
c9dac41 Serge Rey -- update unit tests for reshaping jenks caspal
d9b06e2 Sergio Rey -Merge pull request #355 from sjsrey/cleanup/moran
dc589e8 darribas -Adding caution note when plotting points to the notebook. Ideally, we wanna be able to build a PathCollection out of the XYs, but for now we rely on plt.scatter, which gets the job done but has some problems.
2224b95 darribas -Including support for points in  base_choropleth_unique and base_choropleth_classless
ac2d08a darribas -Modifying example to show how to do choropleth mapping on points
270786e darribas -Adding support for choropleth plotting on point map objects (this may come from map_point_shp or from a simple matplotlib scatter
e56697c Sergio Rey -Merge pull request #357 from jlaura/newstyle_wed
4c67c2f Jay -errors in segmentation fixed
512cc76 Serge Rey -have Jenks-Caspal bins be a one dimensional array - to be consistent with all other classifiers
5254859 Philip Stephens -Merge branch 'master' of https://github.com/pysal/pysal
788ecab Serge -pruning
5b6b7b6 Serge -pruning
eb7e9a1 Jay -bug fix and all pointers filled for external edges
e47aa7a Jay -Node insertion, precursor to segmentation.
18a44d1 darribas -*Replacing shp by map_obj in medium layer functionality. *Bringing everything else in line with it *Adding example for line colorig and mixing overlaying of points.
bd041b1 darribas -Replacing shp_link by shp as input for medium and low-level layers. This brings much more flexibility and opens the door to plot formats other than shapefiles (e.g. geojson)
c74a361 darribas -Adding IP notebook to exemplify and keep track of development of mapping module
d23c882 darribas -Minor fixes
4b82a76 darribas -New commit message* Replacing map_poly_shp_lonlat for map_poly_shp in base_choropleth_classif/unique/classless * removed 'projection' from base_choropleth_classif/unique/classless * Allow base_choropleth_classif/unique/classless to plot multi-part polygons properly * changes streamlined to generic plot_choropleth * Added dependency on pandas for rapid reindexing (this is done externally on the method _expand_values to it is easy to drop the dependency when neccesary/time available)
7a0eaec darribas -Merge branch 'viz' of github.com:darribas/pysal into viz
5536424 darribas -Merge branch 'master' of github.com:darribas/pysal
e54ce16 Sergio Rey -Merge pull request #353 from darribas/master
819ee60 darribas -Adding immediate todo on head of the file
946772d darribas -Passing k to base_choropleth_classif from plot_choropleth. This should fix Issue #352
f299b45 darribas -Merge branch 'master' of https://github.com/pysal/pysal
f044f43 Jay -Added W generation
5f48446 jlaura -Merge pull request #348 from sjsrey/master
938a1ae Serge Rey -- adding nn stats to point based methods
a86a051 Philip Stephens -removing dependency tracking service, it was ruby only
1e24fde Philip Stephens -testing dependency tracking service
3aa410c Philip Stephens -Merge pull request #347 from pedrovma/w_silence_island
03990f6 pedrovma -Extending PR #310 (silence island warnings) to include w.transform.
160001a Sergio Rey -Merge pull request #346 from jlaura/newstyle_wed
44989f9 Sergio Rey -Merge pull request #345 from sjsrey/master
2fd99b8 Sergio Rey -Update README.md
bdcc6a8 Jay -NCSR with uniform distribution
769aa03 Jay -Fixed snapping
2561071 Jay -saved notebook and updated readme
3784783 Jay -ReadMe for Changes
019e16b Sergio Rey -Merge pull request #334 from jseabold/fix-build-example-dirs
1889885 Skipper Seabold -BLD: Correctly install package_data dirs.
ff4e355 Serge Rey -- assignments
c5b0cc0 Serge Rey -- reorg
a4f5642 Serge Rey -Merge branch 'network' of github.com:pysal/pysal into network
a95fec8 jlaura -Update README.md
1713145 Serge Rey -Merge branch 'master' of github.com:pysal/pysal into network
ede75c0 Sergio Rey -Merge pull request #329 from jlaura/wed_polar
7399cf2 Jay -Single-source shortest path notebook
9eb3fc1 Philip Stephens -Merge pull request #331 from sjsrey/docfix
ef9c82a Serge Rey -- sphinx doctest markup fix
1e2b6b3 jlaura -Update README.md
e19bffa jlaura -Merge pull request #330 from pysal/b328
6afc30b Serge Rey -- tutorial doc fixes for #328
c7239f1 Serge Rey -- b328 fix
d5fec13 Serge Rey -- fix for #328  making all p-values one-tailed
16b5e6e Jay -enumeration working with filaments
9507bbc jlaura -Update README.md
eef8eec Serge Rey -- stub for design of module
2707d60 Jay -Filaments in polar coordinates
b64f9e2 Serge Rey -Documentation for the development of network module
b90876e Serge Rey -Merge branch 'network' of github.com:pysal/pysal into network
ddad2a5 Philip Stephens -Merge pull request #326 from sjsrey/doc
6b0cd08 Serge Rey -- update release schedule
4cc7bca Jay -bisecting for single point working
79c77d9 jlaura -Merge pull request #324 from pysal/bf_id
9f4c7c9 Serge Rey -id is a keyword
72b1f85 Sergio Rey -Merge pull request #323 from jlaura/network
b5cdae0 Jay -fix to shp2graph
846dce2 Jay -Brute force for point outside network
d6c2ef4 Jay -Added length computation, alter global morans
b7e1465 Jay -Added new pointer to reader/writer
616d62d Jay -LISA and Global Morans on the network
16f84d6 Jay -Added explicit point external to network warning
34f4d8e Jay -update to the ipython notebook
e359e59 Jay -JSON and cPickle Bianry WED Reader/Writer
5373c82 Sergio Rey -Merge pull request #322 from jlaura/network
059d99c Jay -wed into class, tests added
aa5969d Sergio Rey -Merge pull request #320 from pastephens/master
a18000b Philip Stephens -version added info
5b8d490 Philip Stephens -typo
d31a22a Philip Stephens -stubs for cg docs
4dbdfe3 schmidtc -fixes #318
35a0317 Jay -Merge branch 'master' of https://github.com/pysal/pysal into network
77e8387 Jay -Merge branch 'geojson' of https://github.com/pysal/pysal into network
ad670c5 Sergio Rey -Merge pull request #317 from pastephens/master
628f27e Philip Stephens -merging local changes
f9dcb3e Philip Stephens -simplified install instructions
f2fab4c Serge Rey -- notebook on w construction for geojson
830826b Serge Rey -prototyping W from geojson
b10240d Serge Rey -created with "ogr2ogr -lco WRITE_BBOX=YES -f "GeoJSON" columbus.json columbus.shp"
d546926 Philip Stephens -merging with pull
d711011 darribas -Merge branch 'rod'
8bef782 darribas -Merge branch 'rod' of https://github.com/pysal/pysal into rod
03c1003 pedrovma -Merge pull request #315 from sjsrey/rod
950fe8b Serge Rey -Replacing ROD with regular dictionary
b1f009f Philip Stephens -Changes to release docs.
028364a Sergio Rey -Update THANKS.txt
94f5916 Sergio Rey -Update INSTALL.txt

v<1.6.0>, 2013-07-31

5fa9d09 darribas -silent_island_warning implemented for w_union
6526c62 Sergio Rey -Update README.md
ea826c1 darribas -silent_island_warning implemented for w_intersection
335540a darribas -silent_island_warning implemented for w_difference
0a156cb darribas -silent_island_warning implemented for w_symmetric_difference. Previous commit included support of silent_island_warning for WSP2W as well
34d20d7 darribas -silent_island_warning implemented for w_clip
499815d pedrovma -Test fixing...
8778f75 pedrovma -Test fixing...
a799a13 pedrovma -Test fixing...
6482d81 pedrovma -Test fixing...
2752b1b pedrovma -Test fixing...
0c0a5bf pedrovma -Test fixing...
bbf9dcb pedrovma -Test fixing...
05c34ff pedrovma -Test fixing...
8a3986a Serge Rey -- preparing for release, version updates
9106cfe pedrovma -Matching travis results reg. precision issues.
3cd0ce1 Serge Rey -- updating changelog
74dadd6 pedrovma -Bump.
c7774fb Serge Rey -- update THANKS.txt - testing travis for timing out
cd98057 Serge Rey -- travis fix for multiprocessing permission error
86702f8 Serge Rey -- start of changelog for 1.6
3ee686d pedrovma -Reloading to check new results from Travis.
2de1d21 Serge Rey -- docs
ef72edc Serge Rey -- update docs
0716581 Serge Rey -- deal with multiprocessing on travis
b508c88 Serge Rey -- excluding network from 1.6 release
ff13e31 pedrovma -Matching Travis results. Multiprocessing errors still an issue.
5b916ba pedrovma -Adding Chow test on lambda and updating dynamics of regime_err_sep and regime_lag_sep in combom models.
b6e687f darribas -Patch to include switch for island warning as proposed in #295. The method  is modified as well to include the switch
7ea5f35 pedrovma -Fixing defaults
62ca76b pedrovma -Updating documentation and checking if there are more than 2 regimes when regimes methods are used.
3212249 pedrovma -Fixing documentation on 'name_regimes'
a782d50 pedrovma -Updating tests for integration with pysal 1.6
14f9181 pedrovma -Merging spreg_1.6 with my pysal fork.
817f2c2 Serge Rey -- having build_lattice_shapefile also create the associated dbf file - useful for testing our contiguity builders against geoda since dbf is   required by the latter
41d59a4 Serge Rey -- adding diagonal option to kernel weights in user.py
506d808 Serge Rey -update when added
b2ec3d4 Serge Rey -- updating api docs
9d45496 Serge Rey -- example and doctests for spatial gini
95635bb Serge Rey -updating release docs
bd2f924 darribas -Fixing doctest of towsp method by including isinstance(wsp, ps.weights.weights.WSP)
76183d7 darribas -Fixing doctest of towsp method by including type(wsp)
0c54181 darribas -Adding  method in W that calls WSP class for convenience and elegance. Related to issue #226
f3b23e8 Philip Stephens -adding source build to travis-ci
60930e7 Philip Stephens -adding new url for downloads
9bf7f5b Philip Stephens -modified release docs.
f98d4a9 Philip Stephens -interim ci
aa19028 Philip Stephens -Adding docs about installing in develop mode.
674112f Philip Stephens -starting rewrite of install docs
af0d9b3 Philip Stephens -working on doc tickets
200e77e Serge Rey -handle ties in knnW in doctest
d0d2dd2 Serge Rey -resetting README for pysal/pysal
6afb6ac Serge Rey -- updating docs for new api in interation.py
4c5572f Serge Rey -- updating tests for new api
fabd16a Serge Rey -- refactored signatures to use numpy arrays rather than event class
6367947 Serge Rey -- refactor knox for large samples
5fad3b2 Serge Rey -- updating travis test
06894d8 Serge Rey -- updated README
8b06e63 Serge Rey -- so only i get email when i commit locally
efbb7ff Serge Rey -- removing google pysal-dev circle
9859bda Serge Rey -- turning off gmail circle
51f6d3e Serge Rey -- fixing
46b1084 Serge Rey --docos
4e2c27a Philip Stephens -missing if statement added
d1a83fd Serge Rey -- fixing docs
8275d76 Serge Rey -- fix precision
87ea5cc Philip Stephens -adding to authors and quick test fix for linux
1cfb67f Serge Rey -cant easily remove idVariable, reverting
5933d1e Serge Rey -removing idvariable from Distance - causes too many issues
05f2573 Philip Stephens -removing coverage tests
fcb8c6f Philip Stephens -Knox using KDTree.
2237173 Serge Rey -with tests against previous implementation removed
233e59a Serge Rey -speed comparison for change to query_pairs in kdtree
fb78ea9 Serge Rey -removing test file
4d04575 Philip Stephens -testing
357a184 Serge Rey -second great idea
1fafc2b Serge Rey -on a plane commit 1
fef6eae Philip Stephens -fix
86c17ac Serge Rey -- test file
a619f62 Philip Stephens -interim ci
1a9d881 Serge Rey -- knox test using kdtrees
7459c44 Serge Rey -Fixing reference to missing shapefile Fixing one rounding error induced test
5616b12 Serge Rey -refactored to avoid second loop in explicit queen or rook check
d3d2f71 Philip Stephens -Revert "Changed doctest path calls to account for modified shapefile."
da1d8a1 Philip Stephens -Changed doctest path calls to account for modified shapefile.
f591c99 Philip Stephens -progress on permutations of knox for larger datasets
8d31cde Serge Rey -Testing integration of spatialnet creation and reading into wed
11de6f3 Jay -Fixed wed_modular.py
077658a Serge Rey -adding new test case for wed extraction from a spatialnet shapefile
bbb10b4 Philip Stephens -saving state of development
44076b7 Serge Rey -- update doc test
6fdd94d Serge Rey -- moved regions_from_graph into wed_modular - documented all functions and cleaned up
5bd27c3 Serge Rey -- wrapping in functions
3ad162f Serge Rey -- working version of wed_modular module - starting point for clean up
2380f15 Philip Stephens -Copy of sphinx install docs. Closes #251
5687700 Philip Stephens -tweaks to install instructions
9ffd432 Serge Rey -- updating for switch from svn to git
fdaf521 Philip Stephens -Fixing 250
5ba4fdf Serge Rey -Fixes #249 Closes #249
d89944d Pedro -Adding docs for each regimes estimator
f03bb63 Serge Rey -- updating docs for spatial regimes in spreg
a49d0f7 Philip Stephens -Adding info to setup script.
1f27605 Philip Stephens -mainly docs
04f8a31 Philip Stephens -Adding test coverage with nose, data collected and presented on coveralls.io
6db978b Philip Stephens -last changes
137e088 Philip Stephens -added bigdata parameter
7ca81c2 Philip Stephens -got Knox stat working in alt form
24c1fcc Philip Stephens -workign on refactoring the space-time matrices for the Knox test [ci-skip]
28013f0 Serge Rey -- enumeration of cw edges for faces
baa8f60 Serge Rey -- hole is now included and enumeration of links (cw) around nodes works for all nodes. - isolated nodes also handled in enumeration of links around nodes.
33741c8 Serge Rey -- filaments inserted and pointers updated - have to add hole polygon and isolated nodes, but almost there!!!!!!!!!
416d3db Serge Rey -- pointers updated for edges of connected components
c34e274 Serge Rey -- convex/between edge test as start of testing for insertion of multiple   internal filaments in one region.
78d96b1 Serge Rey -- filament insertion and pointer updates
ced2c5b Serge Rey -- filament insertion (inc)
ba4263f Jay -Logic roughed in for filaments [ci skip]
cf3b0bc Jay -updated wed ipynb [ci skip]
33ce81e Serge Rey -- refactoring of wed construction (incomplete)
0fc16fc Jay -modular WED Pulled Apart 2 funcs in 1 cell
bf73b90 Jay -modular WED
3163377 Serge Rey -- new modular wed construction
e50b31d Jay -added test_wed additions to test_wed2
1cbc941 Serge Rey -- isolated nodes handled
d28b97f Serge Rey -- isolated filament handled
6188fd5 Serge Rey -- hole component handled
a96040b Serge Rey -- getting connected components (current 14,15,16  and 25,26,27 are not   included)
3aa31a5 Jay -Added boolean arg to include or exclude holes [ci skip]
d07876d Jay -Filament identification [ci skip]
0139ea5 Philip Stephens -Slight speed improvement getting rid of append calls in reading shapefile and building x,y lists.
43010b5 Serge Rey -- fixed logic problem with enum for v1, starting on components
8737918 Pedro -Adding more meaningful error message to inverse distance weights
01f52f6 Serge Rey -- replacing code that got deleted previously
7c4c6e1 Philip Stephens -Replacing deleted files.
a8da725 Philip Stephens -added date support to spacetimeevents class, a date column to example dbf.
90c4730 Philip Stephens -logic works, numeric test still failing
b8e43e1 Philip Stephens -saving progress on interaction
81f2408 Serge Rey -- handling external end-node-filament
7de6253 Serge Rey -- adding end node filament handling - edge enumeration around node working
f542b9a Serge -- adding end node filament handling - edge enumeration around node working
d7e3a57 Philip Stephens -[ci skip] disabling nose-progressive so travis output looks best
fe03013 Dani Arribas-Bel -Adding set of diversity indices to inequality module under _indices.py for now. Still lacks doctests, unittests, and a few others will be added
951b6f5 Dani Arribas-Bel -Adding try/except to the import of Basemap to allow the use of the module when there is no Basemap installation
89003eb Serge Rey -- adding wed for eberly example
665ef22 Serge Rey -- fixed 7,2 failure
71fc9ad Serge Rey -start of adding gini and other inequality measures
f7b7bcc Phil Stephens -Adding nose-progressive plugin to test suite. Devs can run test suite with 'make test'.
f5db7bf Serge Rey -- updating copyright
07574b5 Serge Rey -- docs
478d2cb Philip Stephens -Adding requirement. Removing redundancy.
916a6ca Serge Rey -- more island check updates
edd9960 Serge Rey -- more island check doctest changes
ad1a91c Serge Rey -- updating doctests for island check
ce77772 Serge Rey -- fixing doctests to incorporate new island warning
554a30b Serge Rey -- silencing floating point warning
4f76862 Serge Rey -- moving default contiguity builder back to binning from rtree
b99665b Jay -Eberly
d911344 Jay -mp removed, passing nosetests on my machine serial
f005675 Serge Rey -improved binning algorithm for contiguity builder
4a69557 Serge Rey -- double checking threshold in Distance Band - new example to show functionality
7256f13 Serge Rey -- fix handling of idVariable for knnW
31bb36e Jay -bug fixes [ci skip]
a2d2dd4 Jay -WEberly - WED Building [ci skip]
3abc55e Serge Rey -- fixing doctests for new check/reporting for islands
756ac05 Serge Rey -- adding warning if islands exist upon W instantiation
db097a6 Jay -Weberly, bug fix, c and cc link remaining
d5cc6f9 Jay -All but start / end working
033963d Jay -Integration to WEberly error fixed [ci skip]
22b931a Serge Rey -- removing main for doc tests which can be run from nosetests. - updating testing docs
bf753e9 Jay -Integration to WEberly started [ci skip]
6506e07 Serge Rey -- typo
aede375 Serge Rey -- replacing double quotes around multi word ids with strings joined with   underscores
cf029e8 Serge Rey -- changes to wrap string ids in gwt writer - see pysal/pysal#244 (comment)
626ac08 Serge Rey -- adding shapefile and variable name to gwt objects created in user space
3c84bb0 Jay -Working version 4.19 [ci skip]
7d77da9 darribas -Include warning in sp_att when rho is outside (-1, 1), ammends #243 although the true problem (pearsonr in diagnostics_tsls) will still raise an error
3719d21 Jay -working WED [ci skip]
b4ce294 Serge Rey -checking edges
f4bb412 Jay -excessive print statements removed. ci skip
9f7dee6 Jay -SUCCESS! ci skip
9077615 Phil Stephens -Note, [ci skip] anywhere in your commit message causes Travis to NOT build a test run.
cb072c4 Jay -getting there
d3b36bc Serge Rey -correcting typo user told me about
19ea051 Jay -trivial working
b9ea577 Jay -eberly cycles - edge issue still
d5153e3 Serge Rey -more refinement of wed from plannar graph
edff44b Philip Stephens -adding git ignore file
8093f21 Serge Rey -wed from minimum cycle basis
b5bcead Serge Rey -handle filaments
9a8927a Serge Rey -face extraction using horton algorithm
10d66c1 Serge Rey -updating readme formatting
59f3750 schmidtc -adding Universal newline support to csvReader, fixes #235
09e813f Serge Rey -- updating notifications
f8b0a26 Serge Rey -- fixing Distance.py and testing travis message
d1ec0f2 Phil Stephens -quieting pip output and fix one doctest
927e799 Phil Stephens -adding networkx, tweaks to travis config
5971bb1 Serge Rey -neighbors from wed
28f0e55 Serge Rey -adding robust segment intersection tests
3bcac73 Serge Rey -adding doubly connected edge list to network module
86f0fea darribas -Adding methods to read line and point shapefiles and improving the method to append different collections to one axes. Still in progress
b61cb55 Serge Rey -- fixing introduced bug in knnW_arc
801e78d Serge Rey -Handle point sets with large percentage of duplicate points
dbafbc4 serge -update pointer to github
427a620 Serge Rey -dealing with filaments
23216ef Serge Rey -Fixed cw enumeration of links incident to a node
0a51a53 Serge Rey -- readme
5f4cab4 sjsrey -cw enumeration not working for all nodes
f2e65d3 Serge Rey -- cw traversal of edges incident with a node
90d150c sjsrey -- version debug for travis
24598a8 sjsrey -- noting move to org
9fb8a17 sjsrey -- fixing tutorial tests
5a14f9e serge -- cleaning up weights tests
6265b3b Serge Rey -- fixing doc tests
7e8c4fe Serge Rey -- testing after move to org
37fc8d4 Serge Rey -- testing post commit emails
bed7f6e Phil Stephens -removed files
eab2895 Phil Stephens -removed virginia_queen files
bcef010 Serge Rey -- adding diagonal argument to Kernel weights - adding doctest evaluation to Distance.py
02d27e9 Phil Stephens -adding libgeos-dev
1126d71 Phil Stephens -pipe build output to null
37dbb35 Phil Stephens -adding -y flag to pip uninstall
06d56e9 Phil Stephens -adding libgeos_c install, pysal from pip
4c53277 Phil Stephens -trying to quiet output, using Makefile
74448e8 Phil Stephens -find setup.py
4634fb1 Phil Stephens -test install in venv and build
5d58723 Phil Stephens -working out travis-ci doctest configuration
5e905d3 Phil Stephens -adding numpydoc
33a5298 Phil Stephens -tweaks travis config
5c85f50 Phil Stephens -tweaking service configs
4ed1201 Josh Kalderimis -use the correct syntax for sysytem_site_packages
954b6d2 Phil Stephens -stop!
311eca8 Phil Stephens -ssp=true
c601bca Phil Stephens -numpy first
54b0afe Phil Stephens -ok, so travis is serious about not using system site packages.
2b912cc Phil Stephens -doh
28994df Phil Stephens -better yaml
ce1d89e Phil Stephens -testing
b535d3e Phil Stephens -testing
440a772 Phil Stephens -tweaking pip requirements file
34a74e2 Phil Stephens -tweaking travis file
33b13aa Serge Rey -- new links
8e09d7b Serge Rey -- setting up travis
d33001e Sergio Rey -Update CHANGELOG.txt
9d4de66 Serge Rey -- added authors
ab672c9 Serge Rey -- modified knnW to speed up dict construction
4edd2ab Serge Rey -- update cr
39e6564 Phil Stephens -syncing install instructions with docs
9e98db9 Phil Stephens -adding website favicon; chrome does not empty cache properly!!

 * migration to github from svn
   svn2git http://pysal.googlecode.com/svn --authors ~/Dropbox/pysal/src/pysal/authors.txt --verbose

v<1.5.0>, 2013-01-31

2013-01-29 20:36  phil.stphns

	* doc/source/users/installation.txt: updating and simplifying user
	  install instructions.

2013-01-18 16:17  sjsrey

	* Adding regime classes for all GM methods and OLS available in
	  pysal.spreg, i.e. OLS, TSLS, spatial lag models, spatial error models
	  and SARAR models. All tests and heteroskedasticity
	  corrections/estimators currently available in pysal.spreg apply to
	  regime models (e.g. White, HAC and KP-HET). With the regimes, it is
	  possible to estimate models that have:
	  -- Common or regime-specific error variance;
	  -- Common or regime-specific coefficients for all variables or for a
	  selection of variables;
	  -- Common or regime-specific constant term;
	  - Various refactoring to streamline code base and improve long term
	    maintainability
	    - Contributions from Luc Anselin, Pedro Amaral, Daniel Arribas-Bel
	      and David Folch

2013-01-18 14:08  schmidtc

	* pysal/common.py: implemented deepcopy for ROD, see #237

2013-01-08 12:28  dreamessence

	* pysal/contrib/spatialnet/__init__.py: Adding __init__.py to make it importable

2012-12-31 22:53  schmidtc

	* pysal/core/IOHandlers/gwt.py: adding kwt support, see #232

2012-12-21 20:53  sjsrey@gmail.com

	* pysal/__init__.py, pysal/cg/rtree.py,
	  pysal/contrib/weights_viewer/weights_viewer.py,
	  pysal/weights/weights.py: - turning off randomization in rtree

2012-12-06 16:34  dfolch

	* pysal/contrib/shapely_ext.py: adding unary_union() to shapely
	  contrib; note this only works with shapely version 1.2.16 or higher


2012-11-29 13:39  dreamessence

	* pysal/contrib/viz/mapping.py: Added option in setup_ax to pass
	  pre-existing axes object to append.  It is optional and it enables,
	  for instance, to embed several different maps in one single figure

2012-11-20 00:23  dfolch

	* pysal/contrib/shapely_ext.py: adding shapely's cascaded_union
	  function to contrib

2012-11-12 18:08  dreamessence

	* pysal/contrib/viz/mapping.py: -Adding transCRS method to convert
	  points from one prj to another arbitrary one -Adding map_poly_shp to
	  be able to plot shapefiles in arbitrary projections, not needing to
	  be in lonlat and not depending on Basemap

2012-11-09 15:40  sjsrey@gmail.com

	* pysal/weights/weights.py:
	  - distinguish between intrinsic symmetry and general symmetry

2012-11-02 17:48  schmidtc

	* pysal/weights/user.py, pysal/weights/util.py: Adding Minkowski
	  p-norm to min_threshold_dist_from_shapefile, see issue #221

2012-10-19 22:35  sjsrey@gmail.com

	* pysal/weights/weights.py:
	  explicitly prohibit chaining of transformations - all
	  transformations are only applied to the original weights at
	  instantiation

2012-10-19 17:38  sjsrey@gmail.com

	* pysal/spatial_dynamics/markov.py:
	  - fixing bug in permutation matrix to reorder kronecker product in
	    the join test

2012-10-17 17:55  sjsrey@gmail.com

	* pysal/weights/util.py:
	  -
	  higher order contiguity for WSP objects

2012-10-17 15:43  sjsrey@gmail.com

	* pysal/weights/user.py:
	  -
	  id_order attribute was always NONE for wsp created from

	  queen/rook_from_shapefile with sparse=True

2012-10-16 19:25  schmidtc

	* pysal/weights/util.py: improving memory usage of
	  get_points_array_from_shapefile, no need to read entire shapefile
	  into memory.

2012-10-15 00:44  dreamessence

	* pysal/contrib/viz/mapping.py: First attempt to refactor Serge's code
	  for choropleth mapping.  It now offers a more general and flexible
	  architecture.  Still lots of work and extensions left.  The module
	  is explained in a notebook available as a gist at
	  https://gist.github.com/3890284 and viewable at
	  http://nbviewer.ipython.org/3890284/

2012-10-12 18:34  schmidtc

	* pysal/contrib/spatialnet/spatialnet.py: modified SpatialNetwork.snap
	  to calculate and return the snapped point

2012-10-12 17:05  dfolch

	* pysal/contrib/viz/mapping.py: made edits to unique_values_map to
	  allow for unlimited number of categories; I commented out the
	  previous code so these changes can easily be rolled back if it
	  breaks something somewhere else

2012-10-12 15:03  schmidtc

	* pysal/cg/segmentLocator.py: Fixing issue with segmentLocator, when
	  query point is extreamly far from the grid boundary, overflow errors
	  were causing the KDTree to not return any results.  Changed both
	  KDtree's to use Float64 and share the same data.  Previously,
	  cKDTree was using float64 and KDtree was using int32.

2012-10-11 08:12  dreamessence

	* pysal/contrib/viz/__init__.py: Adding __init__.py to viz module to
	  make it importable

2012-08-31 02:57  phil.stphns

	* pysal/spreg/tests/test_diagnostics.py,
	  pysal/spreg/tests/test_diagnostics_sp.py,
	  pysal/spreg/tests/test_diagnostics_tsls.py,
	  pysal/spreg/tests/test_error_sp.py,
	  pysal/spreg/tests/test_error_sp_het.py,
	  pysal/spreg/tests/test_error_sp_het_sparse.py,
	  pysal/spreg/tests/test_error_sp_hom.py,
	  pysal/spreg/tests/test_error_sp_hom_sparse.py,
	  pysal/spreg/tests/test_error_sp_sparse.py,
	  pysal/spreg/tests/test_ols.py,
	  pysal/spreg/tests/test_ols_sparse.py,
	  pysal/spreg/tests/test_probit.py,
	  pysal/spreg/tests/test_twosls.py,
	  pysal/spreg/tests/test_twosls_sp.py,
	  pysal/spreg/tests/test_twosls_sp_sparse.py,
	  pysal/spreg/tests/test_twosls_sparse.py:
	  - autopep8 -iv spreg/tests/*.py - nosetests pysal - no fixes needed

2012-08-31 01:16  phil.stphns

	* pysal/spreg/diagnostics.py,
	  pysal/spreg/diagnostics_sp.py,
	  pysal/spreg/diagnostics_tsls.py,
	  pysal/spreg/error_sp.py,
	  pysal/spreg/error_sp_het.py,
	  pysal/spreg/error_sp_hom.py,
	  pysal/spreg/ols.py,
	  pysal/spreg/probit.py,
	  pysal/spreg/robust.py,
	  pysal/spreg/summary_output.py,
	  pysal/spreg/twosls.py,
	  pysal/spreg/twosls_sp.py,
	  pysal/spreg/user_output.py,
	  pysal/spreg/utils.py:
	  -
	  autopep8 -iv spreg/*.py - fixed autopep8-introduced doctest failures
	  - fixed lingering scientific notation test failures

2012-08-31 00:26  phil.stphns

	* pysal/esda/gamma.py,
	  pysal/esda/join_counts.py,
	  pysal/esda/mapclassify.py,
	  pysal/esda/mixture_smoothing.py,
	  pysal/esda/moran.py,
	  pysal/esda/smoothing.py:
	  -
	  autopep8 fixes - make sure to run unit and doc tests before
	  committing - one autofix breaks long lines, and thus breaks some
	  doctests; must be

	  fixed manually

2012-08-31 00:10  phil.stphns

	*
@sjsrey
Copy link
Member

sjsrey commented Oct 22, 2014

Closing as the multi-word ids is not supported in the GWT spec so it isn't something we can do much about.

Also the related issue @darribas mentioned above with the 10740.shp is now fixed.

@sjsrey sjsrey closed this as completed Oct 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants