From fa71764ef4a170a871e6dc2f1ce7ad9f7a818c4e Mon Sep 17 00:00:00 2001 From: Anne Vandervord <72746727+AnneV-Learn@users.noreply.github.com> Date: Sun, 10 Dec 2023 16:49:38 +0000 Subject: [PATCH 1/3] Update freecen_constants.rb Amended CEN2_SCT_1861 and CEN2_SCT_1871 --- lib/freecen_constants.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/freecen_constants.rb b/lib/freecen_constants.rb index 4330c75f1..3c0f8680e 100644 --- a/lib/freecen_constants.rb +++ b/lib/freecen_constants.rb @@ -163,13 +163,11 @@ module SpecialEnumerationDistricts CEN2_SCT_1851 = LOCATION - %w[ward poor_law_union police_district sanitary_district special_water_district scavenging_district special_lighting_district school_board] + HOUSEHOLD + INDIVIDUAL + OCCUPATION - %w[industry occupation_category at_home] + BIRTH + FINAL - %w[disability_notes language] - CEN2_SCT_1861 = LOCATION - %w[poor_law_union police_district sanitary_district special_water_district scavenging_district - special_lighting_district school_board] + SCT_HOUSEHOLD + INDIVIDUAL - %w[individual_flag] + %w[school_children individual_flag] + - OCCUPATION - %w[industry occupation_category at_home] + BIRTH + FINAL - %w[disability_notes language] + CEN2_SCT_1861 = LOCATION - %w[poor_law_union police_district sanitary_district special_water_district scavenging_district special_lighting_district + school_board] + SCT_HOUSEHOLD + INDIVIDUAL + %w[school_children] + OCCUPATION - %w[industry occupation_category at_home] + BIRTH + FINAL - %w[disability_notes language] - CEN2_SCT_1871 = LOCATION - %w[poor_law_union sanitary_district special_water_district scavenging_district special_lighting_district - school_board] + SCT_HOUSEHOLD + INDIVIDUAL - %w[individual_flag] + %w[school_children individual_flag] + OCCUPATION - %w[industry - occupation_category at_home] + BIRTH + FINAL - %w[disability_notes language] + CEN2_SCT_1871 = LOCATION - %w[poor_law_union special_water_district scavenging_district special_lighting_district school_board + school_board] + SCT_HOUSEHOLD + INDIVIDUAL + %w[school_children] + OCCUPATION - %w[industry occupation_category at_home] + BIRTH + FINAL - %w[disability_notes language] CEN2_SCT_1881 = LOCATION - %w[poor_law_union sanitary_district special_water_district scavenging_district special_lighting_district] + SCT_HOUSEHOLD + INDIVIDUAL + OCCUPATION - %w[industry occupation_category at_home] + BIRTH + FINAL - %w[disability_notes] From 73332eed630b17250d0b7cb0cb2588578778e856 Mon Sep 17 00:00:00 2001 From: Anne Vandervord <72746727+AnneV-Learn@users.noreply.github.com> Date: Sun, 10 Dec 2023 17:23:49 +0000 Subject: [PATCH 2/3] Update freecen_constants.rb Update for Scotland 1891 (should include rooms_with_windows) --- lib/freecen_constants.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/freecen_constants.rb b/lib/freecen_constants.rb index 3c0f8680e..32066f2d6 100644 --- a/lib/freecen_constants.rb +++ b/lib/freecen_constants.rb @@ -173,7 +173,7 @@ module SpecialEnumerationDistricts SCT_HOUSEHOLD + INDIVIDUAL + OCCUPATION - %w[industry occupation_category at_home] + BIRTH + FINAL - %w[disability_notes] CEN2_SCT_1891 = LOCATION - %w[poor_law_union police_district sanitary_district special_water_district scavenging_district - special_lighting_district school_board] + SCT_HOUSEHOLD - %w[rooms_with_windows] + INDIVIDUAL + OCCUPATION - %w[industry + special_lighting_district school_board] + SCT_HOUSEHOLD + INDIVIDUAL + OCCUPATION - %w[industry occupation_category at_home] + BIRTH + FINAL - %w[disability_notes] CEN2_SCT_1901 = LOCATION - %w[poor_law_union sanitary_district special_water_district scavenging_district special_lighting_district] + From a25d4384c0379fecb589e701c5f0c6b51c994b2c Mon Sep 17 00:00:00 2001 From: Anne Vandervord <72746727+AnneV-Learn@users.noreply.github.com> Date: Sun, 10 Dec 2023 18:09:16 +0000 Subject: [PATCH 3/3] Update freecen1_vld_file.rb Updated for 1861, 1871, 1881 and 1891 - series = RS (Scotland) --- app/models/freecen1_vld_file.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/models/freecen1_vld_file.rb b/app/models/freecen1_vld_file.rb index 4af49d57a..93dac45e8 100644 --- a/app/models/freecen1_vld_file.rb +++ b/app/models/freecen1_vld_file.rb @@ -268,16 +268,29 @@ def convert_file_name_to_csv(year, piece, series) message = '' file = 'HS5' + '_' + piece.to_s + '.csv' census_fields = Freecen::CEN2_SCT_1851 + end + when 'RS' + success = false + message = 'Scotland Code not checked' + case year when '1861' + success = true + message = '' file = 'RS61' + '_' + piece.to_s + '.csv' census_fields = Freecen::CEN2_SCT_1861 when '1871' + success = true + message = '' file = 'RS71' + '_' + piece.to_s + '.csv' census_fields = Freecen::CEN2_SCT_1871 when '1881' + success = true + message = '' file = 'RS81' + '_' + piece.to_s + '.csv' census_fields = Freecen::CEN2_SCT_1881 when '1891' + success = true + message = '' file = 'RS91' + '_' + piece.to_s + '.csv' census_fields = Freecen::CEN2_SCT_1891 when '1901'