irshadtech10 commited on
Commit
58b3467
·
1 Parent(s): 0ab74a2

Upload data.py

Browse files
Files changed (1) hide show
  1. data.py +296 -0
data.py ADDED
@@ -0,0 +1,296 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import pandas as pd
3
+ data_json = '''
4
+ [
5
+ {
6
+ "user_id": 1,
7
+ "bankStatement": {
8
+ "accountHolder": "John Doe",
9
+ "bank": "Example Bank",
10
+ "accountNumber": "123-456-789",
11
+ "statementPeriod": "01/08/2023 - 31/08/2023",
12
+ "transactions": [
13
+ {
14
+ "date": "01/08/2023",
15
+ "description": "Opening Balance",
16
+ "debit": 100,
17
+ "credit": 0,
18
+ "balance": 5000
19
+ },
20
+ {
21
+ "date": "02/08/2023",
22
+ "description": "ATM Withdrawal",
23
+ "debit": 200,
24
+ "credit": 0,
25
+ "balance": 4800
26
+ },
27
+ {
28
+ "date": "10/08/2023",
29
+ "description": "Grocery Shopping",
30
+ "debit": 50,
31
+ "credit": 0,
32
+ "balance": 4750
33
+ },
34
+ {
35
+ "date": "15/08/2023",
36
+ "description": "Salary Deposit",
37
+ "debit": 0,
38
+ "credit": 3000,
39
+ "balance": 7750
40
+ },
41
+ {
42
+ "date": "20/08/2023",
43
+ "description": "Utility Bill Payment",
44
+ "debit": 100,
45
+ "credit": 0,
46
+ "balance": 7650
47
+ },
48
+ {
49
+ "date": "1/09/2023",
50
+ "description": "Online Purchase",
51
+ "debit": 300,
52
+ "credit": 0,
53
+ "balance": 7620
54
+ },
55
+ {
56
+ "date": "10/09/2023",
57
+ "description": "Rent Payment",
58
+ "debit": 1500,
59
+ "credit": 0,
60
+ "balance": 6120
61
+ }
62
+ ]
63
+ },
64
+ "investmentStatement": {
65
+ "accountHolder": "John Doe",
66
+ "investmentFirm": "Example Investments",
67
+ "accountNumber": "INV-123456",
68
+ "statementPeriod": "01/08/2023 - 31/10/2023",
69
+ "transactions": [
70
+ {
71
+ "date": "01/08/2023",
72
+ "description": "Opening Balance",
73
+ "buy": 100,
74
+ "sell": 0,
75
+ "dividends": 10,
76
+ "balance": 10000
77
+ },
78
+ {
79
+ "date": "05/08/2023",
80
+ "description": "Buy ABC Corp Shares",
81
+ "buy": 400,
82
+ "sell": 0,
83
+ "dividends": 50,
84
+ "balance": 9600
85
+ },
86
+ {
87
+ "date": "12/09/2023",
88
+ "description": "Sell XYZ Corp Shares",
89
+ "buy": 290,
90
+ "sell": 300,
91
+ "dividends": 100,
92
+ "balance": 9900
93
+ },
94
+ {
95
+ "date": "18/09/2023",
96
+ "description": "Dividend Income",
97
+ "buy": 0,
98
+ "sell": 0,
99
+ "dividends": 200,
100
+ "balance": 10100
101
+ },
102
+ {
103
+ "date": "25/10/2023",
104
+ "description": "Buy DEF Corp Shares",
105
+ "buy": 200,
106
+ "sell": 0,
107
+ "dividends": 290,
108
+ "balance": 10300
109
+ },
110
+ {
111
+ "date": "31/10/2023",
112
+ "description": "Sell PQR Corp Shares",
113
+ "buy": 0,
114
+ "sell": 500,
115
+ "dividends": 0,
116
+ "balance": 10800
117
+ },
118
+ {
119
+ "date": "31/10/2023",
120
+ "description": "Buy MNO Corp Shares",
121
+ "buy": 300,
122
+ "sell": 0,
123
+ "dividends": 180,
124
+ "balance": 11100
125
+ }
126
+ ]
127
+ },
128
+ "debts": [
129
+ {
130
+ "creditor": "Credit Card Company",
131
+ "debtType": "Credit Card Debt",
132
+ "amount": 4000,
133
+ "interestRate": 0.18,
134
+ "dueDate": "15/09/2023"
135
+ },
136
+ {
137
+ "creditor": "Student Loan Provider",
138
+ "debtType": "Student Loan",
139
+ "amount": 12000,
140
+ "interestRate": 0.05,
141
+ "dueDate": "30/06/2024"
142
+ }
143
+ ],
144
+ "savingsRate": 0.20,
145
+ "retirementAge": 65,
146
+ "lifeExpectancy": 85,
147
+ "currentAge": 40,
148
+ "investmentReturns": 0.07
149
+ },
150
+ {
151
+ "user_id": 2,
152
+ "bankStatement": {
153
+ "accountHolder": "Jane Smith",
154
+ "bank": "Example Bank",
155
+ "accountNumber": "987-654-321",
156
+ "statementPeriod": "01/08/2023 - 31/08/2023",
157
+ "transactions": [
158
+ {
159
+ "date": "01/08/2023",
160
+ "description": "Opening Balance",
161
+ "debit": 0,
162
+ "credit": 0,
163
+ "balance": 7500
164
+ },
165
+ {
166
+ "date": "05/08/2023",
167
+ "description": "Salary Deposit",
168
+ "debit": 0,
169
+ "credit": 3000,
170
+ "balance": 10500
171
+ },
172
+ {
173
+ "date": "10/08/2023",
174
+ "description": "Grocery Shopping",
175
+ "debit": 70,
176
+ "credit": 0,
177
+ "balance": 10430
178
+ },
179
+ {
180
+ "date": "15/09/2023",
181
+ "description": "Utility Bill Payment",
182
+ "debit": 80,
183
+ "credit": 0,
184
+ "balance": 10350
185
+ },
186
+ {
187
+ "date": "20/08/2023",
188
+ "description": "Online Purchase",
189
+ "debit": 40,
190
+ "credit": 0,
191
+ "balance": 10310
192
+ },
193
+ {
194
+ "date": "28/09/2023",
195
+ "description": "Car Loan Payment",
196
+ "debit": 800,
197
+ "credit": 0,
198
+ "balance": 9510
199
+ },
200
+ {
201
+ "date": "31/10/2023",
202
+ "description": "Dining Out",
203
+ "debit": 100,
204
+ "credit": 0,
205
+ "balance": 9410
206
+ }
207
+ ]
208
+ },
209
+ "investmentStatement": {
210
+ "accountHolder": "Jane Smith",
211
+ "investmentFirm": "Example Investments",
212
+ "accountNumber": "INV-987654",
213
+ "statementPeriod": "01/08/2023 - 31/08/2023",
214
+ "transactions": [
215
+ {
216
+ "date": "01/08/2023",
217
+ "description": "Opening Balance",
218
+ "buy": 0,
219
+ "sell": 0,
220
+ "dividends": 150,
221
+ "balance": 12000
222
+ },
223
+ {
224
+ "date": "05/08/2023",
225
+ "description": "Buy ABC Corp Shares",
226
+ "buy": 600,
227
+ "sell": 0,
228
+ "dividends": 200,
229
+ "balance": 11400
230
+ },
231
+ {
232
+ "date": "12/08/2023",
233
+ "description": "Sell XYZ Corp Shares",
234
+ "buy": 0,
235
+ "sell": 400,
236
+ "dividends": 50,
237
+ "balance": 11800
238
+ },
239
+ {
240
+ "date": "18/08/2023",
241
+ "description": "Dividend Income",
242
+ "buy": 0,
243
+ "sell": 0,
244
+ "dividends": 250,
245
+ "balance": 12050
246
+ },
247
+ {
248
+ "date": "25/08/2023",
249
+ "description": "Buy DEF Corp Shares",
250
+ "buy": 300,
251
+ "sell": 0,
252
+ "dividends": 120,
253
+ "balance": 11750
254
+ },
255
+ {
256
+ "date": "10/09/2023",
257
+ "description": "Sell PQR Corp Shares",
258
+ "buy": 0,
259
+ "sell": 700,
260
+ "dividends": 70,
261
+ "balance": 12450
262
+ },
263
+ {
264
+ "date": "1/09/2023",
265
+ "description": "Buy MNO Corp Shares",
266
+ "buy": 200,
267
+ "sell": 0,
268
+ "dividends": 20,
269
+ "balance": 12650
270
+ }
271
+ ]
272
+ },
273
+ "debts": [
274
+ {
275
+ "creditor": "Credit Card Company",
276
+ "debtType": "Credit Card Debt",
277
+ "amount": 2500,
278
+ "interestRate": 0.15,
279
+ "dueDate": "20/11/2023"
280
+ },
281
+ {
282
+ "creditor": "Auto Loan Provider",
283
+ "debtType": "Auto Loan",
284
+ "amount": 8000,
285
+ "interestRate": 0.07,
286
+ "dueDate": "05/04/2025"
287
+ }
288
+ ],
289
+ "savingsRate": 0.25,
290
+ "retirementAge": 68,
291
+ "lifeExpectancy": 90,
292
+ "currentAge": 45,
293
+ "investmentReturns": 0.08
294
+ }
295
+ ]
296
+ '''