Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fc 927 sct61718191 av #2696

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions app/models/freecen1_vld_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -269,16 +269,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'
Expand Down
12 changes: 5 additions & 7 deletions lib/freecen_constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,19 +163,17 @@ 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]

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] +
Expand Down