census_for 0.1.5 → 1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/data/2014-census-data.csv +46 -46
- data/lib/census_for.rb +12 -5
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f4d10556c60564773afcd172489cc689caa58ba
|
4
|
+
data.tar.gz: 2114be34c8fd0055758b930a7fc97fbf6a6387bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a73baf9d391561efb5b972e905ce4456861e1a36d827e4f9d7f4a131f7c9d4ef748b745c3884ba79a8dc5cca225cb911da04567c89d27f5e024a8e6a14bde4f0
|
7
|
+
data.tar.gz: b53df6813f715f8862993e20aa671ebc3f7859d44da2d381268b8947fd072d70c327dc98981d9c72b9571c7d9879d606daa6d42bd9822fa1a73ce005c1cdbfbe
|
data/data/2014-census-data.csv
CHANGED
@@ -80,7 +80,7 @@ GEO.id,GEO.id2,GEO.display-label,rescen42010,resbase42010,respop72010,respop7201
|
|
80
80
|
0500000US02122,2122,"Kenai Peninsula Borough, Alaska",55400,55400,55566,56369,56958,57067,57477
|
81
81
|
0500000US02130,2130,"Ketchikan Gateway Borough, Alaska",13477,13477,13536,13654,13709,13695,13787
|
82
82
|
0500000US02150,2150,"Kodiak Island Borough, Alaska",13592,13606,13637,13807,14075,14115,13986
|
83
|
-
0500000US02164,2164,"Lake
|
83
|
+
0500000US02164,2164,"Lake Peninsula Borough, Alaska",1631,1635,1638,1656,1643,1662,1631
|
84
84
|
0500000US02170,2170,"Matanuska-susitna Borough, Alaska",88995,88995,89783,91858,93798,95892,97882
|
85
85
|
0500000US02180,2180,"Nome Census Area, Alaska",9492,9492,9543,9844,9873,9884,9817
|
86
86
|
0500000US02185,2185,"North Slope Borough, Alaska",9430,9430,9467,9534,9655,9733,9703
|
@@ -1161,7 +1161,7 @@ r500000US02261,2261,"Valdez-cordova Census Area, Alaska",9636,9636,9678,9752,973
|
|
1161
1161
|
0500000US22089,22089,"St. Charles Parish, Louisiana",52780,52887,52868,52407,52437,52622,52745
|
1162
1162
|
0500000US22091,22091,"St. Helena Parish, Louisiana",11203,11203,11171,11014,11032,10851,10619
|
1163
1163
|
0500000US22093,22093,"St. James Parish, Louisiana",22102,22102,22030,21842,21698,21700,21638
|
1164
|
-
0500000US22095,22095,"St. John
|
1164
|
+
0500000US22095,22095,"St. John The Baptist Parish, Louisiana",45924,45817,45652,45082,44753,43619,43745
|
1165
1165
|
0500000US22097,22097,"St. Landry Parish, Louisiana",83384,83384,83500,83426,83483,83472,83709
|
1166
1166
|
0500000US22099,22099,"St. Martin Parish, Louisiana",52160,52160,52275,52863,52716,52946,53315
|
1167
1167
|
0500000US22101,22101,"St. Mary Parish, Louisiana",54650,54650,54562,54136,53526,53533,53162
|
@@ -1219,7 +1219,7 @@ r500000US02261,2261,"Valdez-cordova Census Area, Alaska",9636,9636,9678,9752,973
|
|
1219
1219
|
0500000US24043,24043,"Washington County, Maryland",147430,147430,147749,148814,149162,149266,149573
|
1220
1220
|
0500000US24045,24045,"Wicomico County, Maryland",98733,98733,98899,100010,100472,100961,101539
|
1221
1221
|
0500000US24047,24047,"Worcester County, Maryland",51454,51451,51476,51458,51588,51595,51675
|
1222
|
-
0500000US24510,24510,"Baltimore
|
1222
|
+
0500000US24510,24510,"Baltimore City, Maryland",620961,621121,621317,620889,622950,623404,622793
|
1223
1223
|
0500000US25001,25001,"Barnstable County, Massachusetts",215888,215888,215903,215335,214845,214836,214914
|
1224
1224
|
0500000US25003,25003,"Berkshire County, Massachusetts",131219,131272,131310,130575,130230,129489,128715
|
1225
1225
|
0500000US25005,25005,"Bristol County, Massachusetts",548285,548285,549076,549125,550765,552167,554194
|
@@ -1600,7 +1600,7 @@ r500000US02261,2261,"Valdez-cordova Census Area, Alaska",9636,9636,9678,9752,973
|
|
1600
1600
|
0500000US29225,29225,"Webster County, Missouri",36202,36202,36278,36302,36334,36502,36888
|
1601
1601
|
0500000US29227,29227,"Worth County, Missouri",2171,2171,2152,2123,2078,2086,2073
|
1602
1602
|
0500000US29229,29229,"Wright County, Missouri",18815,18815,18859,18635,18610,18430,18291
|
1603
|
-
0500000US29510,29510,"St. Louis
|
1603
|
+
0500000US29510,29510,"St. Louis City, Missouri",319294,319365,319258,319188,319274,318496,317419
|
1604
1604
|
0500000US30001,30001,"Beaverhead County, Montana",9246,9246,9248,9212,9356,9308,9345
|
1605
1605
|
0500000US30003,30003,"Big Horn County, Montana",12865,12865,12919,13054,13008,13134,13282
|
1606
1606
|
0500000US30005,30005,"Blaine County, Montana",6491,6491,6484,6556,6637,6582,6619
|
@@ -1625,7 +1625,7 @@ r500000US02261,2261,"Valdez-cordova Census Area, Alaska",9636,9636,9678,9752,973
|
|
1625
1625
|
0500000US30043,30043,"Jefferson County, Montana",11406,11406,11410,11450,11400,11505,11558
|
1626
1626
|
0500000US30045,30045,"Judith Basin County, Montana",2072,2072,2062,2028,2021,2011,1991
|
1627
1627
|
0500000US30047,30047,"Lake County, Montana",28746,28746,28785,29029,28999,29023,29099
|
1628
|
-
0500000US30049,30049,"Lewis
|
1628
|
+
0500000US30049,30049,"Lewis Clark County, Montana",63395,63395,63590,64237,64845,65333,65856
|
1629
1629
|
0500000US30051,30051,"Liberty County, Montana",2339,2339,2354,2382,2395,2373,2359
|
1630
1630
|
0500000US30053,30053,"Lincoln County, Montana",19687,19687,19681,19599,19469,19403,19125
|
1631
1631
|
0500000US30055,30055,"McCone County, Montana",1734,1734,1734,1708,1693,1704,1694
|
@@ -2872,7 +2872,7 @@ r500000US02261,2261,"Valdez-cordova Census Area, Alaska",9636,9636,9678,9752,973
|
|
2872
2872
|
0500000US51091,51091,"Highland County, Virginia",2321,2319,2294,2279,2249,2219,2248
|
2873
2873
|
0500000US51093,51093,"Isle Of Wight County, Virginia",35270,35270,35288,35274,35380,35643,36007
|
2874
2874
|
0500000US51095,51095,"James City County, Virginia",67009,67401,67751,68329,69532,70964,72583
|
2875
|
-
0500000US51097,51097,"King
|
2875
|
+
0500000US51097,51097,"King Queen County, Virginia",6945,6945,6970,7032,7068,7118,7175
|
2876
2876
|
0500000US51099,51099,"King George County, Virginia",23584,23584,23676,24279,24608,24950,25371
|
2877
2877
|
0500000US51101,51101,"King William County, Virginia",15935,15927,15977,15981,15977,16103,16186
|
2878
2878
|
0500000US51103,51103,"Lancaster County, Virginia",11391,11395,11369,11350,11230,11128,11044
|
@@ -2920,44 +2920,44 @@ r500000US02261,2261,"Valdez-cordova Census Area, Alaska",9636,9636,9678,9752,973
|
|
2920
2920
|
0500000US51195,51195,"Wise County, Virginia",41452,41480,41594,41384,40828,40620,39935
|
2921
2921
|
0500000US51197,51197,"Wythe County, Virginia",29235,29235,29254,29228,29351,29339,29121
|
2922
2922
|
0500000US51199,51199,"York County, Virginia",65464,65186,65198,65810,65746,65944,66342
|
2923
|
-
0500000US51510,51510,"Alexandria
|
2924
|
-
0500000US51520,51520,"Bristol
|
2925
|
-
0500000US51530,51530,"Buena Vista
|
2926
|
-
0500000US51540,51540,"Charlottesville
|
2927
|
-
0500000US51550,51550,"Chesapeake
|
2928
|
-
0500000US51570,51570,"Colonial Heights
|
2929
|
-
0500000US51580,51580,"Covington
|
2930
|
-
0500000US51590,51590,"Danville
|
2931
|
-
0500000US51595,51595,"Emporia
|
2932
|
-
0500000US51600,51600,"Fairfax
|
2933
|
-
0500000US51610,51610,"Falls Church
|
2934
|
-
0500000US51620,51620,"Franklin
|
2935
|
-
0500000US51630,51630,"Fredericksburg
|
2936
|
-
0500000US51640,51640,"Galax
|
2937
|
-
0500000US51650,51650,"Hampton
|
2923
|
+
0500000US51510,51510,"Alexandria City, Virginia",139966,140006,140829,144461,146934,149312,150575
|
2924
|
+
0500000US51520,51520,"Bristol City, Virginia",17835,17841,17855,17776,17724,17436,17184
|
2925
|
+
0500000US51530,51530,"Buena Vista City, Virginia",6650,6651,6646,6721,6768,6675,6603
|
2926
|
+
0500000US51540,51540,"Charlottesville City, Virginia",43475,43435,43546,43770,44521,45093,45593
|
2927
|
+
0500000US51550,51550,"Chesapeake City, Virginia",222209,222209,223517,225333,228188,230431,233371
|
2928
|
+
0500000US51570,51570,"Colonial Heights City, Virginia",17411,17413,17390,17369,17510,17708,17731
|
2929
|
+
0500000US51580,51580,"Covington City, Virginia",5961,5954,5955,5855,5821,5833,5802
|
2930
|
+
0500000US51590,51590,"Danville City, Virginia",43055,43066,42933,42586,42786,42770,42444
|
2931
|
+
0500000US51595,51595,"Emporia City, Virginia",5927,5927,5922,5758,5704,5565,5462
|
2932
|
+
0500000US51600,51600,"Fairfax City, Virginia",22565,22542,22604,22792,23461,24194,24483
|
2933
|
+
0500000US51610,51610,"Falls Church City, Virginia",12332,12289,12446,12720,13136,13469,13601
|
2934
|
+
0500000US51620,51620,"Franklin City, Virginia",8582,8561,8585,8431,8494,8632,8526
|
2935
|
+
0500000US51630,51630,"Fredericksburg City, Virginia",24286,24023,24192,25641,27113,27862,28350
|
2936
|
+
0500000US51640,51640,"Galax City, Virginia",7042,7042,7077,6877,6921,7014,7014
|
2937
|
+
0500000US51650,51650,"Hampton City, Virginia",137436,137508,137416,136435,136843,136948,136879
|
2938
2938
|
0500000US51660,51660,"Harrisonburg city, Virginia",48914,48907,49072,49811,51224,51518,52478
|
2939
|
-
0500000US51670,51670,"Hopewell
|
2940
|
-
0500000US51678,51678,"Lexington
|
2941
|
-
0500000US51680,51680,"Lynchburg
|
2942
|
-
0500000US51683,51683,"Manassas
|
2943
|
-
0500000US51685,51685,"Manassas Park
|
2944
|
-
0500000US51690,51690,"Martinsville
|
2945
|
-
0500000US51700,51700,"Newport News
|
2946
|
-
0500000US51710,51710,"Norfolk
|
2947
|
-
0500000US51720,51720,"Norton
|
2948
|
-
0500000US51730,51730,"Petersburg
|
2949
|
-
0500000US51735,51735,"Poquoson
|
2950
|
-
0500000US51740,51740,"Portsmouth
|
2951
|
-
0500000US51750,51750,"Radford
|
2952
|
-
0500000US51760,51760,"Richmond
|
2953
|
-
0500000US51770,51770,"Roanoke
|
2954
|
-
0500000US51775,51775,"Salem
|
2955
|
-
0500000US51790,51790,"Staunton
|
2956
|
-
0500000US51800,51800,"Suffolk
|
2957
|
-
0500000US51810,51810,"Virginia Beach
|
2958
|
-
0500000US51820,51820,"Waynesboro
|
2959
|
-
0500000US51830,51830,"Williamsburg
|
2960
|
-
0500000US51840,51840,"Winchester
|
2939
|
+
0500000US51670,51670,"Hopewell City, Virginia",22591,22591,22641,22506,22322,22209,22196
|
2940
|
+
0500000US51678,51678,"Lexington City, Virginia",7042,7038,7062,6934,7032,7232,7311
|
2941
|
+
0500000US51680,51680,"Lynchburg City, Virginia",75568,75613,75773,76813,77788,78710,79047
|
2942
|
+
0500000US51683,51683,"Manassas City, Virginia",37821,37839,38276,39358,40742,41725,42081
|
2943
|
+
0500000US51685,51685,"Manassas Park City, Virginia",14273,14241,14409,14891,15079,15409,15174
|
2944
|
+
0500000US51690,51690,"Martinsville City, Virginia",13821,13821,13740,13777,13747,13748,13711
|
2945
|
+
0500000US51700,51700,"Newport News City, Virginia",180719,180918,180989,180356,180487,182015,182965
|
2946
|
+
0500000US51710,51710,"Norfolk City, Virginia",242803,242831,242943,243723,246150,245480,245428
|
2947
|
+
0500000US51720,51720,"Norton City, Virginia",3958,3946,3964,4015,4049,4017,4031
|
2948
|
+
0500000US51730,51730,"Petersburg City, Virginia",32420,32420,32573,32159,32167,32593,32701
|
2949
|
+
0500000US51735,51735,"Poquoson City, Virginia",12150,12157,12154,12055,12134,12125,12048
|
2950
|
+
0500000US51740,51740,"Portsmouth City, Virginia",95535,95535,95495,95816,96546,96174,96004
|
2951
|
+
0500000US51750,51750,"Radford City, Virginia",16408,16408,16452,16824,16766,17277,17646
|
2952
|
+
0500000US51760,51760,"Richmond City, Virginia",204214,204246,204256,206977,211526,214704,217853
|
2953
|
+
0500000US51770,51770,"Roanoke City, Virginia",97032,96919,96812,96810,97879,98815,99428
|
2954
|
+
0500000US51775,51775,"Salem City, Virginia",24802,24848,24928,24854,25053,25282,25483
|
2955
|
+
0500000US51790,51790,"Staunton City, Virginia",23746,23746,23825,24058,23921,24318,24538
|
2956
|
+
0500000US51800,51800,"Suffolk City, Virginia",84585,84596,84881,84768,85183,85749,86806
|
2957
|
+
0500000US51810,51810,"Virginia Beach City, Virginia",437994,437966,439073,442984,445769,449308,450980
|
2958
|
+
0500000US51820,51820,"Waynesboro City, Virginia",21006,21020,21068,21094,21105,21250,21366
|
2959
|
+
0500000US51830,51830,"Williamsburg City, Virginia",14068,13673,13689,14262,14617,14745,14691
|
2960
|
+
0500000US51840,51840,"Winchester City, Virginia",26203,26203,26183,26756,27178,27497,27543
|
2961
2961
|
,,"Any, Virgin Islands",,,,,,,104737
|
2962
2962
|
0500000US53001,53001,"Adams County, Washington",18728,18728,18760,18830,18914,19073,19179
|
2963
2963
|
0500000US53003,53003,"Asotin County, Washington",21623,21623,21697,21911,21873,22104,22189
|
@@ -3072,7 +3072,7 @@ r500000US02261,2261,"Valdez-cordova Census Area, Alaska",9636,9636,9678,9752,973
|
|
3072
3072
|
0500000US55033,55033,"Dunn County, Wisconsin",43857,43857,43886,43885,43930,44221,44305
|
3073
3073
|
0500000US55035,55035,"Eau Claire County, Wisconsin",98736,98885,99018,99909,100840,101704,101564
|
3074
3074
|
0500000US55037,55037,"Florence County, Wisconsin",4423,4423,4404,4498,4472,4517,4481
|
3075
|
-
0500000US55039,55039,"Fond
|
3075
|
+
0500000US55039,55039,"Fond Du Lac County, Wisconsin",101633,101633,101645,101792,101702,101648,101759
|
3076
3076
|
0500000US55041,55041,"Forest County, Wisconsin",9304,9304,9292,9261,9183,9128,9127
|
3077
3077
|
0500000US55043,55043,"Grant County, Wisconsin",51208,51208,51187,51231,50991,51120,51829
|
3078
3078
|
0500000US55045,55045,"Green County, Wisconsin",36842,36842,36852,36972,36881,37086,37063
|
@@ -3208,8 +3208,8 @@ r500000US02261,2261,"Valdez-cordova Census Area, Alaska",9636,9636,9678,9752,973
|
|
3208
3208
|
,,"Penuelas Municipio, Puerto Rico",24282,24282,24219,23815,23317,22821,22365
|
3209
3209
|
,,"Ponce Municipio, Puerto Rico",166327,166327,165714,162977,159613,156456,153540
|
3210
3210
|
,,"Quebradillas Municipio, Puerto Rico",25919,25919,25899,25758,25550,25310,25042
|
3211
|
-
,,"
|
3212
|
-
,,"
|
3211
|
+
,,"Rincon Municipio, Puerto Rico",15200,15200,15199,15121,15009,14879,14782
|
3212
|
+
,,"Rio Grande Municipio, Puerto Rico",54304,54319,54298,53993,53807,53374,52668
|
3213
3213
|
,,"Sabana Grande Municipio, Puerto Rico",25265,25265,25250,25007,24680,24402,24121
|
3214
3214
|
,,"Salinas Municipio, Puerto Rico",31078,31078,31046,30864,30507,30233,29881
|
3215
3215
|
,,"San German Municipio, Puerto Rico",35527,35691,35629,35272,34803,34194,33725
|
data/lib/census_for.rb
CHANGED
@@ -2,7 +2,7 @@ require 'smarter_csv'
|
|
2
2
|
|
3
3
|
class CensusFor
|
4
4
|
|
5
|
-
VERSION = "
|
5
|
+
VERSION = "1.1"
|
6
6
|
|
7
7
|
STATES =
|
8
8
|
{
|
@@ -38,6 +38,11 @@ class CensusFor
|
|
38
38
|
ap: "ae"
|
39
39
|
}
|
40
40
|
|
41
|
+
SWAPOUTS = {
|
42
|
+
"saint" => "st.",
|
43
|
+
"st" => "st."
|
44
|
+
}
|
45
|
+
|
41
46
|
class CensusData
|
42
47
|
def self.data
|
43
48
|
@@data ||= load_data
|
@@ -99,11 +104,13 @@ class CensusFor
|
|
99
104
|
end
|
100
105
|
|
101
106
|
def titleize(string)
|
102
|
-
string.split.map(&:capitalize).join(' ')
|
107
|
+
string.to_s.split.map(&:capitalize).join(' ')
|
103
108
|
end
|
104
109
|
|
105
110
|
def request_to_array_minus_countystring
|
106
|
-
@request.downcase.split(/[\s,]+/)
|
111
|
+
initial_array = @request.to_s.downcase.split(/[\s,]+/)
|
112
|
+
initial_array[0] = SWAPOUTS[initial_array[0]] if SWAPOUTS[initial_array[0]]
|
113
|
+
initial_array - ["county"] - ["parish"] - ["borough"] - ["municipio"] - ["municipality"] - ["census"] - ["area"] - ["city"] - ["and"]
|
107
114
|
end
|
108
115
|
|
109
116
|
def self.population_lookup(parsed_county_state)
|
@@ -142,9 +149,9 @@ class CensusFor
|
|
142
149
|
|
143
150
|
class Abbrev
|
144
151
|
def self.converter(abbrev)
|
145
|
-
if STATES.has_value?(abbrev.downcase)
|
152
|
+
if STATES.has_value?(abbrev.to_s.downcase)
|
146
153
|
return abbrev.split.map(&:capitalize).join(' ')
|
147
|
-
elsif STATES.has_key?(abbrev.downcase.to_sym)
|
154
|
+
elsif STATES.has_key?(abbrev.to_s.downcase.to_sym)
|
148
155
|
return STATES[abbrev.downcase.to_sym].split.map(&:capitalize).join(' ')
|
149
156
|
else return nil
|
150
157
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: census_for
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: '1.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Koch
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: smarter_csv
|
@@ -80,8 +80,8 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
description: Gem returns population data for US States, Counties,
|
84
|
-
Rico, US territories.
|
83
|
+
description: 'Initial version: Gem returns population data for US States, Counties,
|
84
|
+
including Puerto Rico, US territories.'
|
85
85
|
email:
|
86
86
|
- evankoch@gmail.com
|
87
87
|
executables: []
|