Associating the crime incidents with various geographic regions can be
computationally expensive, especially in trying to satisfy queries
quickly. Several types of regions are going to be especially useful
towards integrating crime data with other data sources:
exhaustively querying all crime incidents to see the region in
which it falls
caching this result as a new attribute of the crime incident
the views.add_zip() function shows how to do this. (but note that this code does NOT include the update efficiency, it uses an incremental save()).
One issue is that the currently provisioned OakCrime server is not set
up to allow long-term, memory-intensive processes like these, and so
the new geo feature needs to be computed elsewhere and then added as a
column (via postgres update).
Associating the crime incidents with various geographic regions can be computationally expensive, especially in trying to satisfy queries quickly. Several types of regions are going to be especially useful towards integrating crime data with other data sources:
For every kind of data, the process involves:
the
views.add_zip()
function shows how to do this. (but note that this code does NOT include theupdate
efficiency, it uses an incrementalsave()
).One issue is that the currently provisioned OakCrime server is not set up to allow long-term, memory-intensive processes like these, and so the new geo feature needs to be computed elsewhere and then added as a column (via postgres
update
).