Skip to content

Instantly share code, notes, and snippets.

@craigsdennis
Created March 24, 2023 00:51
Show Gist options
  • Save craigsdennis/5bfb3779512d36d0fdad2b4e83a69632 to your computer and use it in GitHub Desktop.
Save craigsdennis/5bfb3779512d36d0fdad2b4e83a69632 to your computer and use it in GitHub Desktop.
const faker = require('faker');
function generateSocimindProfile() {
const profile = {
user_id: faker.random.uuid(),
name: `${faker.name.firstName()} ${faker.name.lastName()}`,
email: faker.internet.email(),
gender: faker.random.arrayElement(['male', 'female', 'non-binary']),
age: faker.random.number({min: 18, max: 65}),
location: {
city: faker.address.city(),
state: faker.address.state(),
country: faker.address.country()
},
interests: [
faker.random.arrayElement(['yoga', 'hiking', 'travel', 'cooking', 'reading', 'music', 'art', 'sports']),
faker.random.arrayElement(['yoga', 'hiking', 'travel', 'cooking', 'reading', 'music', 'art', 'sports']),
faker.random.arrayElement(['yoga', 'hiking', 'travel', 'cooking', 'reading', 'music', 'art', 'sports'])
],
behavior: {
content_views: faker.random.number({min: 1, max: 500}),
content_likes: faker.random.number({min: 1, max: 100}),
content_shares: faker.random.number({min: 0, max: 20}),
follows: faker.random.number({min: 0, max: 50}),
unfollows: faker.random.number({min: 0, max: 10}),
in_app_purchases: faker.random.number({min: 0, max: 10})
},
predictive_traits: {
likelihood_to_engage_with_ad: faker.random.number({min: 0, max: 1, precision: 0.01}),
likelihood_to_follow_yoga_influencers: faker.random.number({min: 0, max: 1, precision: 0.01}),
likelihood_to_share_travel_content: faker.random.number({min: 0, max: 1, precision: 0.01})
},
ltv: faker.random.number({min: 50, max: 500}),
cac: faker.random.number({min: 10, max: 100})
};
return profile;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment