Time |
S |
Nick |
Message |
04:55 |
|
sivoais |
hehe, sorry I missed out on this fun! I should join that Gitter channel. Seems like a great place. |
12:07 |
|
pdurbin |
sivoais: well, I'm still curious what tool you'd use. It's not too late! :) |
12:08 |
|
pdurbin |
Yeah, that pandas channel provided a nice bite sized challenge yesterday. Usually I'm in there thinking, "I wonder if I should learn pandas." :) |
14:56 |
|
dotplus |
pdurbin: before reading the log beyond "how would you find the state ...?", I thought about it and came up with an SQL approach identical to yours. And an alternate approach using max() and a subselect instead of "desc limit 1" that I would use if we might also want to answer other similar questions (top10, bottom10, various averages, usw.) |
15:30 |
|
pdurbin |
dotplus: ok, so you'd use SQL as well |
15:34 |
|
dotplus |
with my existing knowledge, I'd find that quickest, easiest for the specfic question. If I wanted to run with it and be easily extensible to answering other questions, perhaps not. |
15:35 |
|
pdurbin |
yeah, me too |
15:35 |
|
pdurbin |
but R is good for this stuff too |
15:38 |
|
* dotplus |
can't even spell R |
16:49 |
|
semiosis |
pdurbin: for a quick analysis of a csv file, honestly, i would write a throwaway php script. i would iterate over the lines and increment a value in an associative array keyed by state. |
16:50 |
|
semiosis |
then dump the resulting array |
17:10 |
|
pdurbin |
interesting. I'm sure that would work fine. |
17:10 |
|
pdurbin |
semiosis: would the script run from the command line or a browser? |
17:13 |
|
semiosis |
command line |
17:18 |
|
sivoais |
pdurbin: I'll give it a try in R |
17:21 |
|
pdurbin |
semiosis: cool |
17:21 |
|
pdurbin |
sivoais: thanks, I'm lost in R again |
17:59 |
|
sivoais |
pdurbin: not golfed, but uses magrittr to make it easier to read <https://gist.github.com/zmughal/1c2a4e0ff4502b32135b4b82760a4b25> |
18:35 |
|
pdurbin |
huh, "A Forward-Pipe Operator for R" https://cran.r-project.org/web/packages/magrittr/ |
18:35 |
|
pdurbin |
sivoais: thanks! |