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

Can we run network kernel density estimation using spaghetti? #711

Closed
bright1993ff66 opened this issue Mar 27, 2023 · 4 comments
Closed
Assignees

Comments

@bright1993ff66
Copy link

Is your feature request related to a problem? Please describe.
I am working on one network kernel density estimation problem. The task is to estimate the road network density of motor vehicle collision records in New York.

Describe the solution you'd like
A convenient tool that can generate the network kernel density based on point features (such as collision records), network shapefile (e.g., road network), and the city border (a polygon)

Describe alternatives you've considered
I am using the network kernel density estimation tool in the R package spNetwork to complete this task. But a python class that can complete this task is preferable for Python users.

Additional context
Some reference:

  1. Kernel Density Estimation of traffic accidents in a network space
  2. Applying Network Kernel Density Estimation (NKDE) and Temporal Network Kernel Estimation (TNKDE) for Generating Safer Routes
@jGaboardi
Copy link
Member

Thanks for opening this @bright1993ff66. This is not currently possible within spaghetti. I seem to remember that @knaaptime was working with network KDE but I can't remember the package it was with.

PRs are always welcome!

@jGaboardi
Copy link
Member

Also, the modernization and update of spaghetti has been on my To Do list for some years now. Along with the Network KDE idea. Seeing as how I have had no bandwidth for implementing any of those ideas in the past 5 years, I highly doubt I will in the near or mid term future.

@knaaptime
Copy link
Member

the pysal segregation package uses what's essentially the 'simple method' described over in spnetwork, but there's actually not much more i could expose. Basically, you just need to do an aggregation query with pandana to get the total values at each $i$, then divide by the sum to get you into the [0,1] range.

To get the okabe-style measures, you'd need to roll your own, unfortunately

@bright1993ff66
Copy link
Author

Dear @jGaboardi and @knaaptime ,

Thank you for your help and suggestions about this topic! I will try the tools suggested by @knaaptime and see if I can work this out 🛩️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants