zhued / leaguestats

A system to find what what times during the week you play the most.
2 stars 0 forks source link

TSV endpoint for D3 #12

Closed ridler closed 9 years ago

ridler commented 9 years ago

I moved the template/parsing code to the server, and am returning that as a TSV to a D3 element in the client.

Issue: I still don't really understand how the parsing works for the "value" field, and the current code seems to always return 0, so I made the "value" random between 0 and 10 for now. If someone who understands the time/value parsing could look at and test frontend/server/timeParse.js that would be swell.

Otherwise, I think this branch may be ready to merge to master, maybe. :-)

joshfermin commented 9 years ago

@ridler Would it be easier if I created an endpoint on the express app that returns the formatted json to be used in the d3 map? And if so would you be able to turn that into a tsv on the client side or should I do that on the server side?

ridler commented 9 years ago

@joshfermin I actually got it working so that D3 pulls the actual values from the server. I was just not de-serializing the Mongo response before I fed it to your algorithm. Let me know what you think, and/or what to do next.

zhued commented 9 years ago

@ridler this is great! you are a god

zhued commented 9 years ago

:shipit::