diff --git a/app/assets/images/map.jpg b/app/assets/images/map.jpg index 42abdca21..0b3ad3516 100644 Binary files a/app/assets/images/map.jpg and b/app/assets/images/map.jpg differ diff --git a/db/dev_seeds.rb b/db/dev_seeds.rb index 39faa511a..3f03a8bfd 100644 --- a/db/dev_seeds.rb +++ b/db/dev_seeds.rb @@ -74,9 +74,24 @@ section "Creating Settings" do end section "Creating Geozones" do - Geozone.create(name: "city") - Geozone.create(name: "Existent District", census_code: "01") - ('A'..'Z').each { |i| Geozone.create(name: "District #{i}", external_code: i.ord, census_code: i.ord) } + Geozone.create(name: "North District", external_code: "001", census_code: "01", + html_map_coordinates: "30,139,45,153,77,148,107,165,138,201,146,218,186,198,216,"\ + "196,233,203,240,215,283,194,329,185,377,184,388,165,369,126,333,113,334,84,320,"\ + "66,286,73,258,65,265,57,249,47,207,58,159,84,108,85,72,101,51,114") + Geozone.create(name: "West District", external_code: "002", census_code: "02", + html_map_coordinates: "42,153,31,176,24,202,20,221,44,235,59,249,55,320,30,354,"\ + "31,372,52,396,64,432,89,453,116,432,149,419,162,412,165,377,172,357,189,352,228,"\ + "327,246,313,262,297,234,291,210,284,193,284,176,294,158,303,154,310,146,289,140,"\ + "268,138,246,135,236,139,222,151,214,136,197,120,179,99,159,85,149,65,149,56,149") + Geozone.create(name: "East District", external_code: "003", census_code: "03", + html_map_coordinates: "175,353,162,378,161,407,153,416,167,432,184,447,225,426,"\ + "250,409,283,390,298,369,344,363,351,334,356,296,361,267,376,245,378,185,327,188,"\ + "281,195,239,216,245,221,245,232,261,244,281,238,300,242,304,251,285,262,278,277,"\ + "267,294,249,312,219,333,198,346,184,353") + Geozone.create(name: "Central District", external_code: "004", census_code: "04", + html_map_coordinates: "152,308,137,258,133,235,147,216,152,214,186,194,210,196,"\ + "228,202,240,216,241,232,263,243,293,241,301,245,302,254,286,265,274,278,267,296,"\ + "243,293,226,289,209,285,195,283,177,297") end section "Creating Users" do diff --git a/lib/census_api.rb b/lib/census_api.rb index 4fdbd37cb..adb87f11c 100644 --- a/lib/census_api.rb +++ b/lib/census_api.rb @@ -107,7 +107,7 @@ class CensusApi datos_vivienda: { item: { codigo_postal: "28013", - codigo_distrito: "01" + codigo_distrito: %w(01 02 03 04).sample } } }