The Centers for Disease Control (CDC) keeps data on what it calls Winnable Battle Risk Factors...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
The Centers for Disease Control (CDC) keeps data on what it calls "Winnable Battle Risk Factors and Health Indicators". These are negative behaviors or incidents that could possibly be avoided by changes in lifestyle. In this problem you will examine some CDC data to discover the states with the best and worst records in regard to a few of these risk factors and health indicators. Problem Specifications The file "risk factors.csv" lists data on 20 different risk factors and health indicators for each state. The data is in "comma separated value" format (csv), which means that each entry is separated from the others by a comma. Examining the file in a text editor or a spreadsheet program or both should help you understand the format. We grabbed this file from the CDC web page and have placed a copy in the project directory for you. Since analyzing 20 different indicators can be a bit confusing, we will only look at five: Heart Disease Death Rate, Motor Vehicle Death Rate, Teen Birth Rate, Adult Smoking, and Adult Obesity. Your program will read in the data from the csv file and find the states with the best and worst record for each of these indicators (largest and smallest values). It will produce a file called "best_and_worst.txt" which lists the states that have the highest and lowest value for each of the indicators, along with their values. Your program must be general enough to work with a similar file with states as rows and with the same column headers. That is, if the CDC puts out a new file with different values in the cells (e.g. maybe new research changed some values), your program will work correctly. Additional Requirements a) In addition to main function, you must create and use at least 2 meaningful functions (your choice). b) Your program must format the file into columns (see below). Use string formatting. Sample file output (best_and_worst.txt): Indicator : Heart Disease Death Rate (2007): Motor Vehicle Death Rate (2009): Teen Birth Rate (2009) Adult Smoking (2010) Adult Obesity (2010) 1 : : Min Minnesota District of Columbia New Hampshire Utah Colorado 129.8 4.8 16.4 9.1 21.4 Max Mississippi Wyoming Mississippi West Virginia Mississippi 266.5 24.6 64.2 26.8 34.5 The Centers for Disease Control (CDC) keeps data on what it calls "Winnable Battle Risk Factors and Health Indicators". These are negative behaviors or incidents that could possibly be avoided by changes in lifestyle. In this problem you will examine some CDC data to discover the states with the best and worst records in regard to a few of these risk factors and health indicators. Problem Specifications The file "risk factors.csv" lists data on 20 different risk factors and health indicators for each state. The data is in "comma separated value" format (csv), which means that each entry is separated from the others by a comma. Examining the file in a text editor or a spreadsheet program or both should help you understand the format. We grabbed this file from the CDC web page and have placed a copy in the project directory for you. Since analyzing 20 different indicators can be a bit confusing, we will only look at five: Heart Disease Death Rate, Motor Vehicle Death Rate, Teen Birth Rate, Adult Smoking, and Adult Obesity. Your program will read in the data from the csv file and find the states with the best and worst record for each of these indicators (largest and smallest values). It will produce a file called "best_and_worst.txt" which lists the states that have the highest and lowest value for each of the indicators, along with their values. Your program must be general enough to work with a similar file with states as rows and with the same column headers. That is, if the CDC puts out a new file with different values in the cells (e.g. maybe new research changed some values), your program will work correctly. Additional Requirements a) In addition to main function, you must create and use at least 2 meaningful functions (your choice). b) Your program must format the file into columns (see below). Use string formatting. Sample file output (best_and_worst.txt): Indicator : Heart Disease Death Rate (2007): Motor Vehicle Death Rate (2009): Teen Birth Rate (2009) Adult Smoking (2010) Adult Obesity (2010) 1 : : Min Minnesota District of Columbia New Hampshire Utah Colorado 129.8 4.8 16.4 9.1 21.4 Max Mississippi Wyoming Mississippi West Virginia Mississippi 266.5 24.6 64.2 26.8 34.5
Expert Answer:
Answer rating: 100% (QA)
Follow the below code Code import string def minmaxnewlistcause Listofdiseases listofdiseases for disease in cause column newlist for row in newlist The newnum nos noNA noflt and nornd are just words ... View the full answer
Related Book For
Business Ethics A Stakeholder And Issues Management Approach
ISBN: 9781523091546
7th Edition
Authors: Joseph W. Weiss
Posted Date:
Students also viewed these programming questions
-
I want to discuss how public health is organized in the United States. There are many different federal agencies that deal with public health. However, the main one I want to focus on is called the...
-
Heart disease is the leading cause of death for both men and women. According to the Centers for Disease Control and Prevention, as of 2013, about 715,000 heart attacks occur in the United States...
-
In 2020-21, a taxpayer makes a number of disposals, as listed below. Which of these disposals would be exempt from CGT? (a) An antique table sold for 5,000. (b) A watercolour painting sold at...
-
Dos Passos SA sells televisions at an average price of R$900 and also offers to each customer a separate 3-year warranty contract for R$90 that requires the company to perform periodic services and...
-
On January 1, Harmon Corp. had 100,000 common shares outstanding. On February 1, Harmon Corp. issued 40,000 additional common shares. On June 1, another 80,000 common shares were issued. Calculate...
-
An engineer studied the effect of four variables on a dimensionless factor used to describe pressure drops in a screen-plate bubble column. Table B. 9 summarizes the experimental results. a. Fit a...
-
What are demand-driven supply networks, and what role do performance measures play in these networks?
-
Suppose that the figure below shows the short-run marginal cost (MC) and average cost (AC) curves for Tesla - the largest manufacturer of electric vehicles, with costs on the vertical axis and the...
-
Five years ago Homer Simpson won the $250,000 lottery. Of those he invests 100,000 for his retirement. Hey Homer Simpson plans to invest $5000 at the end of each year for his retirement, at an...
-
In response to the question How do you hire? Kasper Rorsted, CEO of Henkel, a consumer and industrial products company based in Dsseldorf, Germany, had this to say: I want to know who you are, who...
-
Individually or in teams, develop a five- to ten-minute presentation about maintaining civil communications in the workplace. Provide several scenarios that have happened or could happen in the...
-
One of the member functions in the Case Study needs an additional test. Which function is it, and what should the data be?
-
A bank knows that its demand deposits are normally distributed with a mean of $1,122 and a standard deviation of $393. A random sample of 100 deposits is taken. (a) What is the probability that the...
-
Suppose that historically 61 % of the companies on the NYSE have prices that go up each year. If random samples of 100 stocks are taken, what proportion of samples is likely to have between 55 % and...
-
(5 pts.) Show that the obvious algorithm for solving (for x) the 1-by-1 system rx = b is backward stable if executed in matlab on a modern-day computer. Explain your notation and any results /...
-
What are current assets and current liabilities? How are they different from non-current assets and non-current liabilities?
-
Artificial intelligence is the simulation of human intelligence processes by machines, especially computer systems. Specific applications of AI include expert systems, natural language processing...
-
President Joe Biden has an interesting balancing act to perform with regard to his commitments on climate change with younger voters and more radically oriented Democrats, and with his support of...
-
What is the free-market theory of corporate responsibility, and what are some of the problems associated with this view? Compare this view with the social contract and stakeholder perspectives of CSR.
-
The primary problem with the hypothesis that life on Earth originated on Mars is that (a) Mars has never had water. (b) the proposed Martian fossils are much smaller than the tiniest bacteria on...
-
Which of these statements regarding the origin of life is false? (a) Life originated on an Earth whose atmosphere contained high levels of oxygen. (b)Miller and Urey obtained amino acids and other...
-
Which of the following mechanisms of evolution consistently causes populations to become more adapted to their environments? (a) natural selection (b)mutation pressure (c) genetic drift (d) gene flow
Study smarter with the SolutionInn App