{"id":19614,"date":"2023-05-12T18:01:19","date_gmt":"2023-05-12T18:01:19","guid":{"rendered":"https:\/\/www.goodacademic.com\/blog\/questions\/you-are-asked-to-write-a-python-3-program-that-will-read-a-csv-data-file-and-output-selected-data-in-the-forms-of-a-terminal-outputs-bar-charts-and-scatter-plots\/"},"modified":"2023-05-12T18:01:19","modified_gmt":"2023-05-12T18:01:19","slug":"you-are-asked-to-write-a-python-3-program-that-will-read-a-csv-data-file-and-output-selected-data-in-the-forms-of-a-terminal-outputs-bar-charts-and-scatter-plots","status":"publish","type":"questions","link":"https:\/\/www.goodacademic.com\/blog\/questions\/you-are-asked-to-write-a-python-3-program-that-will-read-a-csv-data-file-and-output-selected-data-in-the-forms-of-a-terminal-outputs-bar-charts-and-scatter-plots\/","title":{"rendered":"You are asked to write a Python 3 program that will read a CSV data file and output selected data in the forms of a terminal outputs, bar charts, and scatter plots."},"content":{"rendered":"<p style=\"margin: 12px 0px; font-size: 16px; cursor: auto; color: inherit;\">Your program should read data from a CSV file using the csv module&nbsp;<\/p>\n<p style=\"margin: 12px 0px; font-size: 16px; cursor: auto; color: inherit;\">Reading data from the file into the program will require type conversion from strings to floats&nbsp;<\/p>\n<p style=\"margin: 12px 0px; font-size: 16px; cursor: auto; color: inherit;\">Using list processing techniques (including list slicing) [Lecture 6] will allow you to store the data in a&nbsp; &nbsp; &nbsp;reasonable&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;convenient way. It is suggested that you read the CSV file into a list. Each element in the&nbsp; &nbsp; &nbsp; list&nbsp; &nbsp;would represent an&nbsp; &nbsp; &nbsp; &nbsp;individual duck, Each individual record would contain the ID, species name,&nbsp; &nbsp;category, and three tuples consisting of&nbsp; &nbsp; &nbsp;pairs of the kind of data observed and its value. For instance:<\/p>\n<p style=\"margin: 12px 0px; font-size: 16px; cursor: auto; color: inherit;\">[\u2026,<\/p>\n<p style=\"margin: 12px 0px; font-size: 16px; cursor: auto; color: inherit;\">[99, \u201ctufted\u201d, &#8220;diving&#8221;, (\u201clength_cm\u201d, 42.8), (\u201cwingspan_cm\u201d, 72.3), (\u201cbody_mass_g\u201d, 711.32)],<\/p>\n<p style=\"margin: 12px 0px; font-size: 16px; cursor: auto; color: inherit;\">[100, \u201cmallard\u201d, &#8220;dabbling&#8221;, (\u201clength_cm\u201d, 51.2), (\u201cwingspan_cm\u201d, 86.7), (\u201cbody_mass_g\u201d, 991.22)],<\/p>\n<p style=\"margin: 12px 0px; font-size: 16px; cursor: auto; color: inherit;\">\u2026]<\/p>\n<p style=\"margin: 12px 0px; font-size: 16px; cursor: auto; color: inherit;\"><span style=\"font-size: 18pt; cursor: auto; color: inherit;\"><strong style=\"font-weight: bold; cursor: auto; color: inherit;\">Choosing data records for your scatter plot and bar chats<\/strong><\/span><br style=\"cursor: auto; color: inherit;\">The scatter plot requires the choice of a penguin\u2019s attribute by name and the bar chart requires the choice of an ID&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; number, using a user input from the keyboard&nbsp;<\/p>\n<p style=\"margin: 12px 0px; font-size: 16px; cursor: auto; color: inherit;\"><span style=\"font-size: 18pt; cursor: auto; color: inherit;\"><strong style=\"font-weight: bold; cursor: auto; color: inherit;\">Outputting the data<\/strong><\/span><\/p>\n<p style=\"margin: 12px 0px; font-size: 16px; cursor: auto; color: inherit;\">The output using the matplotlib\/pyplot module to represent the data. The required parameters are&nbsp; strings, floats, and&nbsp; &nbsp; &nbsp;lists.<\/p>\n<p style=\"margin: 12px 0px; font-size: 16px; cursor: auto; color: inherit;\">Offering the user the choice of a scatter plot, bar chart, or to exit the software.<br style=\"cursor: auto; color: inherit;\">This requires input from the user&nbsp; and the use of iteration . You will probably also need to use assignment with a&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conditional .<\/p>\n<p style=\"margin: 12px 0px; font-size: 16px; cursor: auto; color: inherit;\"><span style=\"cursor: auto; color: inherit;\">The code will be run using Python 3.7. It is highly unlikely the version number will matter given the nature of the assignment. If your code does not work as a result of the wrong version number, I will attempt to run it using the version of&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Python you developed the software in. It<span style=\"cursor: auto; color: inherit;\">&nbsp;<\/span><\/span><strong style=\"font-weight: bold; cursor: auto; color: inherit;\">must<\/strong><span style=\"cursor: auto; color: inherit;\"><span style=\"cursor: auto; color: inherit;\">&nbsp;<\/span>be written for Python 3.<\/span><\/p>\n<p style=\"margin: 12px 0px; font-size: 16px; cursor: auto; color: inherit;\"><span style=\"cursor: auto; color: inherit;\">THE FILES ATTACHED ARE SO IMPORTANT&nbsp;<\/span><\/p>\n<p style=\"margin: 12px 0px; font-size: 16px; cursor: auto; color: inherit;\"><span style=\"cursor: auto; color: inherit;\">use this duck data file to insert the data needed and attach the csv file please!<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Your program should read data from a CSV file using the csv module&nbsp; Reading data from the file into the program will require type conversion from strings to floats&nbsp; Using list processing techniques (including list slicing) [Lecture 6] will allow you to store the data in a&nbsp; &nbsp; &nbsp;reasonable&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;convenient way. It [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":[],"disciplines":[734],"paper_types":[],"tagged":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/questions\/19614"}],"collection":[{"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/questions"}],"about":[{"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/types\/questions"}],"author":[{"embeddable":true,"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/comments?post=19614"}],"version-history":[{"count":0,"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/questions\/19614\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/media?parent=19614"}],"wp:term":[{"taxonomy":"disciplines","embeddable":true,"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/disciplines?post=19614"},{"taxonomy":"paper_types","embeddable":true,"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/paper_types?post=19614"},{"taxonomy":"tagged","embeddable":true,"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/tagged?post=19614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}