-
Notifications
You must be signed in to change notification settings - Fork 2
/
schemas.py
358 lines (257 loc) · 8.65 KB
/
schemas.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
from pydantic import BaseModel, Field
from decimal import Decimal
from typing import Optional
class DwdStationReference(BaseModel):
station_name: str
station_id: str
identifier: str
station_code: str
station_elevation: Optional[int] = None
river_basin_id: Optional[int] = None
state_name: str
recording_start: Optional[str] = None
recording_end: Optional[str] = None
geojson: Optional[dict] = None
class WeatherStationResponse(BaseModel):
station_id: str
start_date: str
end_date: str
station_elevation: Optional[int]
station_name: Optional[str]
state_name: Optional[str]
submission: Optional[str]
geojson: dict
class DistrictDetails(BaseModel):
district_name: str
residents: Optional[int]
births: int
age_ratio: float
age_to_under_18: int
age_18_to_under_65: int
age_65_and_above: int
age_18_to_under_30: int
age_30_to_under_45: int
age_45_to_under_65: int
age_65_to_under_80: int
age_0_to_under_7: int
age_60_and_above: int
age_80_and_above: int
employed_residents: int
unemployed_residents: int
percentage_sgb_iii: Optional[float]
percentage_sgb_ii: Optional[float]
percentage_foreign_citizenship: Optional[float]
percentage_female: Optional[float]
percentage_age_under_25: Optional[float]
housing_benefit: int
notices_of_rent_arrears: Optional[int]
termination_rent_arrears: Optional[int]
termination_for_conduct: Optional[int]
action_for_eviction: Optional[int]
eviction_notice: Optional[int]
eviction_carried: Optional[int]
risk_of_homelessness: Optional[int]
employable_with_benefits: int
unemployment_benefits: int
basic_income: int
assisting_benefits: int
beneficiaries_sgbii: int
unemployability: int
employability: int
percentage_females: Optional[float]
percentage_single_parents: Optional[float]
percentage_foreign_citizenship: Optional[float]
unemployed_beneficiaries: int
male_basic_beneficiaries: int
female_basic_beneficiaries: int
age_18_to_under_65_basic_beneficiaries: int
age_65_and_above_basic_beneficiaries: int
foreign_citizenship: int
german_citizenship: int
class District(BaseModel):
district_id: int
district_name: Optional[str]
class Districts(District):
districts: list[District]
class HouseholdType(BaseModel):
household_id: Optional[int]
household_type: Optional[str]
class HouseholdTypes(HouseholdType):
pass
class ResidentsByDistrict(BaseModel):
year: int
district_id: int
residents: Optional[int]
class ResidentsByDistricts(ResidentsByDistrict):
pass
class BirthsByDistrict(BaseModel):
year: int
district_id: int
births: Optional[int]
birth_rate: Optional[float]
class BirthsByDistricts(BirthsByDistrict):
pass
class AgeGroupsOfResidents(BaseModel):
year: int
age_under_18: Optional[int]
age_18_to_under_30: Optional[int]
age_30_to_under_45: Optional[int]
age_45_to_under_65: Optional[int]
age_65_to_under_80: Optional[int]
age_80_and_above: Optional[int]
class AgeRatioByDistrict(BaseModel):
year: int
district_id: int
quotient: Optional[float]
class AgeRatioByDistricts(AgeRatioByDistrict):
pass
class AgeGroupsOfResidentsByDistrict(BaseModel):
year: int
district_id: int
age_under_18: Optional[int]
age_18_to_under_30: Optional[int]
age_30_to_under_45: Optional[int]
age_45_to_under_65: Optional[int]
age_65_to_under_80: Optional[int]
age_80_and_above: Optional[int]
age_0_to_under_7: Optional[int]
age_60_and_above: Optional[int]
class AgeGroupsOfResidentsByDistrict(AgeGroupsOfResidentsByDistrict):
pass
class ChildrenAgeUnder18ByDistrict(BaseModel):
year: int
district_id: int
residents: Optional[int]
class ChildrenAgeUnder18ByDistricts(ChildrenAgeUnder18ByDistrict):
pass
class ResidentsAge18ToUnder65ByDistrict(BaseModel):
year: int
district_id: int
residents: Optional[int]
class ResidentsAge18ToUnder65ByDistricts(ResidentsAge18ToUnder65ByDistrict):
pass
class ResidentsAge65AndAboveByDistrict(BaseModel):
year: int
district_id: int
residents: Optional[int]
class ResidentsAge65AndAboveByDistricts(ResidentsAge65AndAboveByDistrict):
pass
class MigrationBackgroundByDistrict(BaseModel):
year: int
district_id: int
foreign_citizenship: Optional[int]
german_citizenship: Optional[int]
class MigrationBackgroundByDistricts(MigrationBackgroundByDistrict):
pass
class NonGermanNationalsResidenceStatus(BaseModel):
year: Optional[int]
permanent_residency: Optional[int]
permanent_residency_according_eu_freedom_movement_act: Optional[int]
permanent_residency_third_country_nationality: Optional[int]
without_permanent_residency: Optional[int]
asylum_seeker: Optional[int]
suspension_of_deportation: Optional[int]
class EmployedWithPensionInsuranceByDistrict(BaseModel):
year: int
district_id: int
residents: Optional[int]
employment_rate: Optional[float]
class EmployedWithPensionInsuranceByDistricts(EmployedWithPensionInsuranceByDistrict):
pass
class UnemployedResidentsByDistrict(BaseModel):
year: int
district_id: int
residents: Optional[int]
class UnemployedResidentsByDistricts(UnemployedResidentsByDistrict):
pass
class UnemployedCategorizedResidentsByDistrict(BaseModel):
year: int
district_id: Optional[int]
unemployed_total: Optional[int]
percentage_of_total: Optional[float]
percentage_sgb_iii: Optional[float]
percentage_sgb_ii: Optional[float]
percentage_foreign_citizenship: Optional[float]
percentage_female: Optional[float]
percentage_age_under_25: Optional[float]
class UnemployedCategorizedResidentsByDistricts(UnemployedCategorizedResidentsByDistrict):
pass
class HousingBenefitByDistrict(BaseModel):
year: int
district_id: int
residents: Optional[int]
class HousingBenefitByDistricts(HousingBenefitByDistrict):
pass
class HousingAssistanceCasesByDistrict(BaseModel):
year: int
district_id: int
general_consulting: Optional[int]
notices_of_rent_arrears: Optional[int]
termination_rent_arrears: Optional[int]
termination_for_conduct: Optional[int]
action_for_eviction: Optional[int]
eviction_notice: Optional[int]
eviction_carried: Optional[int]
class HousingAssistanceCasesByDistricts(HousingAssistanceCasesByDistrict):
pass
class HouseholdsAtRiskOfHomelessnessByDistrict(BaseModel):
year: Optional[int]
district_id: int
residents: Optional[int]
class HouseholdsAtRiskOfHomelessnessByDistricts(HouseholdsAtRiskOfHomelessnessByDistrict):
pass
class BeneficiariesAge15ToUnder65ByDistrict(BaseModel):
year: int
district_id: Optional[int]
percentage_of_total_residents: Optional[float]
employable_with_benefits: Optional[int]
unemployment_benefits: Optional[int]
basic_income: Optional[int]
assisting_benefits: Optional[int]
class BeneficiariesAge15ToUnder65ByDistricts(BeneficiariesAge15ToUnder65ByDistrict):
pass
class BeneficiariesByDistrict(BaseModel):
year: int
district_id: int
residents: Optional[int]
class BeneficiariesByDistricts(BeneficiariesByDistrict):
pass
class BeneficiariesCharacteristicsByDistrict(BaseModel):
year: int
district_id: Optional[int]
unemployability: Optional[int]
employability: Optional[int]
percentage_females: Optional[float]
percentage_single_parents: Optional[float]
percentage_foreign_citizenship: Optional[float]
class BeneficiariesCharacteristicsByDistricts(BeneficiariesCharacteristicsByDistrict):
pass
class InactiveBeneficiariesInHouseholdsByDistrict(BaseModel):
year: int
district_id: int
residents: Optional[int]
class InactiveBeneficiariesInHouseholdsByDistricts(InactiveBeneficiariesInHouseholdsByDistrict):
pass
class BasicBenefitsIncomeByDistrict(BaseModel):
year: int
district_id: Optional[int]
male: Optional[int]
female: Optional[int]
age_18_to_under_65: Optional[int]
age_65_and_above: Optional[int]
class BasicBenefitsIncomeByDistricts(BasicBenefitsIncomeByDistrict):
pass
class DebtCounselingOfResidents(BaseModel):
year: int
household_type_id: Optional[int]
residents: Optional[int]
class ChildEducationSupport(BaseModel):
year: int
educational_assistance: Optional[int]
parenting_counselor: Optional[int]
pedagogical_family_assistance: Optional[int]
child_day_care_facility: Optional[int]
full_time_care: Optional[int]
residential_education: Optional[int]
integration_assistance: Optional[int]
additional_support: Optional[int]