diff options
| author | mo khan <mo@mokhan.ca> | 2024-05-24 11:05:18 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2024-05-24 11:05:18 -0600 |
| commit | 7c61e5700abd6226283092cd0145ae65179689be (patch) | |
| tree | b4d913a90370c76f42072480e169d3b71d0796e8 /bin | |
| parent | 9d57a0ade1f8a2fc794b2f12c5d496af130d8eff (diff) | |
Exclude non-residential communities
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/community | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/bin/community b/bin/community index a95b2c2..dafa075 100755 --- a/bin/community +++ b/bin/community @@ -185,6 +185,8 @@ class Community end class Census + include Enumerable + def initialize(path) @path = path end @@ -196,8 +198,11 @@ class Census end end -Census.new("data/Census_by_Community_2019_20240524.csv").each do |community| - community.create_directory_in("yyc") - community.create_readme -end +Census + .new("data/Census_by_Community_2019_20240524.csv") + .find_all { |x| x[:class].include?("Residential") } + .each do |community| + community.create_directory_in("yyc") + community.create_readme + end |
