
Hi, I have some data and I need help finding the right data structure to display it. My goal is to have a map similar to the image above. Different physical objects will have information about latitude and longitude, but the circular radius will be determined by different statistics on each site. The user will be able to choose which data set they would like to see. Approximately 26 datasets. Only one set of places.
My data is as follows:
Locations (approximately 5000 pieces)
var locSchema = mongoose.Schema({
name : 'string',
siteID : 'number',
address1 : 'string',
address2 : 'string',
loc: {type: [Number], index: '2dsphere'}
});
Specific data (approximately 12,000 pieces)
var dataSchema = mongoose.Schema({
providerNumber : "number",
date : "date",
volume : "number",
cost : "number",
label : "string",
siteID : "oid"
});
My first assumption was that they should be a single collection with each piece of data stored as an array:
name : 'string',
siteID : 'number',
address1 : 'string',
address2 : 'string',
loc: {type: [Number], index: '2dsphere'},
data : [
{
providerNumber : "number",
date : "date",
volume : "number",
cost : "number",
label : "string",
siteID : "oid"
},
...
]
, Mongoose, . , , , .
, :
1. ?
2. Mongoose?
3. - ?