]> gitweb.michael.orlitzky.com - dead/census-tools.git/blobdiff - bin/download_data
Added New Jersey to the download_data script.
[dead/census-tools.git] / bin / download_data
index 37741cd7a84acc53be930ba6e240255f8a743e62..da3cb75d38a10503042390dd508ea291dc051f37 100755 (executable)
@@ -17,13 +17,14 @@ from Data import State, County
 
 
 # Create the State objects.
-de = State(10, 'Delaware')
-dc = State(11, 'District of Columbia')
-md = State(24, 'Maryland')
-ny = State(36, 'New York')
-pa = State(42, 'Pennsylvania')
-va = State(51, 'Virginia')
-wv = State(54, 'West Virginia')
+de = State(10, 'Delaware', 'DE')
+dc = State(11, 'District of Columbia', 'DC')
+md = State(24, 'Maryland', 'MD')
+nj = State(34, 'New Jersey', 'NJ')
+ny = State(36, 'New York', 'NY')
+pa = State(42, 'Pennsylvania', 'PA')
+va = State(51, 'Virginia', 'VA')
+wv = State(54, 'West Virginia', 'WV')
 
 
 # Now we add all of the counties belonging to each state, starting
@@ -67,6 +68,31 @@ md.add_county(45, 'Wicomico')
 md.add_county(47, 'Worcester')
 
 
+# New Jersey
+
+nj.add_county(1, 'Atlantic')
+nj.add_county(3, 'Bergen')
+nj.add_county(5, 'Burlington')
+nj.add_county(7, 'Camden')
+nj.add_county(9, 'Cape May')
+nj.add_county(11, 'Cumberland')
+nj.add_county(13, 'Essex')
+nj.add_county(15, 'Gloucester')
+nj.add_county(17, 'Hudson')
+nj.add_county(19, 'Hunterdon')
+nj.add_county(21, 'Mercer')
+nj.add_county(23, 'Middlesex')
+nj.add_county(25, 'Monmouth')
+nj.add_county(27, 'Morris')
+nj.add_county(29, 'Ocean')
+nj.add_county(31, 'Passaic')
+nj.add_county(33, 'Salem')
+nj.add_county(35, 'Somerset')
+nj.add_county(37, 'Sussex')
+nj.add_county(39, 'Union')
+nj.add_county(41, 'Warren')
+
+
 # New York
 
 ny.add_county(1, 'Albany')
@@ -403,6 +429,7 @@ wv.add_county(109, 'Wyoming')
 
 # Now that the counties have been added, create a list of states to
 # pass to the download_lines function.
-states = [de, dc, md, ny, pa, va, wv]
+states = [de, dc, md, nj, ny, pa, va, wv]
+Data.download_sf1(states)
 Data.download_blocks(states)
 Data.download_lines(states)