on 514b5fc help sign in
urbit.org/content/grants/analytics-script.md
54 lines 2.2 kB history raw
1+++
2title = "Analytics Script"
3date = "2021-05-11"
5[taxonomies]
6grant_type = [ "Bounty" ]
7grant_category = [ "App Dev" ]
9[extra]
10image = ""
11description = "Write a generator that exports chat data into a CSV."
12reward = "1 star"
13assignee = "~hosted-fornet"
14completed = true
15canceled = false
16work_request_link = "https://airtable.com/shr4qt9t9kz7RaOIa?prefill_Grant+ID=B0015&prefill_Grant+Name=Analytics%20Script"
17+++
19## Overview
21In order to understand the growth of the network, it's important that we be able to measure the amount of activity within groups at any given point. Your task is to build an open-source script (a [generator](https://urbit.org/docs/tutorials/hoon/hoon-school/generators/)) that exports group activity into a format that can be analyzed.
23## Implementation
25The generator will read data from `graph-store` (and other requisite agents) and extract it into a CSV file.
27### Output
29The output of the generator is a CSV file with the following format: `timestamp,ship,group,channel,channel-type,content`. Each row of data represents a single post of some type; either a chat message, notebook post, or collection post.
31The result of running the CSV should output the clay path to the file.
33### Inputs
35The generator should accept a few parameters:
37- `path` (required): path to write the CSV to.
38- `from` (required): absolute date (`@da`) from which data should be pulled.
39- `to` (optional): absolute date (`@da`) up until which point data should be pulled. Default is the current time.
40- `groups` (optional): list of groups to read data from. Default is to pull data from all groups that the running ship is a member of.
41- `content` (optional): boolean of whether or not to include content in the CSV. Defaults to `false`.
43## Requirements & Resources
45- The Urbit Foundation will connect you with Tlon engineers for 1:1 support, should you need it
46- Code should be submitted as a pull request against https://github.com/urbit/urbit
47- The generator shall be called `crunch` (we're open to better ideas)
49## Milestones
51### Work is complete
531 stars
54The generator is submitted as a pull request to the Urbit repository, reviewed, and merged.