Skip to content
Marielle Lange edited this page Aug 28, 2015 · 8 revisions

Generating fake data

Here is an example of fake data suitable for this problem:

Generated data

Go to json generator

Use this:

[
  '{{repeat(700, 700)}}', // change 7 to 700 once happy with results
  {
    _id: '{{objectId()}}',
    index: '{{index()}}',
    name: '{{firstName()}} {{surname()}}',
    skills: function (tags) {
      var proficiency = ['interested in learning', 'theoretical', 'practical'];
      return ["javascript", "java", "c#", "php", "android", "jquery", "python", "html", "c++", "ios", "mysql", "css", "sql", "asp.net", "objective-c", "ruby-on-rails", ".net", "iphone", "c", "arrays", "ruby", "sql-server", "ajax", "json", "regex", "xml", "angularjs", "asp.net-mvc", "linux", "wpf", "r", "django", "database", "node.js", "eclipse", "xcode", "vb.net", "windows", "string", "html5", "wordpress", "multithreading", "excel", "spring", "facebook", "image", "forms", "winforms", "oracle", "git", "osx", "bash", "algorithm", "performance", "swing", "apache", "ruby-on-rails-3", "matlab", "swift", "linq", "entity-framework", "twitter-bootstrap", "mongodb", "vba", "hibernate", "perl", "web-services", "visual-studio", "visual-studio-2010", "css3", "list", ".htaccess"].map(function(d) {
        return {skill: d, level: tags.integer(0, 30)}; }).filter(function(d) { return d.level < 3; }).map(function(d) { d.level = proficiency[d.level]; return d; });
        
    }
  }
]

The skill tags have been extracted from stackoverflow tag list, typing this in the console Array.prototype.slice.call(document.querySelectorAll('.tag-cell > .post-tag')).map(function(d) { return d.innerText; })

To change the number of skills listed for a candidate, change the max value in tags.integer(0, 30)};

The filter is set to d.level less than 3 because we presume there are only 3 possible level values ['interested in learning', 'theoretical', 'practical']

Clone this wiki locally