GeoDaCenter / GeoDaCenter/spatial_access

AccessTime / AccessCount / AccessSum models don't work with calculate()

Open
#89 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
40
Forks
11
PR merge metrics
No merged PRs in 30d

Description

When running `accessT.calculate()` in the demo notebook I get the following IndexError and cannot continue further:

```
IndexError Traceback (most recent call last)
in ()
----> 1 accessT.calculate()

~/Desktop/spatial_access/spatial_access/Models.py in calculate(self)
314 results[source_id] = []
315 for category in focus_categories_list:
--> 316 time_to_nearest_neighbor = self.time_to_nearest_dest(source_id, category)
317 results[source_id].append(time_to_nearest_neighbor)
318

~/Desktop/spatial_access/spatial_access/BaseModel.py in time_to_nearest_dest(self, source_id, category)
503 return self.transit_matrix.matrix_interface.time_to_nearest_dest(source_id, None)
504 else:
--> 505 return self.transit_matrix.matrix_interface.time_to_nearest_dest(source_id, category)
506
507 def count_dests_in_range_by_categories(self, source_id, category, upper_threshold):

~/Desktop/spatial_access/spatial_access/MatrixInterface.py in time_to_nearest_dest(self, source_id, category)
425 else:
426 return self.transit_matrix.timeToNearestDestPerCategory(self._parser.encode_source_id(source_id),
--> 427 self._parser.encode_category(category))
428
429 def count_dests_in_range(self, source_id, threshold, category=None):

~/Desktop/spatial_access/spatial_access/src/_p2pExtension.pyx in _p2pExtension.pyTransitMatrixIxSxUS.timeToNearestDestPerCategory()
379
380 def timeToNearestDestPerCategory(self, source_id, category):
--> 381 return self.thisptr.timeToNearestDestPerCategory(source_id, category)
382
383 def countDestsInRangePerCategory(self, source_id, category, range):

**IndexError: unordered_map::at: key not found**
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.