{"action":"opened","issue":{"url":"https://api.github.com/repos/mapbox/speed-percentile/issues/1","repository_url":"https://api.github.com/repos/mapbox/speed-percentile","labels_url":"https://api.github.com/repos/mapbox/speed-percentile/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/speed-percentile/issues/1/comments","events_url":"https://api.github.com/repos/mapbox/speed-percentile/issues/1/events","html_url":"https://github.com/mapbox/speed-percentile/issues/1","id":159073536,"number":1,"title":"Computing speed percentile from daily increment histograms","user":{"login":"lily-chai","id":19580351,"avatar_url":"https://avatars.githubusercontent.com/u/19580351?v=3","gravatar_id":"","url":"https://api.github.com/users/lily-chai","html_url":"https://github.com/lily-chai","followers_url":"https://api.github.com/users/lily-chai/followers","following_url":"https://api.github.com/users/lily-chai/following{/other_user}","gists_url":"https://api.github.com/users/lily-chai/gists{/gist_id}","starred_url":"https://api.github.com/users/lily-chai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lily-chai/subscriptions","organizations_url":"https://api.github.com/users/lily-chai/orgs","repos_url":"https://api.github.com/users/lily-chai/repos","events_url":"https://api.github.com/users/lily-chai/events{/privacy}","received_events_url":"https://api.github.com/users/lily-chai/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mapbox/speed-percentile/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-08T03:52:40Z","updated_at":"2016-06-08T03:52:40Z","closed_at":null,"body":"## Goal\r\n\r\nOn a given day, for each edge, compute the *p*-th percentile speed for this edge from past *N* days' worth of daily speed histogram.\r\n\r\nThis script is the daily aggregates script for [nextgen speedracer](https://github.com/mapbox/speedracer/issues/74) (scroll down to **Fixes?** -> **Daily aggregates**).\r\n\r\n## Input Data\r\n\r\nIncrement JSON files outputted by speedracer.<br>\r\nExample:\r\n```\r\n{\"a\":65285808,\"b\":1260360887,\"increments\":{\"27\":1,\"28\":1,\"29\":1,\"30\":1,\"34\":1,\"35\":1,\"36\":1,\"37\":4,\"38\":2,\"40\":1,\"42\":1,\"47\":1,\"51\":1,\"56\":1,\"58\":1,\"59\":2,\"60\":1}}\r\n{\"a\":1260360887,\"b\":1260360824,\"increments\":{\"26\":1,\"28\":1,\"29\":1,\"30\":1,\"34\":2,\"35\":1,\"37\":1,\"38\":2,\"39\":2,\"40\":1,\"41\":1,\"50\":1,\"51\":1,\"59\":2,\"60\":1,\"63\":1}}\r\n{\"a\":1260360824,\"b\":1260360924,\"increments\":{\"14\":1,\"21\":1,\"26\":1,\"29\":1,\"34\":1,\"35\":1,\"37\":2,\"38\":2,\"39\":2,\"40\":1,\"41\":2,\"43\":1,\"44\":1,\"45\":1,\"46\":1,\"50\":1,\"52\":1,\"59\":1,\"60\":1,\"63\":1,\"69\":1}}\r\n{\"a\":1260360924,\"b\":1260360819,\"increments\":{\"10\":1,\"14\":1,\"21\":1,\"26\":1,\"34\":1,\"35\":1,\"37\":2,\"38\":2,\"39\":2,\"40\":1,\"41\":3,\"42\":1,\"43\":2,\"44\":1,\"46\":1,\"50\":1,\"52\":1,\"60\":1,\"63\":1,\"69\":2,\"138\":1}}\r\n```\r\n`increments` = histogram of speeds observed on that one day.\r\n\r\n\r\n## Output\r\n\r\nCSV files of the *p*-th percentile speed for each edge.<br>\r\nSchema:\r\n\r\n| column | description |\r\n|:--:|:--:|\r\n| nodeA | starting node ID |\r\n| nodeB | ending node ID |\r\n| speed | *p*-th percentile speed [kph] |\r\n\r\n\r\n## To-Do\r\n\r\n* [ ] aggregate increment histograms from the past *N* days\r\n    * [ ] for a single JSON file: parse histogram\r\n        * [ ] confirm with @morganherlocker: histograms from speedracer are in buckets of 1 kph\r\n    * [ ] wrap in a loop that enumerates through *N* days of increment data\r\n\r\n* [ ] compute percentiles\r\n    * [ ] for a single edge: compute the *p*-th percentile\r\n    * [ ] wrap in a loop that enumerates through all edges\r\n\r\n* [ ] write out profile CSV\r\n\r\n\r\n<br>\r\n/cc: @morganherlocker \r\n"}}
{"actor":{"display_login":"lily-chai"}}