From 0aef5e9b3b662dfbff1ce383c8064b4a799a40ba Mon Sep 17 00:00:00 2001 From: Brittany Date: Mon, 4 Apr 2016 09:44:11 -0700 Subject: [PATCH 1/8] Adding constructor and basic methods in python --- planet-express/PlanetExpress.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 planet-express/PlanetExpress.py diff --git a/planet-express/PlanetExpress.py b/planet-express/PlanetExpress.py new file mode 100644 index 0000000..61d7cbc --- /dev/null +++ b/planet-express/PlanetExpress.py @@ -0,0 +1,27 @@ +class PlanetExpress: + def __init__: + self.thirst = 50 + self.work = 50 + self.receipts = 50 + self.horde = 50 + self.hunger = 50 + + def drink(): + self.thirst -= 5 + self.work += 5 + + def deliver(): + self.receipts += 5 + self.work -= 5 + + def steal(): + self.horde += 5 + self.work += 5 + + def eat(): + self.hunger -= 5 + self.work += 5 + + def account(): + self.receipts -= 5 + self.horde -= 5 From 4fed17dfcf3c90eb4b53f4b56c60d3f0f428cc72 Mon Sep 17 00:00:00 2001 From: Brittany Date: Mon, 4 Apr 2016 10:24:17 -0700 Subject: [PATCH 2/8] Adding score and check methods in python --- planet-express/PlanetExpress.py | 45 +++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/planet-express/PlanetExpress.py b/planet-express/PlanetExpress.py index 61d7cbc..6043771 100644 --- a/planet-express/PlanetExpress.py +++ b/planet-express/PlanetExpress.py @@ -5,23 +5,48 @@ def __init__: self.receipts = 50 self.horde = 50 self.hunger = 50 + self.stable = True def drink(): - self.thirst -= 5 - self.work += 5 + self.thirst -= 4 + self.work += 4 def deliver(): - self.receipts += 5 - self.work -= 5 + self.receipts += 4 + self.work -= 4 def steal(): - self.horde += 5 - self.work += 5 + self.horde += 4 + self.work += 4 def eat(): - self.hunger -= 5 - self.work += 5 + self.hunger -= 4 + self.work += 4 def account(): - self.receipts -= 5 - self.horde -= 5 + self.receipts -= 4 + self.horde -= 4 + + def score(): + horde_score = self.horde * 1000 + thirst_score = self.thirst * -10 + receipts_score = self.receipts * -10 + work_score = self.work * -10 + hunger_score = self.hunger * -10 + return horde_score + thirst_score + receipts_score + work_score + hunger_score + + + def check(): + if (self.thirst >= 90 and self.thirst < 100): + print "Warning! Fry is very thirsty and is in danger of crashing the ship." + if (self.work >= 90 and self.work < 100): + print "Warning! Leela has tons of work and is in danger of crashing the ship." + if (self.horde <= 10 and self.work > 0): + print "Warning! Bender's horde is very low and is in danger of crashing the ship." + if (self.hunger >= 90 and self.hunger < 100): + print "Warning! Zoidberg is very hungry and is in danger of crashing the ship." + if (self.receipts >= 90 and self.receipts < 100): + print "Warning! Hermes' backlog of receipts is huge and is in danger of crashing the ship." + if (self.thirst < 100 and self.work < 100 and self.hunger < 100 and self.horde > 0 and self.receipts < 100): + self.stable = false + return self.stable From c9007bb7691baa9a16f87b04ae6b755beae0ceb7 Mon Sep 17 00:00:00 2001 From: Brittany Date: Mon, 4 Apr 2016 10:54:56 -0700 Subject: [PATCH 3/8] Adding basic game functionality in python --- planet-express/PlanetExpress.py | 40 ++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/planet-express/PlanetExpress.py b/planet-express/PlanetExpress.py index 6043771..d16a98c 100644 --- a/planet-express/PlanetExpress.py +++ b/planet-express/PlanetExpress.py @@ -1,5 +1,5 @@ class PlanetExpress: - def __init__: + def __init__(self): self.thirst = 50 self.work = 50 self.receipts = 50 @@ -7,27 +7,27 @@ def __init__: self.hunger = 50 self.stable = True - def drink(): + def drink(self): self.thirst -= 4 self.work += 4 - def deliver(): + def deliver(self): self.receipts += 4 self.work -= 4 - def steal(): + def steal(self): self.horde += 4 self.work += 4 - def eat(): + def eat(self): self.hunger -= 4 self.work += 4 - def account(): + def account(self): self.receipts -= 4 self.horde -= 4 - def score(): + def score(self): horde_score = self.horde * 1000 thirst_score = self.thirst * -10 receipts_score = self.receipts * -10 @@ -36,7 +36,7 @@ def score(): return horde_score + thirst_score + receipts_score + work_score + hunger_score - def check(): + def check(self): if (self.thirst >= 90 and self.thirst < 100): print "Warning! Fry is very thirsty and is in danger of crashing the ship." if (self.work >= 90 and self.work < 100): @@ -47,6 +47,26 @@ def check(): print "Warning! Zoidberg is very hungry and is in danger of crashing the ship." if (self.receipts >= 90 and self.receipts < 100): print "Warning! Hermes' backlog of receipts is huge and is in danger of crashing the ship." - if (self.thirst < 100 and self.work < 100 and self.hunger < 100 and self.horde > 0 and self.receipts < 100): - self.stable = false + if (self.thirst > 100 or self.work > 100 or self.hunger > 100 or self.horde <= 0 or self.receipts > 100): + self.stable = False return self.stable + +p = PlanetExpress() +print "Welcome to Planet Express!" +while p.stable: + action = raw_input("Type drink, deliver, steal, eat, or account to continue playing.") + if action == "drink": + p.drink() + elif action == "deliver": + p.deliver() + elif action == "steal": + p.steal() + elif action == "eat": + p.eat() + elif action == "account": + p.account() + else: + print "That's not a valid choice. Try again." + print "Score: {}".format(p.score()) + if not p.check(): + print "GAME OVER" From a078aa76f4b313c6b10855549156978bab25013a Mon Sep 17 00:00:00 2001 From: Brittany Date: Mon, 4 Apr 2016 11:11:35 -0700 Subject: [PATCH 4/8] Adding new line to input --- planet-express/PlanetExpress.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/planet-express/PlanetExpress.py b/planet-express/PlanetExpress.py index d16a98c..aa6f53c 100644 --- a/planet-express/PlanetExpress.py +++ b/planet-express/PlanetExpress.py @@ -29,10 +29,10 @@ def account(self): def score(self): horde_score = self.horde * 1000 - thirst_score = self.thirst * -10 - receipts_score = self.receipts * -10 - work_score = self.work * -10 - hunger_score = self.hunger * -10 + thirst_score = self.thirst * -20 + receipts_score = self.receipts * -30 + work_score = self.work * -20 + hunger_score = self.hunger * -15 return horde_score + thirst_score + receipts_score + work_score + hunger_score @@ -54,7 +54,10 @@ def check(self): p = PlanetExpress() print "Welcome to Planet Express!" while p.stable: - action = raw_input("Type drink, deliver, steal, eat, or account to continue playing.") + action = raw_input("Type drink, deliver, steal, eat, or account to continue playing.\n") + while action.lower() != "drink" and action.lower() != "deliver" and action.lower() != "steal" and action.lower() != "eat" and action.lower() != "account": + print "That's not a valid choice. Try again." + action = raw_input("Type drink, deliver, steal, eat, or account to continue playing.\n") if action == "drink": p.drink() elif action == "deliver": @@ -65,8 +68,6 @@ def check(self): p.eat() elif action == "account": p.account() - else: - print "That's not a valid choice. Try again." print "Score: {}".format(p.score()) if not p.check(): print "GAME OVER" From 5bf2db46d9466ca730a4f71a1c45401b2568313e Mon Sep 17 00:00:00 2001 From: Brittany Date: Wed, 6 Apr 2016 09:13:22 -0700 Subject: [PATCH 5/8] Adding java files --- planet-express/PlanetExpress/.classpath | 6 + planet-express/PlanetExpress/.project | 17 +++ .../.settings/org.eclipse.jdt.core.prefs | 11 ++ .../bin/planet/PlanetExpress.class | Bin 0 -> 3298 bytes .../src/planet/PlanetExpress.java | 110 ++++++++++++++++++ 5 files changed, 144 insertions(+) create mode 100644 planet-express/PlanetExpress/.classpath create mode 100644 planet-express/PlanetExpress/.project create mode 100644 planet-express/PlanetExpress/.settings/org.eclipse.jdt.core.prefs create mode 100644 planet-express/PlanetExpress/bin/planet/PlanetExpress.class create mode 100644 planet-express/PlanetExpress/src/planet/PlanetExpress.java diff --git a/planet-express/PlanetExpress/.classpath b/planet-express/PlanetExpress/.classpath new file mode 100644 index 0000000..fceb480 --- /dev/null +++ b/planet-express/PlanetExpress/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/planet-express/PlanetExpress/.project b/planet-express/PlanetExpress/.project new file mode 100644 index 0000000..4213e5a --- /dev/null +++ b/planet-express/PlanetExpress/.project @@ -0,0 +1,17 @@ + + + PlanetExpress + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/planet-express/PlanetExpress/.settings/org.eclipse.jdt.core.prefs b/planet-express/PlanetExpress/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..3a21537 --- /dev/null +++ b/planet-express/PlanetExpress/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/planet-express/PlanetExpress/bin/planet/PlanetExpress.class b/planet-express/PlanetExpress/bin/planet/PlanetExpress.class new file mode 100644 index 0000000000000000000000000000000000000000..5352cfa4b85de1ea21a4536a14bfa73cff8468f7 GIT binary patch literal 3298 zcma)8+jA4w9sbsqkt`MvvLs~L&?ODAEqo!6nj{7naBO2DgM%DXJ2$Ua2WhdqtE^Ul zdrL1#o3`ogtzkNuX~>K_(>x>$Hks1NbJ|H>`v-K|nLgyDGkxhaZStM7vcN&i0OLL1 zx%|HKyPlu^^8Y`62;edNI*b+#iAvdYgg-Q+hViQvPgJX6gfzr1nU~EWE*FQ+EnO0p zuVI^Cvb`#SHl-nS#r2joL_A>$yW&?hw3S@1Ab6})bBe+vsQTtonJd}?C&z5Z_D40e z_V&$De9SF~C|a>w#}4dlhlUOvZP+GJQb#yIdvrts)TyIAKwUbb0oto$J9G`Za<(JR z)>f8;Hyhj-&$*Uao-;jL&g+XI>Q6mWxn@R>P^T5scDUdBT<(tXdEc|0;z-|Il#1FQuARQNAb9Z z7HQ@k6{nm^ZBxZ4j^Ifd68a-u=cgKXAL*Nm;JAhpv#S+h6sXK{zflln`?B!*4SK>X z_Z!0W`wiDKOv`d>jxTMsT*tSanlR}7Rl0OgUiEbyCvcLkcf?h?Ez#R|uSpS%X*e)j zGX0*a;kdqG8kfzoT`;VYYg=N_nDtf-v&h(yavYOkOl%F0ilC0u@}lj&n{%%SZ_KQU z2+lBTl?75Tr(+stnW^ICnptL|Z1HbU1S5S55zH_Mb%P@~PYPvp1hb4j4Ud5N9j;q0 zv*sH*&S0lR3p!>3^t_Jq0eVr#Y=9PZ%wcC3OB(ikIRQ`A>~cYP5fsRsw_Hy=X+&Y- zqKwsH$z9T6RvC``A4KgMaRq1R}tS0vR~3y zb@-@}-YN-;h0ijkE3Rm0pFBA|Zk(GNrzb+DSES=QniLRUfeMvi9ncIO3F3TrhBD*Y zY?+E0;`e5Oh8=m|w3esMO1+$;>b+6Eka1OSQ+>8$^Hr+P+vQ`mc`|sO)GUG@X&Ad; zdJYqEzcIl?va1FYdDRH`m{?9huGx-J;9Dp>!@X!&o>?tXf`^1bR2humbqx~@qMQ(A z(5-8uAUY)52R3)gEJsktw@HY3ZixC4Z?_6c0$OA)0q5! zNf6ARTZ1tWmn6abg*C(m;))1i%D+UdZo{09Tel!MFK%FY11{C&#Jh&=QtQiddK2B( zKJSwLY*qer&_$f4S3Bv+3_aMz^=`JRy*NlTNDmIvhoki180STL_Z2*h*Kq)E@YHYU z@!z5szi01#7g>BjsXw6~A7KC=V+jAiA$-cV`EPRnmp^)BY_fs>aTTkaMY#7(m0A1n zS9}ZKW~2||&-f0$OC4X~i7rGxLq{0e|BwmeNEqXZkzM?!|A&{eP#bAANdcKw$?W`1 z#KQ%dRz!*L;yMy{a%iW@;iJr-$C1DjcjZg6o-dkg5<$LT3u#JHrS4C9jHJg&I@*+! z{iYddT9T&kPkNH1r${>1l$5Qj8EHnEpSeHj1W6}Jdb%koyI?cYlq6N=rzJ{%*{4sF zG)L0urlf3+b<#D)SiTNNvp136-TKecF@kvP)6#K{so392qZ|{Q4~Gacv453@+q$|J z_bw(wi^;adcPSb?2N^{(!vcSXkHC2*ah{1f%LIB>sW2K`Qx9u9)A@T`;jc5M?)QmW zD6tPeAZn#t5Bz_XCXJU1UOhe*l!A@#(C)L>bd9V|Y6|Uoex{jcmfWp_&L6Ck6 zItPlpgGjcOuP0~S(q%!#5A*c|=J{SOuqK~pt-ipzd= 90 && thirst < 100) { + System.out.println("Warning! Fry is very thirsty and is in danger of crashing the ship."); + } + if (work >= 90 && work < 100) { + System.out.println("Warning! Leela has tons of work and is in danger of crashing the ship."); + } + if (horde <= 10 && work > 0) { + System.out.println("Warning! Bender's horde is very low and is in danger of crashing the ship."); + } + if (hunger >= 90 && hunger < 100) { + System.out.println("Warning! Zoidberg is very hungry and is in danger of crashing the ship."); + } + if (receipts >= 90 && receipts < 100) { + System.out.println("Warning! Hermes' backlog of receipts is huge and is in danger of crashing the ship."); + } + if (thirst > 100 || work > 100 || hunger > 100 || horde <= 0 || receipts > 100) { + stable = false; + } + return stable; + } + +} From e4501bf1df2cb5ff55970c9b1a0e7a99f9a258b9 Mon Sep 17 00:00:00 2001 From: Brittany Date: Wed, 6 Apr 2016 16:53:32 -0700 Subject: [PATCH 6/8] Adding initial attempt at saving highest and lowest poverty data, needs to be reworked --- OR_data.txt | 37 +++++++++++++++++++++++++++++++++++++ poverty/WA_data.txt | 40 ++++++++++++++++++++++++++++++++++++++++ poverty/poverty.py | 28 ++++++++++++++++++++++++++++ 3 files changed, 105 insertions(+) create mode 100644 OR_data.txt create mode 100644 poverty/WA_data.txt create mode 100644 poverty/poverty.py diff --git a/OR_data.txt b/OR_data.txt new file mode 100644 index 0000000..b5eff9a --- /dev/null +++ b/OR_data.txt @@ -0,0 +1,37 @@ +41 0 637156 621361 652951 16.4 16.0 16.8 179110 171930 186290 21.3 20.4 22.2 117394 111176 123612 19.3 18.3 20.3 51088 50607 51569 56119 52798 59440 25.0 23.5 26.5 Oregon OR est14_OR.txt 06NOV2015 +41 1 3232 2646 3818 20.6 16.9 24.3 897 706 1088 29.2 23.0 35.4 623 489 757 28.3 22.2 34.4 38966 35475 42457 Baker County OR est14_OR.txt 06NOV2015 +41 3 15545 14152 16938 18.9 17.2 20.6 1864 1391 2337 13.0 9.7 16.3 1349 1001 1697 12.6 9.3 15.9 54089 49559 58619 Benton County OR est14_OR.txt 06NOV2015 +41 5 37450 32707 42193 9.5 8.3 10.7 10896 8848 12944 12.6 10.2 15.0 7530 6063 8997 11.5 9.3 13.7 65555 62792 68318 Clackamas County OR est14_OR.txt 06NOV2015 +41 7 5672 4567 6777 15.4 12.4 18.4 1621 1243 1999 22.7 17.4 28.0 1059 798 1320 20.6 15.5 25.7 45132 41123 49141 Clatsop County OR est14_OR.txt 06NOV2015 +41 9 5880 4714 7046 12.0 9.6 14.4 1817 1396 2238 16.8 12.9 20.7 1222 925 1519 14.8 11.2 18.4 57517 52697 62337 Columbia County OR est14_OR.txt 06NOV2015 +41 11 12144 10076 14212 19.8 16.4 23.2 3354 2614 4094 30.1 23.5 36.7 2322 1783 2861 28.9 22.2 35.6 39956 37328 42584 Coos County OR est14_OR.txt 06NOV2015 +41 13 3809 3115 4503 18.3 15.0 21.6 1079 832 1326 27.2 21.0 33.4 721 549 893 23.6 18.0 29.2 38155 34688 41622 Crook County OR est14_OR.txt 06NOV2015 +41 15 3780 3027 4533 17.1 13.7 20.5 858 643 1073 25.3 19.0 31.6 600 445 755 24.7 18.3 31.1 40524 37448 43600 Curry County OR est14_OR.txt 06NOV2015 +41 17 22298 19233 25363 13.2 11.4 15.0 6345 4973 7717 17.8 14.0 21.6 4479 3445 5513 16.8 12.9 20.7 52387 49264 55510 Deschutes County OR est14_OR.txt 06NOV2015 +41 19 21001 18102 23900 19.9 17.2 22.6 5769 4674 6864 28.5 23.1 33.9 3793 2976 4610 25.7 20.2 31.2 41504 39033 43975 Douglas County OR est14_OR.txt 06NOV2015 +41 21 223 170 276 11.7 8.9 14.5 75 56 94 20.1 15.1 25.1 52 39 65 20.8 15.4 26.2 51978 46849 57107 Gilliam County OR est14_OR.txt 06NOV2015 +41 23 1190 925 1455 16.8 13.1 20.5 355 268 442 27.1 20.4 33.8 241 179 303 24.8 18.4 31.2 41304 37034 45574 Grant County OR est14_OR.txt 06NOV2015 +41 25 1489 1216 1762 21.3 17.4 25.2 434 347 521 31.6 25.3 37.9 270 205 335 26.9 20.4 33.4 36340 32642 40038 Harney County OR est14_OR.txt 06NOV2015 +41 27 3298 2675 3921 14.6 11.8 17.4 1108 859 1357 20.1 15.6 24.6 727 551 903 18.1 13.7 22.5 54063 49516 58610 Hood River County OR est14_OR.txt 06NOV2015 +41 29 37566 33104 42028 18.1 16.0 20.2 11174 9332 13016 25.9 21.6 30.2 6951 5552 8350 22.3 17.8 26.8 44835 42373 47297 Jackson County OR est14_OR.txt 06NOV2015 +41 31 4513 3614 5412 21.2 17.0 25.4 1695 1319 2071 32.2 25.1 39.3 1138 872 1404 30.2 23.1 37.3 42753 39284 46222 Jefferson County OR est14_OR.txt 06NOV2015 +41 33 16921 14086 19756 20.6 17.2 24.0 5188 4185 6191 33.3 26.9 39.7 3453 2723 4183 30.2 23.8 36.6 37230 34074 40386 Josephine County OR est14_OR.txt 06NOV2015 +41 35 14092 12297 15887 21.9 19.1 24.7 4004 3246 4762 29.1 23.6 34.6 2613 2034 3192 26.6 20.7 32.5 39234 36331 42137 Klamath County OR est14_OR.txt 06NOV2015 +41 37 1429 1105 1753 19.3 14.9 23.7 406 308 504 28.3 21.5 35.1 273 202 344 24.9 18.5 31.3 40328 36280 44376 Lake County OR est14_OR.txt 06NOV2015 +41 39 64722 59856 69588 18.4 17.0 19.8 13379 10867 15891 20.1 16.3 23.9 8316 6528 10104 17.0 13.4 20.6 44976 42967 46985 Lane County OR est14_OR.txt 06NOV2015 +41 41 8628 7219 10037 18.8 15.7 21.9 2320 1840 2800 30.3 24.0 36.6 1601 1262 1940 30.0 23.6 36.4 40226 37101 43351 Lincoln County OR est14_OR.txt 06NOV2015 +41 43 22559 19999 25119 19.1 16.9 21.3 7215 6104 8326 26.8 22.7 30.9 4876 4083 5669 24.9 20.8 29.0 44358 41159 47557 Linn County OR est14_OR.txt 06NOV2015 +41 45 7756 6587 8925 28.7 24.4 33.0 2891 2409 3373 38.3 31.9 44.7 2016 1666 2366 37.4 30.9 43.9 35094 31618 38570 Malheur County OR est14_OR.txt 06NOV2015 +41 47 56064 49829 62299 17.7 15.7 19.7 20377 17489 23265 25.1 21.5 28.7 13302 11118 15486 22.6 18.9 26.3 48554 46347 50761 Marion County OR est14_OR.txt 06NOV2015 +41 49 1824 1452 2196 16.3 13.0 19.6 694 532 856 22.3 17.1 27.5 465 349 581 20.2 15.2 25.2 51839 46569 57109 Morrow County OR est14_OR.txt 06NOV2015 +41 51 141562 132955 150169 18.6 17.5 19.7 34845 30895 38795 23.2 20.6 25.8 21859 19012 24706 21.0 18.3 23.7 53519 51700 55338 Multnomah County OR est14_OR.txt 06NOV2015 +41 53 10721 8883 12559 14.1 11.7 16.5 3052 2309 3795 17.2 13.0 21.4 2047 1526 2568 15.5 11.6 19.4 52626 49042 56210 Polk County OR est14_OR.txt 06NOV2015 +41 55 241 184 298 14.2 10.8 17.6 70 53 87 23.4 17.6 29.2 48 35 61 20.3 15.0 25.6 53277 47661 58893 Sherman County OR est14_OR.txt 06NOV2015 +41 57 4347 3567 5127 17.5 14.4 20.6 1213 946 1480 25.9 20.2 31.6 764 571 957 23.0 17.2 28.8 41662 38375 44949 Tillamook County OR est14_OR.txt 06NOV2015 +41 59 13041 10920 15162 18.0 15.1 20.9 4894 3987 5801 25.2 20.5 29.9 3228 2583 3873 23.2 18.6 27.8 44780 41922 47638 Umatilla County OR est14_OR.txt 06NOV2015 +41 61 4418 3706 5130 17.7 14.8 20.6 1219 956 1482 22.0 17.3 26.7 841 660 1022 21.1 16.6 25.6 44841 41885 47797 Union County OR est14_OR.txt 06NOV2015 +41 63 1063 830 1296 15.8 12.3 19.3 319 245 393 26.1 20.0 32.2 215 164 266 24.6 18.7 30.5 39743 35852 43634 Wallowa County OR est14_OR.txt 06NOV2015 +41 65 4192 3403 4981 16.8 13.6 20.0 1299 970 1628 23.4 17.5 29.3 912 675 1149 22.8 16.9 28.7 44010 39913 48107 Wasco County OR est14_OR.txt 06NOV2015 +41 67 69403 63990 74816 12.5 11.5 13.5 21559 19144 23974 16.0 14.2 17.8 14247 12477 16017 14.5 12.7 16.3 66315 63653 68977 Washington County OR est14_OR.txt 06NOV2015 +41 69 315 249 381 23.3 18.4 28.2 83 63 103 39.5 30.1 48.9 57 43 71 37.7 28.4 47.0 33387 29800 36974 Wheeler County OR est14_OR.txt 06NOV2015 +41 71 14772 12562 16982 15.4 13.1 17.7 4744 3919 5569 20.5 16.9 24.1 3184 2576 3792 18.4 14.9 21.9 52903 49406 56400 Yamhill County OR est14_OR.txt 06NOV2015 diff --git a/poverty/WA_data.txt b/poverty/WA_data.txt new file mode 100644 index 0000000..77bb19a --- /dev/null +++ b/poverty/WA_data.txt @@ -0,0 +1,40 @@ +53 0 913463 895355 931571 13.2 12.9 13.5 275662 265882 285442 17.5 16.9 18.1 180464 171990 188938 16.0 15.2 16.8 61358 60882 61834 85453 80800 90106 19.6 18.5 20.7 Washington WA est14_WA.txt 06NOV2015 +53 1 3598 2947 4249 19.0 15.6 22.4 1816 1477 2155 27.1 22.0 32.2 1152 903 1401 24.7 19.4 30.0 47423 42474 52372 Adams County WA est14_WA.txt 06NOV2015 +53 3 3573 2849 4297 16.3 13.0 19.6 1104 846 1362 24.2 18.5 29.9 723 546 900 21.5 16.2 26.8 44055 39944 48166 Asotin County WA est14_WA.txt 06NOV2015 +53 5 26893 23628 30158 14.6 12.8 16.4 10421 8839 12003 21.3 18.1 24.5 6754 5615 7893 19.0 15.8 22.2 58750 56072 61428 Benton County WA est14_WA.txt 06NOV2015 +53 7 10298 8470 12126 14.0 11.5 16.5 3588 2774 4402 20.2 15.6 24.8 2436 1839 3033 19.2 14.5 23.9 49174 45028 53320 Chelan County WA est14_WA.txt 06NOV2015 +53 9 11518 9848 13188 16.2 13.8 18.6 3267 2671 3863 26.2 21.4 31.0 2025 1593 2457 22.3 17.5 27.1 47185 43543 50827 Clallam County WA est14_WA.txt 06NOV2015 +53 11 44213 38703 49723 9.9 8.7 11.1 15179 12259 18099 13.6 11.0 16.2 10647 8436 12858 12.8 10.2 15.4 61747 60396 63098 Clark County WA est14_WA.txt 06NOV2015 +53 13 607 469 745 15.5 12.0 19.0 190 145 235 25.7 19.6 31.8 130 98 162 22.0 16.6 27.4 45465 41255 49675 Columbia County WA est14_WA.txt 06NOV2015 +53 15 20701 18425 22977 20.6 18.3 22.9 6118 5100 7136 26.8 22.3 31.3 3909 3166 4652 23.1 18.7 27.5 44235 41355 47115 Cowlitz County WA est14_WA.txt 06NOV2015 +53 17 6120 4978 7262 15.5 12.6 18.4 2507 1974 3040 24.4 19.2 29.6 1712 1339 2085 22.7 17.8 27.6 51151 47257 55045 Douglas County WA est14_WA.txt 06NOV2015 +53 19 1700 1392 2008 22.4 18.3 26.5 403 316 490 29.1 22.8 35.4 264 205 323 25.9 20.1 31.7 39992 36038 43946 Ferry County WA est14_WA.txt 06NOV2015 +53 21 14661 12404 16918 17.3 14.6 20.0 7214 6027 8401 24.9 20.8 29.0 4533 3611 5455 22.4 17.8 27.0 55006 51191 58821 Franklin County WA est14_WA.txt 06NOV2015 +53 23 310 240 380 14.2 11.0 17.4 91 70 112 20.7 15.8 25.6 60 45 75 17.4 13.1 21.7 46404 41508 51300 Garfield County WA est14_WA.txt 06NOV2015 +53 25 14508 11796 17220 15.8 12.8 18.8 5766 4441 7091 20.9 16.1 25.7 3918 2983 4853 20.0 15.2 24.8 50388 47611 53165 Grant County WA est14_WA.txt 06NOV2015 +53 27 13322 11257 15387 19.6 16.6 22.6 4146 3376 4916 28.6 23.3 33.9 2760 2199 3321 26.3 21.0 31.6 43205 40965 45445 Grays Harbor County WA est14_WA.txt 06NOV2015 +53 29 7964 6639 9289 10.3 8.6 12.0 2267 1801 2733 15.4 12.2 18.6 1514 1190 1838 14.7 11.6 17.8 59358 55827 62889 Island County WA est14_WA.txt 06NOV2015 +53 31 4183 3445 4921 14.1 11.6 16.6 972 770 1174 24.5 19.4 29.6 643 502 784 21.8 17.0 26.6 50964 46641 55287 Jefferson County WA est14_WA.txt 06NOV2015 +53 33 230750 218081 243419 11.3 10.7 11.9 58351 52757 63945 13.6 12.3 14.9 38527 34470 42584 12.8 11.5 14.1 75738 74417 77059 King County WA est14_WA.txt 06NOV2015 +53 35 27550 23819 31281 11.2 9.7 12.7 7473 6103 8843 14.4 11.8 17.0 4593 3607 5579 12.2 9.6 14.8 61898 59584 64212 Kitsap County WA est14_WA.txt 06NOV2015 +53 37 7459 6329 8589 18.6 15.8 21.4 1410 1105 1715 18.7 14.7 22.7 953 742 1164 17.6 13.7 21.5 48127 44926 51328 Kittitas County WA est14_WA.txt 06NOV2015 +53 39 3029 2365 3693 14.6 11.4 17.8 935 713 1157 22.6 17.2 28.0 641 481 801 20.9 15.7 26.1 49348 44723 53973 Klickitat County WA est14_WA.txt 06NOV2015 +53 41 12695 10463 14927 17.1 14.1 20.1 3912 3075 4749 24.5 19.3 29.7 2600 2017 3183 22.3 17.3 27.3 44243 40710 47776 Lewis County WA est14_WA.txt 06NOV2015 +53 43 1274 1002 1546 12.5 9.8 15.2 392 303 481 17.7 13.7 21.7 269 207 331 15.7 12.1 19.3 49955 45180 54730 Lincoln County WA est14_WA.txt 06NOV2015 +53 45 9040 7636 10444 15.6 13.2 18.0 2660 2093 3227 23.6 18.6 28.6 1805 1406 2204 22.4 17.4 27.4 52313 49305 55321 Mason County WA est14_WA.txt 06NOV2015 +53 47 9427 8024 10830 23.2 19.8 26.6 2969 2411 3527 31.5 25.6 37.4 1992 1578 2406 29.5 23.4 35.6 37782 34745 40819 Okanogan County WA est14_WA.txt 06NOV2015 +53 49 3606 2929 4283 17.8 14.5 21.1 965 775 1155 28.8 23.1 34.5 674 538 810 28.0 22.4 33.6 40189 36441 43937 Pacific County WA est14_WA.txt 06NOV2015 +53 51 2868 2398 3338 22.3 18.6 26.0 842 665 1019 33.1 26.2 40.0 588 463 713 30.2 23.8 36.6 42579 38373 46785 Pend Oreille County WA est14_WA.txt 06NOV2015 +53 53 106432 97890 114974 13.1 12.1 14.1 34165 30111 38219 17.5 15.4 19.6 22439 19462 25416 16.2 14.1 18.3 60397 58946 61848 Pierce County WA est14_WA.txt 06NOV2015 +53 55 2018 1729 2307 12.7 10.9 14.5 437 351 523 19.6 15.7 23.5 290 227 353 16.7 13.1 20.3 54721 50513 58929 San Juan County WA est14_WA.txt 06NOV2015 +53 57 18627 16409 20845 15.7 13.8 17.6 6124 5231 7017 23.2 19.8 26.6 3765 3106 4424 19.8 16.3 23.3 51395 48709 54081 Skagit County WA est14_WA.txt 06NOV2015 +53 59 1421 1099 1743 12.6 9.7 15.5 467 353 581 20.1 15.2 25.0 316 235 397 17.5 13.0 22.0 52673 47473 57873 Skamania County WA est14_WA.txt 06NOV2015 +53 61 73930 66931 80929 9.9 9.0 10.8 22598 19490 25706 13.1 11.3 14.9 14401 12105 16697 11.5 9.7 13.3 71890 70201 73579 Snohomish County WA est14_WA.txt 06NOV2015 +53 63 76910 70461 83359 16.3 14.9 17.7 21892 18858 24926 20.5 17.7 23.3 13976 11760 16192 18.2 15.3 21.1 50083 48190 51976 Spokane County WA est14_WA.txt 06NOV2015 +53 65 8368 7255 9481 19.3 16.7 21.9 2668 2169 3167 28.2 22.9 33.5 1773 1413 2133 24.5 19.5 29.5 43823 40849 46797 Stevens County WA est14_WA.txt 06NOV2015 +53 67 31197 27796 34598 11.9 10.6 13.2 9031 7502 10560 15.6 13.0 18.2 5706 4551 6861 13.7 10.9 16.5 61653 59047 64259 Thurston County WA est14_WA.txt 06NOV2015 +53 69 558 431 685 13.9 10.7 17.1 184 141 227 26.7 20.4 33.0 130 98 162 24.3 18.3 30.3 51022 48377 53667 Wahkiakum County WA est14_WA.txt 06NOV2015 +53 71 8682 7030 10334 15.7 12.7 18.7 2654 2046 3262 20.8 16.0 25.6 1762 1341 2183 19.1 14.6 23.6 49819 46459 53179 Walla Walla County WA est14_WA.txt 06NOV2015 +53 73 31842 28461 35223 15.7 14.0 17.4 7304 6146 8462 17.7 14.9 20.5 4888 4054 5722 16.4 13.6 19.2 53733 51153 56313 Whatcom County WA est14_WA.txt 06NOV2015 +53 75 11567 10634 12500 28.4 26.1 30.7 1181 938 1424 16.7 13.3 20.1 704 529 879 14.6 11.0 18.2 41837 37907 45767 Whitman County WA est14_WA.txt 06NOV2015 +53 77 50044 45009 55079 20.5 18.4 22.6 22000 19457 24543 30.3 26.8 33.8 14492 12596 16388 28.0 24.3 31.7 44342 42101 46583 Yakima County WA est14_WA.txt 06NOV2015 diff --git a/poverty/poverty.py b/poverty/poverty.py new file mode 100644 index 0000000..a5b5521 --- /dev/null +++ b/poverty/poverty.py @@ -0,0 +1,28 @@ + + +highest_percent_poverty_county = "" +highest_percent_poverty = 0 +lowest_percent_poverty_county = "" +lowest_percent_poverty = 100 +county_dict = {} + +f = open('./WA_data.txt') +for line in f: + if line[3:6].strip != "0": # To exclude the overall state data + count_poverty = line[52:58].strip() + percent_poverty = float(line[77:80]) + median_income = line[135:140].strip() + county_name = line[193:238].strip() + + + if percent_poverty > highest_percent_poverty: + highest_percent_poverty = percent_poverty + highest_percent_poverty_county = county_name + elif percent_poverty < lowest_percent_poverty: + lowest_percent_poverty = percent_poverty + lowest_percent_poverty_county = county_name + + county_dict[county_name] = {'count_poverty': count_poverty, 'percent_poverty': percent_poverty, 'median_income': median_income} + +while True: + print "The highest percent of poverty is {} in {}".format(highest_percent_poverty, highest_percent_poverty_county) From ac74703d27a6e7ba65cc7b497e71d152d19bcf86 Mon Sep 17 00:00:00 2001 From: Brittany Date: Thu, 7 Apr 2016 10:29:22 -0700 Subject: [PATCH 7/8] Fixed line numbers to get correct data --- poverty/poverty.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/poverty/poverty.py b/poverty/poverty.py index a5b5521..1089ac9 100644 --- a/poverty/poverty.py +++ b/poverty/poverty.py @@ -8,13 +8,12 @@ f = open('./WA_data.txt') for line in f: - if line[3:6].strip != "0": # To exclude the overall state data + if line[3:6].strip() != "0": # To exclude the overall state data count_poverty = line[52:58].strip() - percent_poverty = float(line[77:80]) + percent_poverty = float(line[76:80]) median_income = line[135:140].strip() county_name = line[193:238].strip() - if percent_poverty > highest_percent_poverty: highest_percent_poverty = percent_poverty highest_percent_poverty_county = county_name @@ -24,5 +23,6 @@ county_dict[county_name] = {'count_poverty': count_poverty, 'percent_poverty': percent_poverty, 'median_income': median_income} -while True: - print "The highest percent of poverty is {} in {}".format(highest_percent_poverty, highest_percent_poverty_county) + +print "The highest percent of children in poverty is {}% in {}".format(highest_percent_poverty, highest_percent_poverty_county) +print "The count of children in poverty is {} and the median income is ${}".format(county_dict[highest_percent_poverty_county]['count_poverty'], county_dict[highest_percent_poverty_county]['median_income']) From 65645e466c079047560666de8b1155a42d68926d Mon Sep 17 00:00:00 2001 From: Brittany Date: Thu, 7 Apr 2016 15:43:28 -0700 Subject: [PATCH 8/8] Moving OR file, adding function to get poverty data --- poverty/OR_data.txt | 37 +++++++++++++++++++++++++++++++++ poverty/poverty.py | 50 ++++++++++++++++++++++++++------------------- 2 files changed, 66 insertions(+), 21 deletions(-) create mode 100644 poverty/OR_data.txt diff --git a/poverty/OR_data.txt b/poverty/OR_data.txt new file mode 100644 index 0000000..b5eff9a --- /dev/null +++ b/poverty/OR_data.txt @@ -0,0 +1,37 @@ +41 0 637156 621361 652951 16.4 16.0 16.8 179110 171930 186290 21.3 20.4 22.2 117394 111176 123612 19.3 18.3 20.3 51088 50607 51569 56119 52798 59440 25.0 23.5 26.5 Oregon OR est14_OR.txt 06NOV2015 +41 1 3232 2646 3818 20.6 16.9 24.3 897 706 1088 29.2 23.0 35.4 623 489 757 28.3 22.2 34.4 38966 35475 42457 Baker County OR est14_OR.txt 06NOV2015 +41 3 15545 14152 16938 18.9 17.2 20.6 1864 1391 2337 13.0 9.7 16.3 1349 1001 1697 12.6 9.3 15.9 54089 49559 58619 Benton County OR est14_OR.txt 06NOV2015 +41 5 37450 32707 42193 9.5 8.3 10.7 10896 8848 12944 12.6 10.2 15.0 7530 6063 8997 11.5 9.3 13.7 65555 62792 68318 Clackamas County OR est14_OR.txt 06NOV2015 +41 7 5672 4567 6777 15.4 12.4 18.4 1621 1243 1999 22.7 17.4 28.0 1059 798 1320 20.6 15.5 25.7 45132 41123 49141 Clatsop County OR est14_OR.txt 06NOV2015 +41 9 5880 4714 7046 12.0 9.6 14.4 1817 1396 2238 16.8 12.9 20.7 1222 925 1519 14.8 11.2 18.4 57517 52697 62337 Columbia County OR est14_OR.txt 06NOV2015 +41 11 12144 10076 14212 19.8 16.4 23.2 3354 2614 4094 30.1 23.5 36.7 2322 1783 2861 28.9 22.2 35.6 39956 37328 42584 Coos County OR est14_OR.txt 06NOV2015 +41 13 3809 3115 4503 18.3 15.0 21.6 1079 832 1326 27.2 21.0 33.4 721 549 893 23.6 18.0 29.2 38155 34688 41622 Crook County OR est14_OR.txt 06NOV2015 +41 15 3780 3027 4533 17.1 13.7 20.5 858 643 1073 25.3 19.0 31.6 600 445 755 24.7 18.3 31.1 40524 37448 43600 Curry County OR est14_OR.txt 06NOV2015 +41 17 22298 19233 25363 13.2 11.4 15.0 6345 4973 7717 17.8 14.0 21.6 4479 3445 5513 16.8 12.9 20.7 52387 49264 55510 Deschutes County OR est14_OR.txt 06NOV2015 +41 19 21001 18102 23900 19.9 17.2 22.6 5769 4674 6864 28.5 23.1 33.9 3793 2976 4610 25.7 20.2 31.2 41504 39033 43975 Douglas County OR est14_OR.txt 06NOV2015 +41 21 223 170 276 11.7 8.9 14.5 75 56 94 20.1 15.1 25.1 52 39 65 20.8 15.4 26.2 51978 46849 57107 Gilliam County OR est14_OR.txt 06NOV2015 +41 23 1190 925 1455 16.8 13.1 20.5 355 268 442 27.1 20.4 33.8 241 179 303 24.8 18.4 31.2 41304 37034 45574 Grant County OR est14_OR.txt 06NOV2015 +41 25 1489 1216 1762 21.3 17.4 25.2 434 347 521 31.6 25.3 37.9 270 205 335 26.9 20.4 33.4 36340 32642 40038 Harney County OR est14_OR.txt 06NOV2015 +41 27 3298 2675 3921 14.6 11.8 17.4 1108 859 1357 20.1 15.6 24.6 727 551 903 18.1 13.7 22.5 54063 49516 58610 Hood River County OR est14_OR.txt 06NOV2015 +41 29 37566 33104 42028 18.1 16.0 20.2 11174 9332 13016 25.9 21.6 30.2 6951 5552 8350 22.3 17.8 26.8 44835 42373 47297 Jackson County OR est14_OR.txt 06NOV2015 +41 31 4513 3614 5412 21.2 17.0 25.4 1695 1319 2071 32.2 25.1 39.3 1138 872 1404 30.2 23.1 37.3 42753 39284 46222 Jefferson County OR est14_OR.txt 06NOV2015 +41 33 16921 14086 19756 20.6 17.2 24.0 5188 4185 6191 33.3 26.9 39.7 3453 2723 4183 30.2 23.8 36.6 37230 34074 40386 Josephine County OR est14_OR.txt 06NOV2015 +41 35 14092 12297 15887 21.9 19.1 24.7 4004 3246 4762 29.1 23.6 34.6 2613 2034 3192 26.6 20.7 32.5 39234 36331 42137 Klamath County OR est14_OR.txt 06NOV2015 +41 37 1429 1105 1753 19.3 14.9 23.7 406 308 504 28.3 21.5 35.1 273 202 344 24.9 18.5 31.3 40328 36280 44376 Lake County OR est14_OR.txt 06NOV2015 +41 39 64722 59856 69588 18.4 17.0 19.8 13379 10867 15891 20.1 16.3 23.9 8316 6528 10104 17.0 13.4 20.6 44976 42967 46985 Lane County OR est14_OR.txt 06NOV2015 +41 41 8628 7219 10037 18.8 15.7 21.9 2320 1840 2800 30.3 24.0 36.6 1601 1262 1940 30.0 23.6 36.4 40226 37101 43351 Lincoln County OR est14_OR.txt 06NOV2015 +41 43 22559 19999 25119 19.1 16.9 21.3 7215 6104 8326 26.8 22.7 30.9 4876 4083 5669 24.9 20.8 29.0 44358 41159 47557 Linn County OR est14_OR.txt 06NOV2015 +41 45 7756 6587 8925 28.7 24.4 33.0 2891 2409 3373 38.3 31.9 44.7 2016 1666 2366 37.4 30.9 43.9 35094 31618 38570 Malheur County OR est14_OR.txt 06NOV2015 +41 47 56064 49829 62299 17.7 15.7 19.7 20377 17489 23265 25.1 21.5 28.7 13302 11118 15486 22.6 18.9 26.3 48554 46347 50761 Marion County OR est14_OR.txt 06NOV2015 +41 49 1824 1452 2196 16.3 13.0 19.6 694 532 856 22.3 17.1 27.5 465 349 581 20.2 15.2 25.2 51839 46569 57109 Morrow County OR est14_OR.txt 06NOV2015 +41 51 141562 132955 150169 18.6 17.5 19.7 34845 30895 38795 23.2 20.6 25.8 21859 19012 24706 21.0 18.3 23.7 53519 51700 55338 Multnomah County OR est14_OR.txt 06NOV2015 +41 53 10721 8883 12559 14.1 11.7 16.5 3052 2309 3795 17.2 13.0 21.4 2047 1526 2568 15.5 11.6 19.4 52626 49042 56210 Polk County OR est14_OR.txt 06NOV2015 +41 55 241 184 298 14.2 10.8 17.6 70 53 87 23.4 17.6 29.2 48 35 61 20.3 15.0 25.6 53277 47661 58893 Sherman County OR est14_OR.txt 06NOV2015 +41 57 4347 3567 5127 17.5 14.4 20.6 1213 946 1480 25.9 20.2 31.6 764 571 957 23.0 17.2 28.8 41662 38375 44949 Tillamook County OR est14_OR.txt 06NOV2015 +41 59 13041 10920 15162 18.0 15.1 20.9 4894 3987 5801 25.2 20.5 29.9 3228 2583 3873 23.2 18.6 27.8 44780 41922 47638 Umatilla County OR est14_OR.txt 06NOV2015 +41 61 4418 3706 5130 17.7 14.8 20.6 1219 956 1482 22.0 17.3 26.7 841 660 1022 21.1 16.6 25.6 44841 41885 47797 Union County OR est14_OR.txt 06NOV2015 +41 63 1063 830 1296 15.8 12.3 19.3 319 245 393 26.1 20.0 32.2 215 164 266 24.6 18.7 30.5 39743 35852 43634 Wallowa County OR est14_OR.txt 06NOV2015 +41 65 4192 3403 4981 16.8 13.6 20.0 1299 970 1628 23.4 17.5 29.3 912 675 1149 22.8 16.9 28.7 44010 39913 48107 Wasco County OR est14_OR.txt 06NOV2015 +41 67 69403 63990 74816 12.5 11.5 13.5 21559 19144 23974 16.0 14.2 17.8 14247 12477 16017 14.5 12.7 16.3 66315 63653 68977 Washington County OR est14_OR.txt 06NOV2015 +41 69 315 249 381 23.3 18.4 28.2 83 63 103 39.5 30.1 48.9 57 43 71 37.7 28.4 47.0 33387 29800 36974 Wheeler County OR est14_OR.txt 06NOV2015 +41 71 14772 12562 16982 15.4 13.1 17.7 4744 3919 5569 20.5 16.9 24.1 3184 2576 3792 18.4 14.9 21.9 52903 49406 56400 Yamhill County OR est14_OR.txt 06NOV2015 diff --git a/poverty/poverty.py b/poverty/poverty.py index 1089ac9..4d26cf8 100644 --- a/poverty/poverty.py +++ b/poverty/poverty.py @@ -1,28 +1,36 @@ +def get_poverty_data(file): + highest_percent_poverty_county = "" + highest_percent_poverty = 0 + lowest_percent_poverty_county = "" + lowest_percent_poverty = 100 + county_dict = {} + f = open(file) + for line in f: + if line[3:6].strip() != "0": # To exclude the overall state data + count_poverty = line[52:58].strip() + percent_poverty = float(line[76:80]) + median_income = line[135:140].strip() + county_name = line[193:238].strip() -highest_percent_poverty_county = "" -highest_percent_poverty = 0 -lowest_percent_poverty_county = "" -lowest_percent_poverty = 100 -county_dict = {} + if percent_poverty > highest_percent_poverty: + highest_percent_poverty = percent_poverty + highest_percent_poverty_county = county_name + elif percent_poverty < lowest_percent_poverty: + lowest_percent_poverty = percent_poverty + lowest_percent_poverty_county = county_name -f = open('./WA_data.txt') -for line in f: - if line[3:6].strip() != "0": # To exclude the overall state data - count_poverty = line[52:58].strip() - percent_poverty = float(line[76:80]) - median_income = line[135:140].strip() - county_name = line[193:238].strip() + county_dict[county_name] = {'count_poverty': count_poverty, 'percent_poverty': percent_poverty, 'median_income': median_income} - if percent_poverty > highest_percent_poverty: - highest_percent_poverty = percent_poverty - highest_percent_poverty_county = county_name - elif percent_poverty < lowest_percent_poverty: - lowest_percent_poverty = percent_poverty - lowest_percent_poverty_county = county_name + return county_dict, lowest_percent_poverty_county, highest_percent_poverty_county - county_dict[county_name] = {'count_poverty': count_poverty, 'percent_poverty': percent_poverty, 'median_income': median_income} +wa_county_info, wa_lowest_pov_county, wa_highest_pov_county = get_poverty_data('./WA_data.txt') +or_county_info, or_lowest_pov_county, or_highest_pov_county = get_poverty_data('./OR_data.txt') -print "The highest percent of children in poverty is {}% in {}".format(highest_percent_poverty, highest_percent_poverty_county) -print "The count of children in poverty is {} and the median income is ${}".format(county_dict[highest_percent_poverty_county]['count_poverty'], county_dict[highest_percent_poverty_county]['median_income']) + + +print "In Washington, the county with the highest percentage of children in poverty is {} with {}% of children in poverty".format(wa_highest_pov_county, wa_county_info[wa_highest_pov_county]['percent_poverty']) +print "The count of children in poverty is {} and the median income is ${}".format(wa_county_info[wa_highest_pov_county]['count_poverty'], wa_county_info[wa_highest_pov_county]['median_income']) +print "In Washington, the county with the lowest percentage of children in poverty is {} with {}% of children in poverty".format(wa_lowest_pov_county, wa_county_info[wa_lowest_pov_county]['percent_poverty']) +print "The count of children in poverty is {} and the median income is ${}".format(wa_county_info[wa_lowest_pov_county]['count_poverty'], wa_county_info[wa_lowest_pov_county]['median_income'])