gboeing / ppde642

USC urban data science course series with Python and Jupyter
https://geoffboeing.com
MIT License
1.26k stars 487 forks source link

Attribute Error #4

Closed jrojasquiroz closed 6 years ago

jrojasquiroz commented 6 years ago

Dear @gboeing , in this notebook (https://github.com/gboeing/urban-data-science/blob/59afcff905649c5f8d1f8256ec37f28496e0c740/20-Accessibility-Walkability/pandana-accessibility-demo-full.ipynb), when i copy the line In [7], occur this: AttributeError Traceback (most recent call last)

in () 10 11 # identify nodes that are connected to fewer than some threshold of other nodes within a given distance ---> 12 lcn = network.low_connectivity_nodes(impedance=1000, count=10, imp_name='distance') 13 network.save_hdf5(net_filename, rm_nodes=lcn) #remove low-connectivity nodes and save to h5 14 AttributeError: 'tuple' object has no attribute 'low_connectivity_nodes' Do you know how I could solve it?
mfalcon commented 6 years ago

Hi, please check if your pandana version is 0.2. I installed it today with pip and the default version is 0.4, which produces the error you've described.

gboeing commented 6 years ago

@mfalcon @jrojasquiroz yes, note the comment at the top of the notebook:

This notebook uses pandana (v0.2)...

Make sure you run it with pandana 0.2. I will update the code for 0.4 compatibility when time permits, but in the meantime, feel free to issue a PR if you want to update the notebook yourself!

jrojasquiroz commented 6 years ago

Thanks!