mapLibreData = {
const dateParse = d3.timeParse("%s");
const dateFormat = d3.timeFormat("%I %p, %B %d, %Y");
return {
type: "FeatureCollection",
features: smellMyCityData.map(x => ({
type: "Feature",
geometry: {
type: "Point",
coordinates: [
x.longitude,
x.latitude
]
},
properties: {
description: x.smell_description,
timestamp: x.observed_at,
date: dateFormat(dateParse(x.observed_at)),
datetime: (new Date(x.observed_at * 1000)),
winddir: winds[(new Date(x.observed_at *1000)).toISOString().substring(0,10)]
}
}))
};
}