Analysis of the Iowa census

The following table gives the names of the sixty most populous cities and towns in Iowa, together with the populations of those towns, as determined in the national censuses of 2000 and 1990.

city             2000 pop. 1990 pop.
------------------------------------
Altoona            10345      7242
Ames               50731     47198
Ankeny             27117     18482
Atlantic            7257      7432
Bettendorf         31275     28139
Boone              12803     12392
Burlington         26839     27208
Carroll            10106      9579
Cedar Falls        36145     34298
Cedar Rapids      120758    108772
Charles City        7812      7878
Clear Lake          8161      8183
Clinton            27772     29201
Clive              12855      7462
Coralville         15123     10347
Council Bluffs     58268     54315
Creston             7597      7911
Davenport          98359     95333
Decorah             8172      8063
Denison             7339      6604
Des Moines        198682    193189
Dubuque            57685     57538
Estherville         6656      6720
Fairfield           9509      9768
Fort Dodge         25136     25894
Fort Madison       10715     11618
Grinnell            9105      8902
Hiawatha            6480      4986
Independence        6014      5972
Indianola          12998     11340
Iowa City          62220     59735
Johnston            8649      7402
Keokuk             11427     12451
Knoxville           7731      8232
Le Mars             9237      8454
Maquoketa           6112      6130
Marion             26294     20403
Marshalltown       26009     25178
Mason City         29172     29040
Mount Pleasant      8751      7959
Muscatine          22697     22881
Nevada              6658      6009
Newton             15579     14799
Norwalk             6884      5726
Oelwein             6692      6493
Oskaloosa          10398     10600
Ottumwa            24998     24488
Pella               9832      9270
Perry               7633      6652
Red Oak             6197      6264
Sioux Center        6002      5074
Sioux City         85013     80505
Spencer            11314     11056
Storm Lake         10076      8769
Urbandale          29072     23500
Washington          7047      7074
Waterloo           68747     66467
Waverly             8968      8539
Webster City        8176      7894
West Des Moines    46403     31702

(My source for these statistics is the State Data Center at the State Library of Iowa.)

Design and construct a data structure appropriate for storing the data in this table. Then, for each of the following questions, write a Scheme procedure that uses your data structure and its contents to determine and return the answer.


This document is available on the World Wide Web as

http://www.cs.grinnell.edu/~stone/courses/scheme/exercises/Iowa-census.xhtml

Validated as XHTML 1.1 by the World Wide Web Consortium Cascading Style Sheet validated by the World Wide Web Consortium

created November 11, 2001
last revised November 11, 2001

John David Stone (stone@cs.grinnell.edu)