diff --git a/TestData/generate.js b/TestData/generate.js new file mode 100644 index 0000000..b01eb34 --- /dev/null +++ b/TestData/generate.js @@ -0,0 +1,42 @@ +module.exports = function(){ + var fakeTimeDataCount = 4000, maxUserCount = 120; + var faker = require("faker"); + var _ = require("lodash"); + var directions = ["in", "out"]; + var users = _.times(maxUserCount, function (n) + { + return { + id: n, + //timestamp: faker.date.past(), + userId: n, + firstName: faker.name.firstName(), + lastName: faker.name.lastName() + } + } + ); + var userSwipeDataPoints = _.times (fakeTimeDataCount, function(n) + { + return { + id: n, + userId: faker.random.number(maxUserCount), + timestamp: faker.date.past(), + direction: directions[faker.random.number(1)] + } + } + ); + return { + userSwipeData: _.orderBy(userSwipeDataPoints, ["id"], ["asc"]), + //users: _.orderBy(data, ["userId", "asc"]), + users: _.orderBy(users, ["lastName", "firstName"],["asc", "asc"]), + //weather: _.orderBy(data, ["timestamp"],["asc"]), + stats: _.countBy(userSwipeDataPoints, "userId") + } +} +/* + so to get a list of the available users, call /users + + to get specific user info, call /userSwipeData/ + + + +*/ \ No newline at end of file diff --git a/TestData/users.txt b/TestData/users.txt new file mode 100644 index 0000000..f0206b1 --- /dev/null +++ b/TestData/users.txt @@ -0,0 +1,8 @@ +CWATTS - 5B867F01F8FF12E09000 +SBANKS - 49808201F8FF12E09000 +GNEWTON - E5DADC01F9FF12E09000 +SFEKADU - CA837E01F8FF12E09000 +RBOWMAN - F2078001F8FF12E09000 +AWICKENS - 8C837F01F8FF12E09000 +BLawrence - E60C8501F8FF12E09000 +Eugene - 5A8C8201F8FF12E09000 \ No newline at end of file