Public
Edited
May 1, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
file = FileAttachment("psm_events_may2023.csv")
Insert cell
raw = file.csv({array: true});
Insert cell
rows = raw.map(row => ({
date: new Date(row[0]).toISOString(),
user: row[1],
event: row[2],
error: parseInt(row[3], 10) || null
})).filter(row => !row.user.includes('@pleasesign.me') && row.user !== 'c.ydenberg@graphos.ca')
Insert cell
errorEvents = rows.filter(row => row.error)
Insert cell
users = rows.reduce((acc, row) => {
if (acc.includes(row.user)) {
return acc;
}
return [...acc, row.user];
}, []);
Insert cell
usersAuthenticated = users.filter(user => rows.find(row => row.user === user && row.event !== 'run'))
Insert cell
usersBeyond = users.filter(user => rows.find(row => row.user === user && row.event === 'create-slip'))
Insert cell
table = [
['', 'Gmail', 'Workspace', 'Total'],
['Users', users.filter(u => u.includes('@gmail.com')).length, users.filter(u => !u.includes('@gmail.com')).length, users.length],
['Authenticated', usersAuthenticated.filter(u => u.includes('@gmail.com')).length, usersAuthenticated.filter(u => !u.includes('@gmail.com')).length, usersAuthenticated.length],
['Send signing request', usersBeyond.filter(u => u.includes('@gmail.com')).length, usersBeyond.filter(u => !u.includes('@gmail.com')).length, usersBeyond.length]
];
Insert cell
workspaceSuccesses = usersBeyond.filter(u => !u.includes('@gmail.com'))
Insert cell
sentByExpandMentoring = rows.filter(row => row.user === 'hello@expandmentoring.com' && row.event === 'create-slip')
Insert cell
workspaceDropouts = usersAuthenticated.filter(u => !u.includes('@gmail.com') && !usersBeyond.includes(u))
Insert cell
workspaceSent = usersAuthenticated.filter(u => !u.includes('@gmail.com') && usersBeyond.includes(u))
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more