MobilityNet / mobilitynet.github.io

BSD 3-Clause "New" or "Revised" License
0 stars 3 forks source link

Evaluate_power_vs_trip_start_end_analysed_master breaks #17

Open singhish opened 3 years ago

singhish commented 3 years ago

The above notebook breaks at

importlib.reload(eapv)

with the error:

NameError                                 Traceback (most recent call last)
<ipython-input-15-4bb5e430e88d> in <module>
----> 1 importlib.reload(eapv)

NameError: name 'eapv' is not defined
shankari commented 3 years ago

true dat.

Seeing where eapv is used

    "av_la = eapv.create_analysed_view(pv_la, \"http://localhost:8080\", \"analysis/recreated_location\", \"analysis/cleaned_trip\", \"analysis/cleaned_section\")\n",
    "av_sj = eapv.create_analysed_view(pv_sj, \"http://localhost:8080\", \"analysis/recreated_location\", \"analysis/cleaned_trip\", \"analysis/cleaned_section\")\n",
    "av_ucb = eapv.create_analysed_view(pv_ucb, \"http://localhost:8080\", \"analysis/recreated_location\", \"analysis/cleaned_trip\", \"analysis/cleaned_section\")\n",

and searching for it finds

$ grep -r create_analysed_view emeval/
emeval//analysed/phone_view.py:def create_analysed_view(input_view, analysis_datastore, location_key, trip_key, section_key):

So the fix is to import emeval.analysed.phone_view as eapv at the top.

Having said that, the notebook will not work unless you have run the analysis pipeline on the local e-mission-server, since it expects to load analysis results.