in reply to Data structure advice

What's the best data structure to use to store this data?
That depends on your definition of "best", the amount of data, the number of queries, and the precision of your data and query data.

Two possibilities:

Abigail