make-mp-data 3.0.2 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dungeons/adspend.js +13 -26
- package/dungeons/anon.js +1 -1
- package/dungeons/array-of-object-lookup.js +1 -2
- package/dungeons/benchmark-heavy.js +5 -6
- package/dungeons/benchmark-light.js +13 -28
- package/dungeons/big.js +3 -3
- package/dungeons/business.js +11 -12
- package/dungeons/complex.js +1 -2
- package/dungeons/copilot.js +8 -6
- package/dungeons/education.js +21 -22
- package/dungeons/experiments.js +4 -5
- package/dungeons/fintech.js +25 -26
- package/dungeons/foobar.js +1 -1
- package/dungeons/food.js +24 -25
- package/dungeons/funnels.js +2 -2
- package/dungeons/gaming.js +39 -40
- package/dungeons/media.js +30 -31
- package/dungeons/mil.js +17 -18
- package/dungeons/mirror.js +2 -3
- package/dungeons/retention-cadence.js +1 -2
- package/dungeons/rpg.js +42 -43
- package/dungeons/sanity.js +1 -2
- package/dungeons/sass.js +32 -33
- package/dungeons/scd.js +3 -4
- package/dungeons/simple.js +13 -14
- package/dungeons/social.js +27 -28
- package/dungeons/soup-test.js +52 -0
- package/dungeons/streaming.js +17 -18
- package/dungeons/student-teacher.js +0 -1
- package/dungeons/text-generation.js +0 -1
- package/dungeons/user-agent.js +1 -2
- package/index.js +18 -6
- package/lib/core/config-validator.js +22 -33
- package/lib/core/context.js +6 -3
- package/lib/generators/events.js +13 -10
- package/lib/generators/funnels.js +7 -4
- package/lib/generators/scd.js +29 -17
- package/lib/generators/text.js +18 -12
- package/lib/orchestrators/mixpanel-sender.js +26 -38
- package/lib/orchestrators/user-loop.js +68 -15
- package/lib/templates/phrases.js +8 -5
- package/lib/utils/function-registry.js +17 -0
- package/lib/utils/utils.js +15 -84
- package/package.json +3 -1
- package/types.d.ts +86 -19
- package/lib/templates/verbose-schema.js +0 -272
- package/lib/utils/chart.js +0 -210
package/dungeons/adspend.js
CHANGED
|
@@ -14,7 +14,7 @@ import dayjs from "dayjs";
|
|
|
14
14
|
import utc from "dayjs/plugin/utc.js";
|
|
15
15
|
dayjs.extend(utc);
|
|
16
16
|
import { uid, comma } from 'ak-tools';
|
|
17
|
-
import {
|
|
17
|
+
import { weighNumRange, date, integer } from "../lib/utils/utils.js";
|
|
18
18
|
|
|
19
19
|
/** @type {import('../types').Dungeon} */
|
|
20
20
|
const config = {
|
|
@@ -31,50 +31,38 @@ const config = {
|
|
|
31
31
|
events: [
|
|
32
32
|
{
|
|
33
33
|
event: "foo",
|
|
34
|
-
weight: 10,
|
|
35
|
-
},
|
|
34
|
+
weight: 10 },
|
|
36
35
|
{
|
|
37
36
|
event: "bar",
|
|
38
|
-
weight: 9,
|
|
39
|
-
},
|
|
37
|
+
weight: 9 },
|
|
40
38
|
{
|
|
41
39
|
event: "baz",
|
|
42
|
-
weight: 8,
|
|
43
|
-
},
|
|
40
|
+
weight: 8 },
|
|
44
41
|
{
|
|
45
42
|
event: "qux",
|
|
46
|
-
weight: 7,
|
|
47
|
-
},
|
|
43
|
+
weight: 7 },
|
|
48
44
|
{
|
|
49
45
|
event: "garply",
|
|
50
|
-
weight: 6,
|
|
51
|
-
},
|
|
46
|
+
weight: 6 },
|
|
52
47
|
{
|
|
53
48
|
event: "durtle",
|
|
54
|
-
weight: 5,
|
|
55
|
-
},
|
|
49
|
+
weight: 5 },
|
|
56
50
|
{
|
|
57
51
|
event: "linny",
|
|
58
|
-
weight: 4,
|
|
59
|
-
},
|
|
52
|
+
weight: 4 },
|
|
60
53
|
{
|
|
61
54
|
event: "fonk",
|
|
62
|
-
weight: 3,
|
|
63
|
-
},
|
|
55
|
+
weight: 3 },
|
|
64
56
|
{
|
|
65
57
|
event: "crumn",
|
|
66
|
-
weight: 2,
|
|
67
|
-
},
|
|
58
|
+
weight: 2 },
|
|
68
59
|
{
|
|
69
60
|
event: "yak",
|
|
70
|
-
weight: 1
|
|
71
|
-
}
|
|
61
|
+
weight: 1 }
|
|
72
62
|
],
|
|
73
63
|
superProps: {
|
|
74
64
|
color: ["red", "orange", "yellow", "green", "blue", "indigo", "violet"],
|
|
75
|
-
number: integer,
|
|
76
|
-
|
|
77
|
-
},
|
|
65
|
+
number: integer },
|
|
78
66
|
userProps: {
|
|
79
67
|
title: chance.profession.bind(chance),
|
|
80
68
|
luckyNumber: weighNumRange(42, 420),
|
|
@@ -115,8 +103,7 @@ const config = {
|
|
|
115
103
|
time: lastEvent.time,
|
|
116
104
|
user_id: lastEvent.user_id,
|
|
117
105
|
milestone: record.length,
|
|
118
|
-
color: "gold"
|
|
119
|
-
});
|
|
106
|
+
color: "gold" });
|
|
120
107
|
}
|
|
121
108
|
return record;
|
|
122
109
|
}
|
package/dungeons/anon.js
CHANGED
|
@@ -14,7 +14,7 @@ import dayjs from "dayjs";
|
|
|
14
14
|
import utc from "dayjs/plugin/utc.js";
|
|
15
15
|
dayjs.extend(utc);
|
|
16
16
|
import { uid, comma } from 'ak-tools';
|
|
17
|
-
import {
|
|
17
|
+
import { weighNumRange, date, integer } from "../lib/utils/utils.js";
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
@@ -30,7 +30,6 @@ const config = {
|
|
|
30
30
|
hasAnonIds: true, //if true, anonymousIds are created for each user
|
|
31
31
|
hasSessionIds: true, //if true, hasSessionIds are created for each user
|
|
32
32
|
hasAdSpend: false,
|
|
33
|
-
makeChart: false,
|
|
34
33
|
hasLocation: true,
|
|
35
34
|
hasAndroidDevices: false,
|
|
36
35
|
hasIOSDevices: false,
|
|
@@ -47,7 +46,7 @@ const config = {
|
|
|
47
46
|
event: "checkout",
|
|
48
47
|
weight: 2,
|
|
49
48
|
properties: {
|
|
50
|
-
currency:
|
|
49
|
+
currency: ["USD", "CAD", "EUR", "BTC", "ETH", "JPY"],
|
|
51
50
|
coupon: weighChoices(["none", "none", "none", "none", "10%OFF", "20%OFF", "10%OFF", "20%OFF", "30%OFF", "40%OFF", "50%OFF"]),
|
|
52
51
|
cart: makeProducts()
|
|
53
52
|
}
|
|
@@ -27,12 +27,12 @@ function buildListOfFeatures() {
|
|
|
27
27
|
// object use case
|
|
28
28
|
function buildLocalConfig() {
|
|
29
29
|
const allPossibleConfigs = {
|
|
30
|
-
"theme":
|
|
31
|
-
"notifications":
|
|
30
|
+
"theme": ["light", "dark", "custom"],
|
|
31
|
+
"notifications": ["all", "mentions", "none"],
|
|
32
32
|
"itemsPerPage": pickAWinner([10, 25, 50, 100]),
|
|
33
|
-
"language":
|
|
34
|
-
"timezone":
|
|
35
|
-
"privacyLevel":
|
|
33
|
+
"language": ["en", "es", "fr", "de", "zh", "jp", "ru"],
|
|
34
|
+
"timezone": ["UTC", "PST", "EST", "CST", "MST", "GMT", "CET", "IST", "JST", "AEST"],
|
|
35
|
+
"privacyLevel": ["public", "friends only", "private"],
|
|
36
36
|
"dataSharing": [true, false],
|
|
37
37
|
"autoSave": [true, false],
|
|
38
38
|
"fontSize": ["small", "medium", "large"],
|
|
@@ -120,7 +120,6 @@ const config = {
|
|
|
120
120
|
hasAnonIds: true, //if true, anonymousIds are created for each user
|
|
121
121
|
hasSessionIds: true, //if true, hasSessionIds are created for each user
|
|
122
122
|
hasAdSpend: false,
|
|
123
|
-
makeChart: false,
|
|
124
123
|
hasLocation: true,
|
|
125
124
|
hasAndroidDevices: true,
|
|
126
125
|
hasIOSDevices: true,
|
|
@@ -13,7 +13,7 @@ import dayjs from "dayjs";
|
|
|
13
13
|
import utc from "dayjs/plugin/utc.js";
|
|
14
14
|
dayjs.extend(utc);
|
|
15
15
|
import { uid, comma } from 'ak-tools';
|
|
16
|
-
import {
|
|
16
|
+
import { weighNumRange, date, integer, weighChoices } from "../lib/utils/utils.js";
|
|
17
17
|
import { createTextGenerator } from '../lib/generators/text.js';
|
|
18
18
|
|
|
19
19
|
/** @type {import('../types.js').Dungeon} */
|
|
@@ -31,7 +31,6 @@ const config = {
|
|
|
31
31
|
hasAnonIds: false, //if true, anonymousIds are created for each user
|
|
32
32
|
hasSessionIds: false, //if true, hasSessionIds are created for each user
|
|
33
33
|
hasAdSpend: false,
|
|
34
|
-
makeChart: false,
|
|
35
34
|
hasLocation: false,
|
|
36
35
|
hasAndroidDevices: false,
|
|
37
36
|
hasIOSDevices: false,
|
|
@@ -47,50 +46,37 @@ const config = {
|
|
|
47
46
|
events: [
|
|
48
47
|
{
|
|
49
48
|
event: "Page View",
|
|
50
|
-
weight: 50,
|
|
51
|
-
|
|
52
|
-
},
|
|
49
|
+
weight: 50 },
|
|
53
50
|
{
|
|
54
51
|
event: "Product View",
|
|
55
|
-
weight: 30,
|
|
56
|
-
},
|
|
52
|
+
weight: 30 },
|
|
57
53
|
{
|
|
58
54
|
event: "Add to Cart",
|
|
59
|
-
weight: 10,
|
|
60
|
-
},
|
|
55
|
+
weight: 10 },
|
|
61
56
|
{
|
|
62
57
|
event: "Checkout Started",
|
|
63
|
-
weight: 5,
|
|
64
|
-
},
|
|
58
|
+
weight: 5 },
|
|
65
59
|
{
|
|
66
60
|
event: "Purchase",
|
|
67
|
-
weight: 1,
|
|
68
|
-
},
|
|
61
|
+
weight: 1 },
|
|
69
62
|
{
|
|
70
63
|
event: "Product Review",
|
|
71
|
-
weight: 3,
|
|
72
|
-
},
|
|
64
|
+
weight: 3 },
|
|
73
65
|
{
|
|
74
66
|
event: "Search",
|
|
75
|
-
weight: 17,
|
|
76
|
-
},
|
|
67
|
+
weight: 17 },
|
|
77
68
|
{
|
|
78
69
|
event: "Browse",
|
|
79
|
-
weight: 25,
|
|
80
|
-
|
|
81
|
-
},
|
|
70
|
+
weight: 25 },
|
|
82
71
|
{
|
|
83
72
|
event: "Save for Later",
|
|
84
|
-
weight: 4,
|
|
85
|
-
},
|
|
73
|
+
weight: 4 },
|
|
86
74
|
{
|
|
87
75
|
event: "Remove from Cart",
|
|
88
|
-
weight: 2,
|
|
89
|
-
},
|
|
76
|
+
weight: 2 },
|
|
90
77
|
{
|
|
91
78
|
event: "Empty Cart",
|
|
92
|
-
weight: 4
|
|
93
|
-
}
|
|
79
|
+
weight: 4 }
|
|
94
80
|
],
|
|
95
81
|
funnels: [
|
|
96
82
|
{
|
|
@@ -108,8 +94,7 @@ const config = {
|
|
|
108
94
|
"weight": 1,
|
|
109
95
|
"isFirstFunnel": false,
|
|
110
96
|
"timeToConvert": 5,
|
|
111
|
-
"experiment": true
|
|
112
|
-
}
|
|
97
|
+
"experiment": true }
|
|
113
98
|
],
|
|
114
99
|
superProps: {
|
|
115
100
|
},
|
package/dungeons/big.js
CHANGED
|
@@ -39,7 +39,7 @@ const config = {
|
|
|
39
39
|
hasCampaigns: false,
|
|
40
40
|
hasDesktopDevices: false,
|
|
41
41
|
hasIOSDevices: false,
|
|
42
|
-
writeToDisk:
|
|
42
|
+
writeToDisk: true,
|
|
43
43
|
funnels: [
|
|
44
44
|
{
|
|
45
45
|
"sequence": ["foo", "bar", "baz", "qux", "garply", "durtle", "linny", "fonk", "crumn", "yak"],
|
|
@@ -107,7 +107,7 @@ const config = {
|
|
|
107
107
|
],
|
|
108
108
|
//? https://docs.mixpanel.com/docs/data-structure/property-reference/data-type
|
|
109
109
|
superProps: {
|
|
110
|
-
"string":
|
|
110
|
+
"string": ["red", "orange", "yellow", "green", "blue", "indigo", "violet"],
|
|
111
111
|
"number": integer,
|
|
112
112
|
"boolean": [true, true, false],
|
|
113
113
|
"date": () => date(90),
|
|
@@ -157,7 +157,7 @@ const config = {
|
|
|
157
157
|
function buildObjectProp() {
|
|
158
158
|
return function () {
|
|
159
159
|
return {
|
|
160
|
-
"foo key": choose(
|
|
160
|
+
"foo key": choose(["red", "orange", "yellow", "green", "blue", "indigo", "violet"]()),
|
|
161
161
|
"bar key": integer(1, 100),
|
|
162
162
|
"baz key": choose(pickAWinner([true, true, false])()),
|
|
163
163
|
};
|
package/dungeons/business.js
CHANGED
|
@@ -42,10 +42,9 @@ const config = {
|
|
|
42
42
|
hasAdSpend: true,
|
|
43
43
|
|
|
44
44
|
hasAvatar: false,
|
|
45
|
-
makeChart: true,
|
|
46
45
|
|
|
47
46
|
batchSize: 500_000,
|
|
48
|
-
concurrency:
|
|
47
|
+
concurrency: 1,
|
|
49
48
|
|
|
50
49
|
funnels: [
|
|
51
50
|
{
|
|
@@ -54,7 +53,7 @@ const config = {
|
|
|
54
53
|
props: {
|
|
55
54
|
channel_id: pickAWinner(channel_ids),
|
|
56
55
|
video_id: weighNumRange(1, 50000, 1.4),
|
|
57
|
-
category:
|
|
56
|
+
category: ["funny", "educational", "music", "news", "sports", "cooking", "DIY", "travel", "gaming"],
|
|
58
57
|
isFeatured: () => { chance.bool({ likelihood: 25 }); },
|
|
59
58
|
}
|
|
60
59
|
},
|
|
@@ -65,7 +64,7 @@ const config = {
|
|
|
65
64
|
props: {
|
|
66
65
|
channel_id: pickAWinner(channel_ids),
|
|
67
66
|
video_id: weighNumRange(1, 50000, .67),
|
|
68
|
-
category:
|
|
67
|
+
category: ["funny", "educational", "music", "news", "sports", "cooking", "DIY", "travel", "gaming"],
|
|
69
68
|
isFeatured: () => { chance.bool({ likelihood: 25 }); },
|
|
70
69
|
}
|
|
71
70
|
},
|
|
@@ -77,7 +76,7 @@ const config = {
|
|
|
77
76
|
"properties": {
|
|
78
77
|
"#hashtags": makeHashTags,
|
|
79
78
|
"watch time (sec)": weighNumRange(10, 600, .25),
|
|
80
|
-
"quality":
|
|
79
|
+
"quality": ["2160p", "1440p", "1080p", "720p", "480p", "360p", "240p"]
|
|
81
80
|
}
|
|
82
81
|
},
|
|
83
82
|
{
|
|
@@ -98,7 +97,7 @@ const config = {
|
|
|
98
97
|
"event": "subscribe",
|
|
99
98
|
"weight": 10,
|
|
100
99
|
"properties": {
|
|
101
|
-
"UI":
|
|
100
|
+
"UI": ["button", "link", "modal", "menu"],
|
|
102
101
|
}
|
|
103
102
|
},
|
|
104
103
|
{
|
|
@@ -107,7 +106,7 @@ const config = {
|
|
|
107
106
|
"properties": {
|
|
108
107
|
term: () => { return chance.word(); },
|
|
109
108
|
"# results": weighNumRange(1, 100, .25),
|
|
110
|
-
"UI":
|
|
109
|
+
"UI": ["button", "link", "modal", "menu"],
|
|
111
110
|
}
|
|
112
111
|
},
|
|
113
112
|
{
|
|
@@ -126,7 +125,7 @@ const config = {
|
|
|
126
125
|
"weight": 17,
|
|
127
126
|
"properties": {
|
|
128
127
|
video_id: weighNumRange(1, 50000, 1.4),
|
|
129
|
-
UI:
|
|
128
|
+
UI: ["toolbar", "menu", "keyboard"]
|
|
130
129
|
|
|
131
130
|
}
|
|
132
131
|
},
|
|
@@ -135,8 +134,8 @@ const config = {
|
|
|
135
134
|
"weight": 5,
|
|
136
135
|
"properties": {
|
|
137
136
|
"# of videos": weighNumRange(1, 100, .25),
|
|
138
|
-
"UI":
|
|
139
|
-
"visibility":
|
|
137
|
+
"UI": ["toolbar", "menu", "keyboard"],
|
|
138
|
+
"visibility": ["public", "private", "unlisted"],
|
|
140
139
|
}
|
|
141
140
|
},
|
|
142
141
|
{
|
|
@@ -162,9 +161,9 @@ const config = {
|
|
|
162
161
|
"event": "app error",
|
|
163
162
|
"weight": 15,
|
|
164
163
|
"properties": {
|
|
165
|
-
code:
|
|
164
|
+
code: ["404", "500", "403", "401", "400", "503", "504", "429"],
|
|
166
165
|
error: chance.sentence.bind(chance),
|
|
167
|
-
component:
|
|
166
|
+
component: ["video player", "search", "comment", "profile", "settings", "billing", "support"],
|
|
168
167
|
}
|
|
169
168
|
},
|
|
170
169
|
{
|
package/dungeons/complex.js
CHANGED
package/dungeons/copilot.js
CHANGED
|
@@ -76,7 +76,6 @@ const config = {
|
|
|
76
76
|
hasAnonIds: false, //if true, anonymousIds are created for each user
|
|
77
77
|
hasSessionIds: false, //if true, hasSessionIds are created for each user
|
|
78
78
|
hasAdSpend: false,
|
|
79
|
-
makeChart: false,
|
|
80
79
|
hasLocation: true,
|
|
81
80
|
hasAndroidDevices: true,
|
|
82
81
|
hasIOSDevices: true,
|
|
@@ -93,7 +92,7 @@ const config = {
|
|
|
93
92
|
event: "checkout",
|
|
94
93
|
weight: 2,
|
|
95
94
|
properties: {
|
|
96
|
-
currency:
|
|
95
|
+
currency: ["USD", "CAD", "EUR", "BTC", "ETH", "JPY"],
|
|
97
96
|
coupon: weighChoices(["none", "none", "none", "none", "10%OFF", "20%OFF", "10%OFF", "20%OFF", "30%OFF", "40%OFF", "50%OFF"]),
|
|
98
97
|
cart: makeProducts()
|
|
99
98
|
}
|
|
@@ -152,7 +151,7 @@ const config = {
|
|
|
152
151
|
weight: 1,
|
|
153
152
|
isFirstEvent: true,
|
|
154
153
|
properties: {
|
|
155
|
-
signupMethod:
|
|
154
|
+
signupMethod: ["email", "google", "facebook", "twitter", "linkedin", "github"],
|
|
156
155
|
referral: weighChoices(["none", "none", "none", "friend", "ad", "ad", "ad", "friend", "friend", "friend", "friend"]),
|
|
157
156
|
}
|
|
158
157
|
},
|
|
@@ -241,9 +240,9 @@ const config = {
|
|
|
241
240
|
if (record.event === 'sign up') {
|
|
242
241
|
record.signup_flow = "v1";
|
|
243
242
|
if (eventTime.isBefore(DAY_SIGNUPS_IMPROVED)) {
|
|
244
|
-
// 50%
|
|
243
|
+
// tag 50% for removal (filtered in "everything" hook)
|
|
245
244
|
if (chance.bool({ likelihood: 50 })) {
|
|
246
|
-
|
|
245
|
+
record._drop = true;
|
|
247
246
|
}
|
|
248
247
|
}
|
|
249
248
|
if (eventTime.isAfter(DAY_SIGNUPS_IMPROVED)) {
|
|
@@ -369,7 +368,10 @@ const config = {
|
|
|
369
368
|
|
|
370
369
|
}
|
|
371
370
|
|
|
372
|
-
|
|
371
|
+
// Filter out events tagged for removal in the event hook
|
|
372
|
+
if (type === "everything") {
|
|
373
|
+
record = record.filter(e => !e._drop);
|
|
374
|
+
}
|
|
373
375
|
|
|
374
376
|
return record;
|
|
375
377
|
}
|
package/dungeons/education.js
CHANGED
|
@@ -115,9 +115,8 @@ const config = {
|
|
|
115
115
|
hasAdSpend: false,
|
|
116
116
|
percentUsersBornInDataset: 50,
|
|
117
117
|
hasAvatar: true,
|
|
118
|
-
makeChart: false,
|
|
119
118
|
batchSize: 2_500_000,
|
|
120
|
-
concurrency:
|
|
119
|
+
concurrency: 1,
|
|
121
120
|
writeToDisk: false,
|
|
122
121
|
|
|
123
122
|
funnels: [
|
|
@@ -178,7 +177,7 @@ const config = {
|
|
|
178
177
|
isFirstEvent: true,
|
|
179
178
|
properties: {
|
|
180
179
|
"account_type": u.pickAWinner(["student", "instructor"], 0.15),
|
|
181
|
-
"signup_source":
|
|
180
|
+
"signup_source": ["organic", "referral", "school_partnership", "social_ad"],
|
|
182
181
|
}
|
|
183
182
|
},
|
|
184
183
|
{
|
|
@@ -186,8 +185,8 @@ const config = {
|
|
|
186
185
|
weight: 8,
|
|
187
186
|
properties: {
|
|
188
187
|
"course_id": u.pickAWinner(courseIds),
|
|
189
|
-
"course_category":
|
|
190
|
-
"difficulty":
|
|
188
|
+
"course_category": ["CS", "Math", "Science", "Business", "Arts", "Languages"],
|
|
189
|
+
"difficulty": ["beginner", "intermediate", "advanced"],
|
|
191
190
|
"is_free": u.pickAWinner([true, false], 0.4),
|
|
192
191
|
}
|
|
193
192
|
},
|
|
@@ -218,7 +217,7 @@ const config = {
|
|
|
218
217
|
properties: {
|
|
219
218
|
"course_id": u.pickAWinner(courseIds),
|
|
220
219
|
"quiz_id": u.pickAWinner(quizIds),
|
|
221
|
-
"quiz_type":
|
|
220
|
+
"quiz_type": ["practice", "graded", "final_exam"],
|
|
222
221
|
"question_count": u.weighNumRange(5, 50, 0.7, 15),
|
|
223
222
|
}
|
|
224
223
|
},
|
|
@@ -239,7 +238,7 @@ const config = {
|
|
|
239
238
|
properties: {
|
|
240
239
|
"course_id": u.pickAWinner(courseIds),
|
|
241
240
|
"assignment_id": u.pickAWinner(assignmentIds),
|
|
242
|
-
"submission_type":
|
|
241
|
+
"submission_type": ["text", "code", "file", "project"],
|
|
243
242
|
"word_count": u.weighNumRange(100, 5000, 0.6, 500),
|
|
244
243
|
"is_late": u.pickAWinner([true, false], 0.2),
|
|
245
244
|
}
|
|
@@ -250,9 +249,9 @@ const config = {
|
|
|
250
249
|
properties: {
|
|
251
250
|
"course_id": u.pickAWinner(courseIds),
|
|
252
251
|
"assignment_id": u.pickAWinner(assignmentIds),
|
|
253
|
-
"grade":
|
|
252
|
+
"grade": ["A", "B", "C", "D", "F"],
|
|
254
253
|
"feedback_length": u.weighNumRange(0, 500, 0.5, 100),
|
|
255
|
-
"grader":
|
|
254
|
+
"grader": ["instructor", "peer", "auto"],
|
|
256
255
|
}
|
|
257
256
|
},
|
|
258
257
|
{
|
|
@@ -260,7 +259,7 @@ const config = {
|
|
|
260
259
|
weight: 7,
|
|
261
260
|
properties: {
|
|
262
261
|
"course_id": u.pickAWinner(courseIds),
|
|
263
|
-
"post_type":
|
|
262
|
+
"post_type": ["question", "answer", "comment"],
|
|
264
263
|
"word_count": u.weighNumRange(10, 500, 0.6, 80),
|
|
265
264
|
}
|
|
266
265
|
},
|
|
@@ -279,14 +278,14 @@ const config = {
|
|
|
279
278
|
properties: {
|
|
280
279
|
"group_id": u.pickAWinner(groupIds),
|
|
281
280
|
"group_size": u.weighNumRange(3, 20, 0.7, 8),
|
|
282
|
-
"group_type":
|
|
281
|
+
"group_type": ["study_circle", "project_team", "tutoring"],
|
|
283
282
|
}
|
|
284
283
|
},
|
|
285
284
|
{
|
|
286
285
|
event: "resource downloaded",
|
|
287
286
|
weight: 9,
|
|
288
287
|
properties: {
|
|
289
|
-
"resource_type":
|
|
288
|
+
"resource_type": ["pdf", "slides", "code_sample", "dataset", "cheat_sheet"],
|
|
290
289
|
"course_id": u.pickAWinner(courseIds),
|
|
291
290
|
}
|
|
292
291
|
},
|
|
@@ -295,7 +294,7 @@ const config = {
|
|
|
295
294
|
weight: 3,
|
|
296
295
|
properties: {
|
|
297
296
|
"course_id": u.pickAWinner(courseIds),
|
|
298
|
-
"feedback_type":
|
|
297
|
+
"feedback_type": ["written", "video", "rubric"],
|
|
299
298
|
"response_time_hours": u.weighNumRange(1, 72, 0.5, 15),
|
|
300
299
|
}
|
|
301
300
|
},
|
|
@@ -313,7 +312,7 @@ const config = {
|
|
|
313
312
|
event: "subscription purchased",
|
|
314
313
|
weight: 2,
|
|
315
314
|
properties: {
|
|
316
|
-
"plan":
|
|
315
|
+
"plan": ["monthly", "annual", "lifetime"],
|
|
317
316
|
"price": u.pickAWinner([19.99, 149.99, 499.99]),
|
|
318
317
|
}
|
|
319
318
|
},
|
|
@@ -321,8 +320,8 @@ const config = {
|
|
|
321
320
|
event: "help requested",
|
|
322
321
|
weight: 4,
|
|
323
322
|
properties: {
|
|
324
|
-
"topic":
|
|
325
|
-
"channel":
|
|
323
|
+
"topic": ["technical", "content", "billing", "accessibility"],
|
|
324
|
+
"channel": ["chat", "email", "forum"],
|
|
326
325
|
}
|
|
327
326
|
},
|
|
328
327
|
{
|
|
@@ -331,7 +330,7 @@ const config = {
|
|
|
331
330
|
properties: {
|
|
332
331
|
"course_id": u.pickAWinner(courseIds),
|
|
333
332
|
"problem_id": u.pickAWinner(problemIds),
|
|
334
|
-
"difficulty":
|
|
333
|
+
"difficulty": ["easy", "medium", "hard"],
|
|
335
334
|
"time_to_solve_sec": u.weighNumRange(10, 3600, 0.5, 300),
|
|
336
335
|
"hint_used": u.pickAWinner([true, false], 0.35),
|
|
337
336
|
}
|
|
@@ -339,7 +338,7 @@ const config = {
|
|
|
339
338
|
],
|
|
340
339
|
|
|
341
340
|
superProps: {
|
|
342
|
-
platform:
|
|
341
|
+
platform: ["Web", "iOS", "Android", "iPad"],
|
|
343
342
|
subscription_status: u.pickAWinner(["free", "free", "free", "monthly", "annual"]),
|
|
344
343
|
},
|
|
345
344
|
|
|
@@ -347,9 +346,9 @@ const config = {
|
|
|
347
346
|
|
|
348
347
|
userProps: {
|
|
349
348
|
"account_type": u.pickAWinner(["student", "student", "student", "student", "student", "student", "student", "student", "instructor"]),
|
|
350
|
-
"learning_style":
|
|
351
|
-
"education_level":
|
|
352
|
-
"timezone":
|
|
349
|
+
"learning_style": ["visual", "reading", "hands_on", "auditory"],
|
|
350
|
+
"education_level": ["high_school", "bachelors", "masters", "phd", "self_taught"],
|
|
351
|
+
"timezone": ["US_Eastern", "US_Pacific", "US_Central", "Europe", "Asia"],
|
|
353
352
|
},
|
|
354
353
|
|
|
355
354
|
groupKeys: [
|
|
@@ -367,7 +366,7 @@ const config = {
|
|
|
367
366
|
group_id: {
|
|
368
367
|
"name": () => `${chance.pickone(["Study", "Learning", "Focus", "Peer", "Cohort"])} ${chance.pickone(["Circle", "Squad", "Team", "Hub", "Group"])} ${chance.character({ alpha: true, casing: "upper" })}${chance.integer({ min: 1, max: 99 })}`,
|
|
369
368
|
"member_count": u.weighNumRange(3, 20, 0.7, 8),
|
|
370
|
-
"focus_area":
|
|
369
|
+
"focus_area": ["CS", "Math", "Science", "Business", "Arts", "Languages"],
|
|
371
370
|
}
|
|
372
371
|
},
|
|
373
372
|
|
package/dungeons/experiments.js
CHANGED
|
@@ -34,7 +34,6 @@ const config = {
|
|
|
34
34
|
hasAdSpend: false,
|
|
35
35
|
|
|
36
36
|
hasAvatar: true,
|
|
37
|
-
makeChart: false,
|
|
38
37
|
|
|
39
38
|
|
|
40
39
|
batchSize: 2_500_000,
|
|
@@ -57,21 +56,21 @@ const config = {
|
|
|
57
56
|
event: "super common event",
|
|
58
57
|
weight: 50,
|
|
59
58
|
properties: {
|
|
60
|
-
"foo":
|
|
59
|
+
"foo": ["bar", "baz", "qux"],
|
|
61
60
|
}
|
|
62
61
|
},
|
|
63
62
|
{
|
|
64
63
|
event: "less common event",
|
|
65
64
|
weight: 20,
|
|
66
65
|
properties: {
|
|
67
|
-
"hello":
|
|
66
|
+
"hello": ["world", "universe", "galaxy"],
|
|
68
67
|
}
|
|
69
68
|
},
|
|
70
69
|
{
|
|
71
70
|
event: "rare event",
|
|
72
71
|
weight: 5,
|
|
73
72
|
properties: {
|
|
74
|
-
"goodbye":
|
|
73
|
+
"goodbye": ["cruel world", "universe", "galaxy"],
|
|
75
74
|
}
|
|
76
75
|
},
|
|
77
76
|
{
|
|
@@ -79,7 +78,7 @@ const config = {
|
|
|
79
78
|
weight: 10,
|
|
80
79
|
properties: {
|
|
81
80
|
"amount": u.weighNumRange(5, 500, .25),
|
|
82
|
-
"currency":
|
|
81
|
+
"currency": ["USD", "CAD", "EUR", "BTC", "ETH", "JPY"],
|
|
83
82
|
"numItems": u.weighNumRange(1, 10),
|
|
84
83
|
}
|
|
85
84
|
}
|