@@ -0,0 +1,644 @@
+from traildb import TrailDB, tdb_item_val%0Afrom collections import Counter%0Aimport timeit%0A%0Adef string_top():%0A    tdb = TrailDB('pydata-tutorial')%0A    return Counter(event.title for uuid, trail in tdb.trails()%0A                               for event in trail).most_common(5)%0A%0Adef item_top():%0A    tdb = TrailDB('pydata-tutorial')%0A    stats = Counter(event.title for uuid, trail in tdb.trails(rawitems=True)%0A                                for event in trail)%0A    return %5B(tdb.get_item_value(item), f) for item, f in stats.most_common(5)%5D%0A%0Aprint 'string_top', timeit.timeit(string_top, number=3)%0Aprint 'item_top', timeit.timeit(item_top, number=3)%0A

add examples/top_items.py