make-mp-data 1.1.18 → 1.2.0

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/default.js DELETED
@@ -1,177 +0,0 @@
1
- /**
2
- * This is the default configuration file for the data generator
3
- * notice how the config object is structured, and see it's type definition in ./types.d.ts
4
- * feel free to modify this file to customize the data you generate
5
- * see helper functions in utils.js for more ways to generate data
6
- */
7
-
8
-
9
- const Chance = require('chance');
10
- const chance = new Chance();
11
- const { weightedRange, makeProducts, date, generateEmoji, makeHashTags } = require('./utils.js');
12
-
13
- /** @type {import('./types.d.ts').Config} */
14
- const config = {
15
- token: "",
16
- seed: "foo bar baz",
17
- numDays: 30, //how many days worth of data
18
- numEvents: 100000, //how many events
19
- numUsers: 1000, //how many users
20
- format: 'csv', //csv or json
21
- region: "US",
22
- anonIds: true, //if true, anonymousIds are created for each user
23
- sessionIds: true, //if true, sessionIds are created for each user
24
-
25
- events: [
26
- {
27
- "event": "checkout",
28
- "weight": 2,
29
- "properties": {
30
- amount: weightedRange(5, 500, 1000, .25),
31
- currency: ["USD", "CAD", "EUR", "BTC", "ETH", "JPY"],
32
- cart: makeProducts,
33
- }
34
- },
35
- {
36
- "event": "add to cart",
37
- "weight": 4,
38
- "properties": {
39
- isFeaturedItem: [true, false, false],
40
- amount: weightedRange(5, 500, 1000, .25),
41
- rating: weightedRange(1, 5),
42
- reviews: weightedRange(0, 35),
43
- product_id: weightedRange(1, 1000)
44
- }
45
- },
46
- {
47
- "event": "page view",
48
- "weight": 10,
49
- "properties": {
50
- page: ["/", "/", "/help", "/account", "/watch", "/listen", "/product", "/people", "/peace"],
51
- utm_source: ["$organic", "$organic", "$organic", "$organic", "google", "google", "google", "facebook", "facebook", "twitter", "linkedin"],
52
- }
53
- },
54
- {
55
- "event": "watch video",
56
- "weight": 8,
57
- "properties": {
58
- category: ["funny", "educational", "inspirational", "music", "news", "sports", "cooking", "DIY", "travel", "gaming"],
59
- hashTags: makeHashTags,
60
- watchTimeSec: weightedRange(10, 600, 1000, .25),
61
- quality: ["2160p", "1440p", "1080p", "720p", "480p", "360p", "240p"],
62
- format: ["mp4", "avi", "mov", "mpg"],
63
- uploader_id: chance.guid.bind(chance)
64
-
65
- }
66
- },
67
- {
68
- "event": "view item",
69
- "weight": 8,
70
- "properties": {
71
- product_id: weightedRange(1, 1000),
72
- colors: ["light", "dark", "custom", "dark"]
73
- }
74
- },
75
- {
76
- "event": "save item",
77
- "weight": 5,
78
- "properties": {
79
- product_id: weightedRange(1, 1000),
80
- colors: ["light", "dark", "custom", "dark"]
81
- }
82
- },
83
- {
84
- "event": "sign up",
85
- "isFirstEvent": true,
86
- "weight": 0,
87
- "properties": {
88
- variant: ["A", "B", "C", "Control"],
89
- experiment: ["no password", "social sign in", "new tutorial"],
90
- }
91
- }
92
- ],
93
- superProps: {
94
- platform: ["web", "mobile", "web", "mobile", "web", "kiosk", "smartTV"],
95
- // emotions: generateEmoji(),
96
-
97
- },
98
- /*
99
- user properties work the same as event properties
100
- each key should be an array or function reference
101
- */
102
- userProps: {
103
- title: chance.profession.bind(chance),
104
- luckyNumber: weightedRange(42, 420),
105
- // vibe: generateEmoji(),
106
- spiritAnimal: chance.animal.bind(chance)
107
- },
108
-
109
- scdProps: {
110
- plan: ["free", "free", "free", "free", "basic", "basic", "basic", "premium", "premium", "enterprise"],
111
- MRR: weightedRange(0, 10000, 1000, .15),
112
- NPS: weightedRange(0, 10, 150, 2),
113
- marketingOptIn: [true, true, false],
114
- dateOfRenewal: date(100, false),
115
- },
116
-
117
- /*
118
- for group analytics keys, we need an array of arrays [[],[],[]]
119
- each pair represents a group_key and the number of profiles for that key
120
- */
121
- groupKeys: [
122
- ['company_id', 350],
123
-
124
- ],
125
- groupProps: {
126
- company_id: {
127
- $name: () => { return chance.company(); },
128
- $email: () => { return `CSM: ${chance.pickone(["AK", "Jessica", "Michelle", "Dana", "Brian", "Dave"])}`; },
129
- "# of employees": weightedRange(3, 10000),
130
- "sector": ["tech", "finance", "healthcare", "education", "government", "non-profit"],
131
- "segment": ["enterprise", "SMB", "mid-market"],
132
- }
133
- },
134
-
135
- lookupTables: [
136
- {
137
- key: "product_id",
138
- entries: 1000,
139
- attributes: {
140
- category: [
141
- "Books",
142
- "Movies",
143
- "Music",
144
- "Games",
145
- "Electronics",
146
- "Computers",
147
- "Smart Home",
148
- "Home",
149
- "Garden & Tools",
150
- "Pet Supplies",
151
- "Food & Grocery",
152
- "Beauty",
153
- "Health",
154
- "Toys",
155
- "Kids",
156
- "Baby",
157
- "Handmade",
158
- "Sports",
159
- "Outdoors",
160
- "Automotive",
161
- "Industrial",
162
- "Entertainment",
163
- "Art"
164
- ],
165
- "demand": ["high", "medium", "medium", "low"],
166
- "supply": ["high", "medium", "medium", "low"],
167
- "manufacturer": chance.company.bind(chance),
168
- "price": weightedRange(5, 500, 1000, .25),
169
- "rating": weightedRange(1, 5),
170
- "reviews": weightedRange(0, 35)
171
- }
172
-
173
- }
174
- ],
175
- };
176
-
177
- module.exports = config;