pysal / momepy

Urban Morphology Measuring Toolkit
https://docs.momepy.org
BSD 3-Clause "New" or "Revised" License
496 stars 59 forks source link

functional reached calculations #575

Closed u3ks closed 6 months ago

u3ks commented 7 months ago

a new functional version of the mm.Reached function. It calculates several statistics at once similar to mm.describe(

u3ks commented 7 months ago

Timings:

  1. count without spatial weights

    • old: 24.5 ms ± 216 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
    • new: 15.4 ms ± 368 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
  2. count with spatial weights

    • old: 2.59 s ± 33.4 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
    • new: 322 ms ± 6.73 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
  3. statistics with spatial weights: -old: 1min ± 601 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) -new: 322 ms ± 6.73 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

codecov[bot] commented 7 months ago

Codecov Report

Attention: Patch coverage is 98.88889% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 97.8%. Comparing base (4037c70) to head (e21ca5e). Report is 20 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/pysal/momepy/pull/575/graphs/tree.svg?width=650&height=150&src=pr&token=VNn0WR5JWT&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal)](https://app.codecov.io/gh/pysal/momepy/pull/575?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal) ```diff @@ Coverage Diff @@ ## main #575 +/- ## ======================================= + Coverage 97.4% 97.8% +0.4% ======================================= Files 26 37 +11 Lines 4328 5299 +971 ======================================= + Hits 4214 5183 +969 - Misses 114 116 +2 ``` | [Files](https://app.codecov.io/gh/pysal/momepy/pull/575?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal) | Coverage Δ | | |---|---|---| | [momepy/functional/tests/conftest.py](https://app.codecov.io/gh/pysal/momepy/pull/575?src=pr&el=tree&filepath=momepy%2Ffunctional%2Ftests%2Fconftest.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal#diff-bW9tZXB5L2Z1bmN0aW9uYWwvdGVzdHMvY29uZnRlc3QucHk=) | `100.0% <ø> (ø)` | | | [momepy/functional/tests/test\_diversity.py](https://app.codecov.io/gh/pysal/momepy/pull/575?src=pr&el=tree&filepath=momepy%2Ffunctional%2Ftests%2Ftest_diversity.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal#diff-bW9tZXB5L2Z1bmN0aW9uYWwvdGVzdHMvdGVzdF9kaXZlcnNpdHkucHk=) | `100.0% <100.0%> (ø)` | | | [momepy/functional/\_diversity.py](https://app.codecov.io/gh/pysal/momepy/pull/575?src=pr&el=tree&filepath=momepy%2Ffunctional%2F_diversity.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal#diff-bW9tZXB5L2Z1bmN0aW9uYWwvX2RpdmVyc2l0eS5weQ==) | `97.8% <97.6%> (ø)` | | ... and [13 files with indirect coverage changes](https://app.codecov.io/gh/pysal/momepy/pull/575/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal)