Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 20 13:15
    amylmy starred pysal/spaghetti
  • Jul 19 22:29

    jGaboardi on main

    Bump codecov/codecov-action fro… major version only Merge pull request #645 from jG… (compare)

  • Jul 19 22:29
    jGaboardi closed #645
  • Jul 19 22:19
    jGaboardi assigned #645
  • Jul 19 22:19
    jGaboardi labeled #645
  • Jul 19 22:19
    jGaboardi labeled #645
  • Jul 19 22:18
    jGaboardi opened #645
  • Jul 19 03:17

    jGaboardi on main

    Update requirements_docs.txt (compare)

  • Jul 19 03:13

    github-actions[bot] on gh-pages

    Update documentation (compare)

  • Jul 19 03:10

    jGaboardi on main

    remove sphinxcontrib-bibtex pin add bibtex_bibfiles for sphinx update refs and pysal styles and 1 more (compare)

  • Jul 19 03:10
    jGaboardi closed #644
  • Jul 19 02:59
    jGaboardi labeled #644
  • Jul 19 02:59
    jGaboardi assigned #644
  • Jul 19 02:59
    jGaboardi opened #644
  • Jul 19 01:24

    jGaboardi on main

    Update pysal-styles.css (compare)

  • Jul 19 01:14

    jGaboardi on main

    Update pysal-styles.css (compare)

  • Jul 16 17:52
    greylaw89 starred pysal/spaghetti
  • Jul 16 04:14
    Bearzilasaur starred pysal/spaghetti
  • Jul 14 14:46
    jlevy44 starred pysal/spaghetti
  • Jul 14 11:35
    opperud starred pysal/spaghetti
Levi John Wolf
@ljwolf
I think the results from that are substantively different from what I get from the spectral + contiguity clustering
2017-07-19-143454_388x328_scrot.png
close in some ways, though.
regardless, I did not realize that scipy had builtin sparse adjacency matrix graph support
that makes it super easy to build on top of, I'd think both for spaghetti & for bounder/region
Levi John Wolf
@ljwolf
I just refreshed the gist for Spatial-Spectral clustering comparison
anyway, this rapidly deviated from this channel's intent. Sorry to spam. Was just excited about the sparse network support & algos in scipy already.
James Gaboardi
@jGaboardi
@ljwolf looks really neat. Will check it out later.
Levi John Wolf
@ljwolf
if someone figures out how to prevent calling csgraph.csgraph_from_dense after zeroing the links, I'd love to know
right now, that's a slow component at scale.
Levi John Wolf
@ljwolf
figured it out using matrix.eliminate_zeros() after zeroing the link
Now I never cast the sparse matrix to a dense one while solving
Levi John Wolf
@ljwolf
This implementation was just applied to an O(10k) dataset, looked for 100 clusters, got ~60 clusters on a quorum of 70, in ~400 seconds.
hasecbinusr
@hasecbinusr
A year later... I see there is some implementation of NetworkX is Spaghetti now, but I haven't really dug into it to see the extent of integration. Can Spaghetti use a NetworkX model as a starting point now or does it still require a shapefile?
(I'm looking back at my issue from a year and a half ago, haha... pysal/spaghetti#9)
James Gaboardi
@jGaboardi

@hasecbinusr a network object can now be instantiated with a geopandas.GeoDataFrame, but currently it will still produce the same error you were getting before if you would like a simplified, graph-theoretic object. However, we have added an extragraph kwarg that will bypass simplification if set to False.

Thanks for sticking with this issue. It is absolutely still on the radar.

hasecbinusr
@hasecbinusr
I was about to get back into it and work on fixing it, but since I've been gone so long I'm having to refresh myself on the state of the project
hasecbinusr
@hasecbinusr
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-14-0c31d729ebc0> in <module>()
----> 1 ntw = spgh.Network(in_shp=edges)

AttributeError: module 'spaghetti' has no attribute 'Network'
Any clue what's causing this? I'm trying to follow the example at https://github.com/pysal/spaghetti/blob/master/notebooks/Network_Usage.ipynb
James Gaboardi
@jGaboardi
Do you have the most recent version of spaghetti?
hasecbinusr
@hasecbinusr
I just installed a few minutes ago with "pip install spaghetti"
Just upgraded to the latest dev version with the same error
James Gaboardi
@jGaboardi
hmmm. Ok. I will take a look at it.
hasecbinusr
@hasecbinusr
Disregard. I flushed my cache and restarted and it's working now. Who knew...
Gremlins in the system
James Gaboardi
@jGaboardi
:+1:
hasecbinusr
@hasecbinusr
If anyone is interested, I was able to pull a road network from OSMnx and import it into Spaghetti using this code:
import spaghetti as spgh
import osmnx as ox
%matplotlib inline
place_name = "Travis County, Texas, United States of America"
graph = ox.graph_from_place(place_name, network_type='drive')
fig, ax = ox.plot_graph(graph)
edges = ox.graph_to_gdfs(graph, nodes=False, edges=True)
ntw = spgh.Network(in_shp=edges)
James Gaboardi
@jGaboardi
@hasecbinusr this is due to our recent addition of allowing a geopandas.GeoDataFrame as the value of the in_shp argument. And it is very cool that we now know this works. Have you thought about contributing a notebook to showcase this use-case? We would be very interested in reviewing any contributions you may have!
James Gaboardi
@jGaboardi
pysal/spaghetti v1.2 is up and available on pypi and github.
James Gaboardi
@jGaboardi
spaghetti v1.3 released on PyPI and conda-forge
Levi John Wolf
@ljwolf
James Gaboardi
@jGaboardi
@ljwolf How did you come across that project?
James Gaboardi
@jGaboardi
New spaghetti v1.3.1 released.
Anita Graser
@anitagraser
Hi! I've been playing with 1.5.3 to test the fix for pysal/spaghetti#526. While playing around with differently split networks, I observed how drastically the detected hotspots can change. I was wondering if we could compute the hotspots based on pts per meter instead of the absolute point counts. Since graph edges differ in length, longer edges will get more points if points are distributed uniformly.
James Gaboardi
@jGaboardi
Hi, Anita. This is a good question. I will move it over into the repo as an issue so I will be easier to keep track of and discuss.
Anita Graser
@anitagraser
Thank you!
Btw, here's a preview of what we've been up to lately regarding spatiotemporal patterns:
image.png
above: raw point pattern per time slice, next: hotspots per time slice
image.png
image.png
finally: preliminary pattern results
James Gaboardi
@jGaboardi
Wow! this is really cool!
If this is up and documented somewhere, maybe we can provide a link for in the Tutorials section of the docs. Maybe update to “Tutorials & Use Cases” or something.
Anita Graser
@anitagraser
It's joint work with a masters student that is still ongoing but I hope that we'll publish it soon
James Gaboardi
@jGaboardi
Very cool!
Anita Graser
@anitagraser
If anything related comes to your mind, I would be thankful if you could share it.
James Gaboardi
@jGaboardi
@anitagraser I just enabled the beta version of GitHub Discussions for the spaghetti repo and opened a discussion where we can better get ideas and keep track of them. Can you post you notes and figures in there?
Anita Graser
@anitagraser
@jGaboardi thanks! Do you also want me to open a discussion concerning spatiotemporal patterns?
James Gaboardi
@jGaboardi
Sure!
Anita Graser
@anitagraser
That's an interesting new Github feature for sure