Commit bcc094e1 authored by Simantini Shinde's avatar Simantini Shinde
Browse files

Added story_number_id in HouseholdData

parent c87c0b4f
Pipeline #39653 passed with stage
in 1 minute and 39 seconds
......@@ -152,6 +152,7 @@ class JapanDatabase(SpatialiteDatabase):
sql_statement += "dwelling_type_id INTEGER, "
sql_statement += "tenure_type_id INTEGER, "
sql_statement += "construction_material_id INTEGER, "
sql_statement += "story_number_id INTEGER, "
sql_statement += "number_dwelling REAL, "
sql_statement += "number_household REAL, "
sql_statement += "number_household_member REAL, "
......@@ -1275,6 +1276,9 @@ class JapanDatabase(SpatialiteDatabase):
# Assign construction material as `total`
construction_material_id = constants.TOTAL
# Assign story number as `total`
story_number_id = constants.TOTAL
# Read relevant household data
number_dwelling = float(
str(row[constants.NUMBER_DWELLING_HOUSEHOLD]).replace("-", "0")
......@@ -1302,6 +1306,7 @@ class JapanDatabase(SpatialiteDatabase):
dwelling_type_id,
tenure_type_id,
construction_material_id,
story_number_id,
number_dwelling,
number_household,
number_household_member,
......@@ -1313,7 +1318,7 @@ class JapanDatabase(SpatialiteDatabase):
)
VALUES
(
%d, %d, %d, %d, %d, %f, %f, %f, %f, %f, %f, %f, %f
%d, %d, %d, %d, %d, %d, %f, %f, %f, %f, %f, %f, %f, %f
)
""" % (
district_id,
......@@ -1321,6 +1326,7 @@ class JapanDatabase(SpatialiteDatabase):
dwelling_type_id,
tenure_type_id,
construction_material_id,
story_number_id,
number_dwelling,
number_household,
number_household_member,
......@@ -1352,6 +1358,7 @@ class JapanDatabase(SpatialiteDatabase):
district_id,
building_type_id,
construction_material_id,
story_number_id,
tenure_type_id,
dwelling_type_id,
number_dwelling,
......@@ -1361,6 +1368,7 @@ class JapanDatabase(SpatialiteDatabase):
SELECT H.district_id AS H_district_id,
H.building_type_id AS H_building_type_id,
DN.construction_material_id AS DN_construction_material_id,
DN.story_number_id AS DN_story_number_id,
H.tenure_type_id,
H.dwelling_type_id,
DN.number_dwelling,
......
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