Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Use the file below census-2000.txt as your input file. This file contains data from the 2000 US census. The file is tab-delimited, and the fields

Use the file below census-2000.txt as your input file. This file contains data from the 2000 US census. The file is tab-delimited, and the fields are County name, population,water area (in square miles), land area (in square miles). This file covers the counties in Washington state. Write an awk script, named census_rpt, that will parse the data, and for each county, print the county name, the population per square mile of land, and the percentage of the county that is water. (Note that the total area of the county is the sum of the land and water area) Be sure to put a header on your report. Also, make sure your report is readable by using appropriate spacing. Below is an example for header and formatting. County Pop/Sq Mile % Water ------ ----------- ------- Adams County 8.534203 0.245117 (10 points for header, 10 points for readability of report due to spacing, 20 points for correct columns and values) At the end, your script should print the county name and the value for the following criteria. - Highest population density (10 points) - Lowest population density (10 points) - Highest percentage of water (10 points) - Lowest percentage of water (10 points) Example: (replace X with county name and numbers with correct values) Highest population density X County = 999.99999 Lowest population density X County = 0.00000 Highest percent water X County = 99.999999 % Lowest percent water X County = 0.000000 % 

Adams County 16428 4.73 1924.96 Asotin County 20551 5.34 635.34 Benton County 142475 57.03 1703.09 Chelan County 66616 72.25 2921.37 Clallam County 64525 930.89 1739.45 Clark County 345238 27.99 628.22 Columbia County 4064 4.71 868.81 Cowlitz County 92948 27.69 1138.64 Douglas County 32603 28.17 1820.53 Ferry County 7260 53.48 2203.98 Franklin County 49347 22.95 1242.40 Garfield County 2397 7.64 710.55 Grant County 74698 110.23 2681.06 Grays Harbor County 67194 307.55 1916.89 Island County 71558 308.95 208.43 Jefferson County 25953 369.29 1814.23 King County 1737034 180.48 2126.04 Kitsap County 231969 170.01 395.97 Kittitas County 33362 35.93 2297.19 Klickitat County 19161 31.80 1872.37 Lewis County 68600 28.63 2407.64 Lincoln County 10184 28.51 2311.21 Mason County 49405 89.97 961.06 Okanogan County 39564 47.09 5268.07 Pacific County 20984 290.52 932.97 Pend Oreille County 11732 25.05 1400.27 Pierce County 700820 127.58 1678.91 San Juan County 14077 446.15 174.92 Skagit County 102979 185.33 1735.14 Skamania County 9872 27.42 1656.44 Snohomish County 606024 107.35 2089.06 Spokane County 417939 17.09 1763.64 Stevens County 40066 62.34 2478.30 Thurston County 207355 46.62 727.02 Wahkiakum County 3824 22.45 264.24 Walla Walla County 55180 28.74 1270.51 Whatcom County 166814 384.02 2119.53 Whitman County 40740 18.23 2159.37 Yakima County 222581 15.38 4296.23

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions