Skip to content

Instantly share code, notes, and snippets.

@katie7r
Created September 12, 2016 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save katie7r/e7237f873c158d3970238e4211401268 to your computer and use it in GitHub Desktop.
Save katie7r/e7237f873c158d3970238e4211401268 to your computer and use it in GitHub Desktop.
Flask-Bitmapist - `get_cohort` example
event1 = 'user:ordered_infomercial_product'
event2 = 'user:made_first_easy_payment'
additional_events = [
{'name': 'user:made_second_easy_payment', 'op': 'and'},
{'name': 'user:returned_product', 'op': 'or'}
]
cohort, cohort_dates, cohort_totals = get_cohort(event1, event2,
additional_events=additional_events,
time_group='months',
num_rows=6, num_cols=4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment