Commit 214d62ab authored by Simantini Shinde's avatar Simantini Shinde
Browse files

Added construction_material_id field in HouseholdData table

parent bbb7a66b
Pipeline #39427 passed with stage
in 1 minute and 33 seconds
......@@ -147,6 +147,7 @@ class JapanDatabase(SpatialiteDatabase):
sql_statement += "building_type_id INTEGER, "
sql_statement += "dwelling_type_id INTEGER, "
sql_statement += "tenure_type_id INTEGER, "
sql_statement += "construction_material_id INTEGER, "
sql_statement += "number_dwelling REAL, "
sql_statement += "number_household REAL, "
sql_statement += "number_household_member REAL, "
......@@ -1257,6 +1258,9 @@ class JapanDatabase(SpatialiteDatabase):
row["Tenure of dwelling"], tenure_type_list
)
# Assign construction material as `total`
construction_material_id = constants.TOTAL
# Read relevant household data
number_dwelling = float(
str(row[constants.NUMBER_DWELLING_HOUSEHOLD]).replace("-", "0")
......@@ -1283,23 +1287,26 @@ class JapanDatabase(SpatialiteDatabase):
building_type_id,
dwelling_type_id,
tenure_type_id,
construction_material_id,
number_dwelling,
number_household,
number_household_member,
rooms_per_dwelling,
tatami_per_dwelling,
floorspace_per_dwelling,
tatami_per_person, person_per_room
tatami_per_person,
person_per_room
)
VALUES
(
%d, %d, %d, %d, %f, %f, %f, %f, %f, %f, %f, %f
%d, %d, %d, %d, %d, %f, %f, %f, %f, %f, %f, %f, %f
)
""" % (
district_id,
building_type_id,
dwelling_type_id,
tenure_type_id,
construction_material_id,
number_dwelling,
number_household,
number_household_member,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment