Two Bites of Data Science in K
blog.zdsmith.com
Two Bites of Data Science in K
1–10 of 11 posts
Re: Two Bites of Data Science in K
#2Re: Two Bites of Data Science in K
#3op, which version of k are you using in the post? for those who'd like to follow along
Re: Two Bites of Data Science in K
#4Re: Two Bites of Data Science in K
#5 t:readcsv[read["ICC Test Bowl 3003.csv"] "ssiiiiisffiiis"]
sorted: select orderby Wkts desc orderby Ave asc where Wkts from t
best: select where !gindex by Wkts from sorted
bestInClass: select where each v i in Ave v~min (i+1) take Ave end from best
allWkts: sorted.Wkts
mostCompetitive: extract where (gindex=0)&15
"bestInClass" is probably the most awkward adaptation; I didn't see a tidy way to make a suffix list like ",\".Re: Two Bites of Data Science in K
#6I had a go at rewriting the latter half in Lil, flexing its K/Q heritage: t:readcsv[read["ICC Test Bowl 3003.csv"] "ssiiiiisffiiis"] sorted: select orderby Wkts desc orderby Ave asc where Wkts from t best: select where !gindex by Wkts from sorted bestInClass: select where each v i in Ave v~min (i+1) take Ave end from best allWkts: sorted.Wkts mostCompetitive: extract where (gindex=0)&15 "bestInClass" is probably the…
Re: Two Bites of Data Science in K
#7I had a go at rewriting the latter half in Lil, flexing its K/Q heritage: t:readcsv[read["ICC Test Bowl 3003.csv"] "ssiiiiisffiiis"] sorted: select orderby Wkts desc orderby Ave asc where Wkts from t best: select where !gindex by Wkts from sorted bestInClass: select where each v i in Ave v~min (i+1) take Ave end from best allWkts: sorted.Wkts mostCompetitive: extract where (gindex=0)&15 "bestInClass" is probably the…
is there a website or similar for this language? couldn't find anything with a quick google
Re: Two Bites of Data Science in K
#8I had a go at rewriting the latter half in Lil, flexing its K/Q heritage: t:readcsv[read["ICC Test Bowl 3003.csv"] "ssiiiiisffiiis"] sorted: select orderby Wkts desc orderby Ave asc where Wkts from t best: select where !gindex by Wkts from sorted bestInClass: select where each v i in Ave v~min (i+1) take Ave end from best allWkts: sorted.Wkts mostCompetitive: extract where (gindex=0)&15 "bestInClass" is probably the…
is there a website or similar for this language? couldn't find anything with a quick google
See also https://beyondloom.com/blog/rankingoffruits.html for a nice introduction to the query syntax and its relation to K. (And RodgerTheGreat is John Earnest, the author).
Re: Two Bites of Data Science in K
#9Re: Two Bites of Data Science in K
#10In any event these languages are great for exploring data in projects like these.