Open pstoica opened 10 years ago
(Or @vi-s can take this, whatevs.)
Event format where the month starts at 0, day starts at 1, and the types are decriminalized possession, legal medical cannabis, both medical and decriminalization laws, and legalized cannabis. I'm considering adding an 'other' type for minor non-legalization events so we have more data, but not sure yet.
{
new Date(year, month, day): [{
"state": "",
"type": "",
"description": ""
}, {
...
}]
}
maybe instead of keying by date, just have one sorted array and put the date as an attribute? honestly not sure which will be easier to incorporate yet, but it'll be easy to change anyway.
oh yeah. map.bubbles() takes in an array of objects so the date is an attribute now.
new event format:
{
date: new Date(2010, 0, 1),
state: 'NJ',
fillKey: type[1],
description: 'Jan. 11, 2010 - New Jersey Becomes 14th State to Legalize Medical Marijuana',
latitude: 39.367,
longitude: -74.751,
radius: 5
}
So instead of symbols, maybe we should use bubbles already built into DataMaps?
Check it: http://datamaps.github.io/
I originally made an
/events.json
endpoint, but since this is something that only needs to be loaded once, we can probably just put it directly inscripts.js
.