pstoica / pow-viz

MIT License
2 stars 1 forks source link

Make JSON data for events #1

Open pstoica opened 10 years ago

pstoica commented 10 years ago

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 in scripts.js.

pstoica commented 10 years ago

(Or @vi-s can take this, whatevs.)

camreon commented 10 years ago

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": ""
  }, {
    ... 
  }]
}
pstoica commented 10 years ago

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.

camreon commented 10 years ago

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
}