- What is data?
- What is a database?
- Hands-on examples
- JSON and Map/Reduce
- sqlite3
- R with rsql
- Conclusion
November 3, 2016
Quia non suppetunt dictis data.
Because his gifts do not match his words.
— Plautus, Asinaria 56 (c. 254 BCE – 184 BCE)
Load a JSON file
get_json("/assets/ghimpact-b3.json"); // wait
View the usernames
Object.keys(df);
df["mattn"]["s"]; // Array.proto.map, Array.proto.reduce // the scores come from the data frame keys using this map function var scores = Object.keys(df).map( function(key) { return( df[key]["s"] ) } ); var average = scores.reduce( function(sum, val) { return( sum + val ) }, initialValue=0 ) / scores.length; Math.max.apply(Math, scores);
Mean (average), expressed as a mathematical function:
\(\mu = \frac{1}{n}\displaystyle\sum_{i=1}^{n} x_i\)
MapReduce Equivalent: