Published
Edited
Jul 15, 2020
1 fork
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
visitors[1].landing_page_urls[1]
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
failed_sales_cond = both(redirected_cond, xs => xs.events.some(x => x === 'failedsale'))
Insert cell
Insert cell
redirected_cond = both(passed_cond, xs => xs.events.some(x => x === 'redirect') )
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
rockman_ids = R.pipe(
!selected_campaign ? x => x : R.filter(x => x.bc === selected_campaign)
)(raw_data)
Insert cell
Insert cell
R.uniq(visitors.map(v => v.bc))
Insert cell
visitors = R.map(d =>
R.merge({
date: d.timestamp.toJSON().split('T')[0]
, ip: `${d.ip3}.0`
, should_have_been_excluded: is_in_excluded_ips_from_adwords(`${d.ip3}.0`).length > 0
, cloaked: cloaked_cond(d)
, passed: passed_cond(d)
, he_failed: he_failed_cond(d)
, redirected: redirected_cond(d)
, failed_sale: failed_sales_cond(d)
, lost_after_redirection: lost_after_redirection_cond(d)
, subscribed: subscribed_cond(d)
, failed_sale_reason: d.system_message
, system_message: d.system_message
, revisit_count: (re_visitors_by_msisdn.get(d.msisdn) || 1) - 1
}, d)
)(rockman_ids)
Insert cell
html`<textarea style="width: 100%; font-size: 1em" rows="7">${R.last(visitors.filter(v => /cancel/i.test( v.system_message))).landing_page_urls[1]}</textarea>`
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more