I have a road network shapefile.
After creating Network dataset I get a graph with vertices and edges. I need to create a tool for ArcGIS (through a Python code) which enables to calculate depth of all vertices in a network according to the formula:
Number of neighbours one step away multiplied by number of steps + neighbours two step away multiplied by number of steps + three steps away...
For example see image: red point on the picture has 3 neighbours one step away, 2 neighbour 2 steps away. So the depth for the red point will be: 3x1+2x2=7.
I need to calculate this for all vertices in my network. It's quite easy but unfortunately I don't have any experience with Python.