ADI-Labs / density

wireless density API
13 stars 26 forks source link

Refactored to decrease database calls/DataFrame accesses #210

Closed alexander-yu closed 8 years ago

alexander-yu commented 8 years ago

Instead of calling to the database for every floor, only an initial call is needed. Moreover, DataFrame accesses are also decreased; instead of calling .groupby() on an entire DataFrame for every location, it is only called on the particular series for that floor.

Execution time decreased from ~6s to ~1s.

modified:   density/data/__init__.py
modified:   density/density.py