I don’t really know any coding apologies in advance, but I work with spatial data. This assignment might be above my head.
Working with 3 datasets:
- A California severe traffic incidents database (TIMS from UC Berkeley).
- Another dataset of risk events based on car accidents hitting company assets.
- 3rd dataset of company assets subject to the risk events.
All datasets have Lat/Long in decimal degrees.
I have 3 main tasks:
Find # of TIMS data points that are within 1/4 mile (or D distance) from other TIMS data points. “TIMS event #1 has 5 other TIMS events within 1/4 mile.”
Find # of TIMS data points that are within 1/4 mile (or D distance) from risk event data points. “Risk event #2 has 7 TIMS events within 1/4 mile.”
Find # of TIMS data points within 1/4 mile (or D distance) of company assets. “Asset # 123456 has 2 risk events within 1/4 mile.”
The goal here is a simple # score.
I have access to ESRI mapping products, but have been asked to perform all the above tasks in the Palantir Foundry environment which is going to need either Python, SQL or R.
Find all nearest neighbors within a specific distance This article maybe answers my question but I am unsure if there is a more simple solution or a more clear answer. https://caam37830.github.io/book/08_geometry/nearestneighbor.html This 2nd link seems like it may be more helpful but an expert opinion from someone who knows what they’re doing would be appreciated.
My guess here is that the same/similar code can be run 3 times.