Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

program: Work with Census Data use this file: hhttp://www.census.gov/population/www/censusdata/files/urpop0090.txt The census file is a text file with data for the 10-year census from 1900 to

program: Work with Census Data use this file: hhttp://www.census.gov/population/www/censusdata/files/urpop0090.txt

The census file is a text file with data for the 10-year census from 1900 to 1990 (e.g., 1900,1910,1920,...) It has population data for each state as well as regional and overrall data. Each state is on its own line, but the data are grouped so that only three decades of data is on each line- complicating the task of exctracting the data. In addition, the date is further broken down into total, urban, rural, and percentages. Write a program that any census year input (e.g.1970) the program will print the state and its total population with the minimum and maximum. For example: Enter census year 1900 to 1990: 1970 Minumum: (302853,'Alaska') Maximum: (19971069, 'California') 

We had the output display a tuple as a hint to assist with solving the problem rather than illustrating readable output. Some points to consider:

a) Begin by generating clean data: There are footnotes that need to be eliminated, numbers contain commas,some rows(lines) have data you are not interested in (e.g., region data), you are not interested in all columns(e.g.,percentages), and so on. Simply printing the lines with extraneous data removed is a good start. b) You will likely want to combine multiple state name strings into one, for example, "New""York" becomes "New York" c) A tuple (population, state) provides a way to tag population data with a state in a way that allows a list of tuples to be sorted (remember that by default, sorting uses the first value)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Objects And Databases International Symposium Sophia Antipolis France June 13 2000 Revised Papers Lncs 1944

Authors: Klaus R. Dittrich ,Giovanna Guerrini ,Isabella Merlo ,Marta Oliva ,M. Elena Rodriguez

2001st Edition

3540416641, 978-3540416647

More Books

Students also viewed these Databases questions

Question

3. Do you have any digital marketing experience?

Answered: 1 week ago

Question

=+C&B (especially taxation) laws, regulations, and practices?

Answered: 1 week ago

Question

=+designing international assignment C&B packages.

Answered: 1 week ago