Playground for creating test data
IMPORTANT: This is a work in progress, and all information may change at any time. Please contact developer@dnb.no if you have questions or comments.
Code to generate synthetic data for DNB Developer APIs: https://dnbdeveloper.restlet.io
Branches, ATMs, etc are avilable in the “csv” directory, and in the links below. Please note that the .csv suffix is incorrect: The files are not proper comma-separated files.
The following are must-have patterns. Some are broad in terms of the data range, while some are a bit more specific.
As I said yesterday I recommend patterns in terms of bigger categories, and not MCCs or similar. I also highly recommend drawing amounts from normal distributions given a good guess on mean, and day of month of recurrent payments etc. from random distributions. When it comes to frequencies, monthly frequency is most represented, but you could throw in some quarterly or yearly frequencies as well. The next installment of a recurrent payment must respect the frequency, so I suggest fixing the day of month from one installment to the next, taking special care of the last day of the month (28 for February).
Categories 1,2,4,5,8,9,11,12,13,14 and 16 should have been mentioned above. The rest can have various amount of instances per account, with highly variable amounts. If it is possible in the seeding process I also recommend implementing some limits to the overall surplus or deficit on an account, for realism. If it is possible, the likelihood of the categories being represented on a current account is also variable, i.e. 1,2,5 and 12 are highly likely (sort of must-haves), while the rest are less likely. “
python create_people.py -n 10
, this will create a JSON-file with people generated-people-{date}.json
.python create_accounts.py generated-people-{date}.json
, this will create a JSON-file with accounts generated-accounts{date}.json
python create_payments.py generated-accounts{date}.json
, this will create three JSON-files with booked, reserved and due transactionspython create_account_details_and_balances.py generated-accounts{date}.json
, this will create a JSON-file with balance and details for the accounts generated-account-balances{date}.json
, generated-account-details13-06-2018.json