Answered step by step
Verified Expert Solution
Question
1 Approved Answer
#### # Place Source Header here! #### from operator import itemgetter import csv import pylab as py def open_file(): ''' Write docstring here! ''' pass
#### # Place Source Header here! #### from operator import itemgetter import csv import pylab as py def open_file(): ''' Write docstring here! ''' pass def read_journal_file(fp): ''' Write docstring here! ''' pass def read_category_file(fp): ''' Write docstring here! ''' pass def display_table(data): ''' Write docstring here! ''' pass def sort_data(data, column): ''' Write docstring here! ''' pass def prepare_plot_data(data): ''' Write docstring here! ''' pass def plot_data(name,impact_factor): ''' Plots the bar chart of the Journal Impact Factor Input: data (list) -> List of journals and their impact factor Returns: None ''' py.barh(name,impact_factor) py.title("Journal Impact Factor") py.xlabel('Impact Factor') py.ylabel('Journal Name') # To pass the Mimir plot test you must uncomment the 'savefig' line and comment out the 'show' line # py.savefig("plot.png") py.show() def main(): pass if __name__ == "__main__": main()CSE 231 Spring 2019 Programming Project 06 This assignment is worth 45 points (45% of the course grade) and must be completed and turned in before 11:59 on Monday, February, 25. Assignment Overview Files .Lists and Tuples Assignment Background Life is full of wonders and uncertainties that motivates us to find answers. However, not everybody is qualified to answer such questions. We need to have a medium where various like- minded individuals with experience of certain topics to share and contribute their acquired knowledge via research articles. One well known medium to publish these articles is through research journals. These journals are centered on certain topics or categories (Biology, Computer Science, etc), where some categories are more popular than others. This popularity is measured by their citation rate or impact factor For this project, the program reads files with the citation data of each category and the impact factor of various journals, print the average citation rate of the top 20 categories and plot the top 10 jourmal impact factor. The data used for this project was extracted from InCites Journal Project Specifications 1. You must implement the following functions a) open fileO prompts the user for a filename to read data from. An error message should be shown if the file cannot be opened. This function will loop until it receives proper input and successfully opens the file. It returns a file pointer b) read journal_file(fp) reads the file object containing jourmal names and their impact factor. We are only interested in the journal name (str), total number of citations (int)(a.k.a. "cites"), and the impact factor (float). It returms a list of tuples, sorted by the impact factor (descending order) (Hint: place your sort outside your loop, otherwise it will take too long and your Mimir test will timeout and fail). Only read the first 30 characters for the journal name. Make sure to remove all commas from all strings with numeric values. See Notes and Hints. Make sure to check that the entries in citations and impact factor are of type int and float respectively. If it is not a valid entry, don't include it in the list. c) read category file(fp) reads the file object containing the citation data from over 200 categories. We are only interested in the category (str), number of journals int), and total CSE 231 Spring 2019 Deliverables The deliverable for this assignment is the following file proj06.py - the source code for your Python program Be sure to use the specified file name and to submit it for grading via the Mimir system before the project deadline Notes and Hints 1. 2. The replace function is useful to remove unwanted characters from a string When reading the citation and journal files, use the reader function from csv module to read each line of the file because some values have commas import csv popen file reader csv . reader (fp) # create csv reader header -next (reader, None) # read one line (useful for skip) for line list in reader: #line list is a list of the line 3. The try-except structure will help determine whether the current column is numeric You can try to convert a string to a float number. If Python raises a ValueError, it means that converting the string to a float type is not possible try: x-float (some str) except ValueError: # do something because some-str isn't a float Sample Output read journal file function: fp- open( ' journal-impact-small .csv ' , ' r ' ) instructordata = [('REVIEWS OF MODERN PHYSICS. 41133, 33.177), ("NEW ASTRONOMY REVIEWS',922, 6.154), ('Nonlinear Analysis-Hybrid Syst' 812, 3.192), ('Microfluidics and Nanofluidics',4089, 2.537) - EXTREMOPHILES', 2718, 2.346), JOURNAL OF COMPUTING IN CIVIL 1541, 1.855),Journal of Neurosurgery-Pediat', 2567, 1.757)'WORLD BANK RESEARCH OBSERVER', 784, 1.667), 'Archaeological and Anthropolog', 301, 1.636),"SKELETAL RADIOLOGY',4318, 1.527), ARCHAEOMETRY, 2112, 1.364), 'Molecular & Cellular Toxicolog', 299, 1.24), ('Applied Geophysics',417, 0.804),Fixed Point Theory', 304, 0.581),(China Communications', 275, 0.424) ] CSE 231 Spring 2019 student-data read-journal-file (fp) assert instructor_datastudent_data read category file function test: fp = open( 'category-impact. Sma 11.csv. 'r') student_data- read_category file (fp) instructor data-[ ('ACOUSTICS', 32, 138295, 4321.71875), 'AGRICULTURE, MULTIDISCIPLINARY,57, 170336, 2988.3508771929824), BIOCHEMISTRY&MOLECULAR BIOLO', 289, 3273965, 11328.598615916955), CHEMTSTRY, MULTIDISCIPLINARY', 163, 2825242, 17332.77300613497) ('ENGINEERING, ENVIRONMENTAL', 50, 510092, 10201.84), ('ENGINEERING, GEOLOGICAL', 35, 76977, 2199.342857142857)'ENVIRONMENTAL SCIENCES', 225, 1412031, 6275.693333333334), ('ETHNIC STUDIES', 15, 11308, 753.8666666666667),GEOGRAPHY, PHYSICAL', 49, 191491, 3907.9795918367345GEOLOGY', 47, 102891, 2189.1702127659573), GERIATRICS & GERONTOLOGY', 49, 171259, 3495.081632653061),'HEALTH CARE SCIENCES&SERVICE, 88, 272255, 3093.806818181818), 'MATERIALS SCIENCE , COATINGS & ', 18, 209367, 11631.5), ("MATERIALS SCIENCE, TEXTILES', 23, 35426, 1540.2608695652175), 'PSYCHOLOGY, APPLIED', 79, 173846, 2200.5822784810125) ] assert instructor datastudent data sort data function test: student_data-'ONCOLOGY',213, 1634966, 7675.896713615023), CHEMISTRY, MEDICINAL', 59, 425363, 7209.542372881356), BIOTECHNOLOGY&APPLIED MICROBIOLOGY, 161, 1103236, 6852.39751552795), (DEVELOPMENTAL BIOLOGY',41, 273038, 6659.463414634146),BEHAVIORAL SCIENCES,51, 305160, 5983.529411764706),MEDICINE, RESEARCH & EXPERIMENTAL', 124, 694043, 5597.120967741936)PHYSICS, MATHEMATICAL', 53, 283825, 5355.188679245283),METALLURGY &METALLURGICAL ENGINEERING', 73, 360924, 4944.164383561 644), 'NUCLEAR SCIENCE&TECHNOLOGY', 32, 149291, 4665.34375)MARINE &FRESHWATER BIOLOGY', 104, 399530, 3841.6346153846152), 'AGRONOMY', 83, 237099, 2856.614457831325), 'VETERINARY SCIENCES', 138, 277519, 2011.0072463768115), 'SOCIOLOGY', 142, 178756, 1258.8450704225352),'HISTORY &PHILOSOPHY OF SCIENCE', 44, 22128, 502.90909090909093)] instructor data = [('AGRONOMY, 83, 237099, 2856614457831325), BEHAVIORAL SCIENCES, 51, 305160, 5983.529411764706), BIOTECHNOLOGY&APPLIED MICROBIOLOGY, 161, 1103236, 6852.39751552795), ('CHEMISTRY, MEDICINAL',59, 425363, 7209.542372881356),DEVELOPMENTAL BIOLOGY', 41, 273038, 6659.463414634146),HISTORY&PHILOSOPHY OF SCIENCE', 44, 22128, 502.90909090909093), 'MARINE & FRESHWATER BIOLOGY', 104, 399530, 3841.6346153846152), 'MEDICINE, RESEARCH &EXPERIMENTAL, 124, 694043, 5597.120967741936), 'METALLURGY&METALLURGICAL ENGINEERING' 73, 360924, 4944.164383561644), ('NUCLEAR SCIENCE &TECHNOLOGY', 32, : 4/8 CSE 231 Spring 2019 149291, 4665.34375),C'ONCOLOGY', 213, 1634966, 7675.896713615023), PHYSICS, MATHEMATICAL, 53, 283825,5355.188679245283), 'SOCIOLOGY',142, 178756, 1258.8450704225352),'VETERINARY SCIENCES', 138, 277519, 2011.0072463768115) ] assert instructor data sort data (student data, 0) prepare_plot data function test: student_data-'Psychological Science in the Public Interest', 858, 19.286), 'Cell Metabolism', 21343, 17.303), ('JOURNAL OF NUCLEAR MEDICINE ' , 22728, 5.849), ("CANCER", 62200, 5.649), ('BRAIN PATHOLOGY ', 4403, 5.256), ('AMERICAN ECONOMIC REVIEW', 35805, 3.833),'INTERNATIONAL JOURNAL OF FOOD MICROBIOLOGY, 22247, 3.445), DRUG SAFETY", 4104, 3.206), ('PSYCHOLOGICAL ASSESSMENT, 7886, 2.901),DRUGS&AGING',2827, 2.61), Journal of Diabetes Investigation', 966, 2.294)'Journal of Real-Time Image Processing', 341, 1.564), CROP SCIENCE', 15892, 1.55), JOURNAL OF RADIATION RESEARCH',2071, 1.536), ('Clinical Nursing Research',563, 1.359), ('Economics of Energy & Environmental Policy', 108, 1.172), 'International Journal of Speech-Language Pathology', 485, 0.985), 'AGROFORESTRY SYSTEMS', 2306, 0.91), 'CREATIVITY RESEARCH JOURNAL', 1712, 0.881),'Information Technology for Development', 258, 0.857),INTERNATIONAL JOURNAL OF COMPUTATIONAL FLUID DYNAMICS, 506, 0.772),'NORWEGIAN JOURNAL OF GEOLOGY, 770, 0.69), ASTRONOMY& GEOPHYSICS', 134, 0.256) instructornames-['Psychological Science in the P, "Cell Metabolism', 'JOURNAL OF NUCLEAR MEDICINE','CANCER'BRAIN PATHOLOGY',AMERICAN ECONOMIC REVIEW', INTERNATIONAL JOURNAL OF FOOD ', 'DRUG SAFETY', 'PSYCHOLOGICAL ASSESSMENT', 'DRUGS & AGING"] instructor_impact-[19.286, 17.303, 5.849, 5.649, 5.256, 3.833 .445, 3.206, 2.901, 2.611 assert (instructor_names, instructor_impact) prepare_plot_data (student_data) Test Case 1: Please enter a valid filename: category_impact_2017.csv Please enter a valid filename: journal_impact 2017.csv Column number to sort data (1-category, 2-journals, 3-citations, 4-average citations): 1 Citation Data of the Top 20 Categories Category ACOUSTICS Journals Total Citations 174,802 Citation per Journal 5,638.774 31 CSE 231 ng 2019 ,821 166, 334 192,794 219,711 287,102 127,991 65,760 AGRICULTURAL ECONOMICS & POLIC AGRICULTURAL ENGINEERING AGRICULTURE, DAIRY& ANIMAL SC AGRICULTURE, MULTIDISCIPLINARY AGRONOMY ALLERGY ANATOMY & MORPHOLOGY ANDROLOGY ANESTHESIOLOGY ANTHROPOLOGY AREA STUDIES ASTRONOMY & ASTROPHYSICS AUDIOLOGY & SPEECH-LANGUAGE PA AUTOMATION & CONTROL SYSTEMS BEHAVIORAL SCIENCES BIOCHEMICAL RESEARCH METHODS BIOCHEMISTRY & MOLECULAR BIOLO BIODIVERSITY CONSERVATION BIOLOGY 1,413.000 11,881.000 3,213.233 3,300.023 4,740.407 3,131.429 201,325 126,983 918 1,071,345 100,231 350,086 259 797,638 3,625,819 207,782 491,775 1,493.918 572.206 16,232.500 4,009.240 5,739.115 6,985.471 18,096.684 12, 374.809 3,645.298 5,785.588 68 293 TOTAL 1,221 8,626,078 111,845.400 Do you want to plot the journal data (yeso)? no st Case Please enter a valid filename: xxxx Error with the file. Please enter a valid filename: category_impact_2016.csv Please enter a valid filename: journal impact 2017 Error with the file. Please enter a valid filename: journal impact 2016.csv Column number to sort data (1-category, 2-journals, 3-citations, 4-average tations) Citation Data of the Top 20 Categories MULTIDISCIPLINARY SCIENCES PHYSICS, CONDENSED MATTER CHEMISTRY, PHYSICAL PHYSICS, ATOMIC, MOLECULAR & C CHEMISTRY, MULTIDISCIPLINARY ELECTROCHEMISTRY PHYSICS, PARTICLES & FIELDS ASTRONOMY&ASTROPHYSICS NANOSCIENCE & NANOTECHNOLOGY CHEMISTRY, ORGANIC PHYSICS, APPLIED ENGINEERING, ENVIRONMENTAL BIOCHEMISTRY&MOLECULAR BIOLO MATERIALS SCIENCE, COATINGS & PHYSICS, MULTIDISCIPLINARY ournals Total Citations 2,803,793 1,344,772 2,865,201 705,786 3,088,211 531,031 474,927 979,492 1,332,720 774,862 1,875,869 619,251 3,435,913 224,479 915,427 Citation per Journal 43,809.266 20,071.224 19,624.664 19,605.167 18,603.681 18,311.414 16,376.793 15,547.492 15,318.621 87 12,674.791 12,637.776 11,847.976 11,814.684 11,587.684 148 CSE 231 Spring 2019 ENERGY & FUELS PHYSICS, NUCLEAR AGRICULTURAL ENGINEERING CELL BIOLOGY MATERIALS SCIENCE, MULTIDISCIP 1,031,892 218,773 150,733 2,044,775 2,957,270 11,216.217 10,938.650 10,766.643 10,761.974 10,753.709 TOTAL 1,922 28,375,177 315,401.678 Do you want to plot the journal data (yeso)? n Incorrect answer! Enter yeso Do you want to plot the journal data (yeso)? no Test Case 3: Plot Test Please enter a valid filename : category mpact 2017.csv Please enter a valid filename journal_impact_2017.csv Column number to sort data (1-category, 2-journals, 3-citations, 4-average citations): 3 Citation Data of the Top 20 Categories Journals Total Citations Citation per Journal 12,374.809 20,282.082 12,109.888 21,686.599 48,948.562 8,989.973 11,234.605 14,344.116 8.660.969 7,823.578 BIOCHEMISTRY & MOLECULAR BIOLO CHEMISTRY, MULTIDISCIPLINARY MATERIALS SCIENCE, MULTIDISCIP CHEMISTRY, PHYSICAL MULTIDISCIPLINARY SCIENCES NEUROSCIENCES CELL BIOLOGY PHYSICS, APPLIED ONCOLOGY ENVIRONMENTAL SCIENCES ENGINEERING, ELECTRICAL & ELEC NANOSCENCE & NANOTECHNOLOGY PHARMACOLOGY & PHARMACY PHYSICS, CONDENSED MATTER MEDICINE, GENERAL & INTERNAL BIOTECHNOLOGY&APPLIED MICROB CLINICAL NEUROLOGY IMMUNOLOGY ENERGY & FUELS SURGERY 3,625,819 3,468,236 3,451,318 3,187,930 3,132,708 2,346,383 2,134,575 2,094,241 1,931,396 1,893,304 1,636,339 1,579,362 1,571,415 1,490,204 1,456, 323 1,323,552 1,303,928 1,280,207 1,278,572 1,206,541 285 147 261 190 146 26e 17,166.978 6,020.747 22,241.851 9,395.632 8,220.820 6,618.924 8,259.400 13,181.155 6,032.705 161 197 155 200 TOTAL 3,667 41,392,353 392 269,886.997 Do you want to plot the journal data (yeso)? yes CSE 231 Spring 2019 ournal Impact Factor Nature Reviews Materials Nature Energy NEW ENGLAND JOURNAL OF MEDICIN NATURE REVIEWS IMMUNOLOGY NATURE REVIEWS DRUG DISCOVERY NATURE REVIEWS CANCER LANCET JAMA-JOURNAL OF THE AMERICAN M CHEMICAL REVIEWS CA-A CANCER JOURNAL FOR CLINIC 50 100 150 Impact Factor 200 250 Grading Rubrics Computer Project #06 General Requirements 06 pts) Coding Standard 1-9 Scoring Summary (descriptive comments, function headers, etc...) Implementation: --(4 pts) open-file function -2 Did not use try/except -2 Did not while loop read journal file function 0(5 pts) 0(5 pts) read category file function 0-(3 pts) sort-data tinction 0(3 pts) prepare plot data function 0-(6 pts) Test! 0_(8 pts) Test2 --(5 pts) Test3: Plotting : 8/8 CSE 231 Spring 2019 Programming Project 06 This assignment is worth 45 points (45% of the course grade) and must be completed and turned in before 11:59 on Monday, February, 25. Assignment Overview Files .Lists and Tuples Assignment Background Life is full of wonders and uncertainties that motivates us to find answers. However, not everybody is qualified to answer such questions. We need to have a medium where various like- minded individuals with experience of certain topics to share and contribute their acquired knowledge via research articles. One well known medium to publish these articles is through research journals. These journals are centered on certain topics or categories (Biology, Computer Science, etc), where some categories are more popular than others. This popularity is measured by their citation rate or impact factor For this project, the program reads files with the citation data of each category and the impact factor of various journals, print the average citation rate of the top 20 categories and plot the top 10 jourmal impact factor. The data used for this project was extracted from InCites Journal Project Specifications 1. You must implement the following functions a) open fileO prompts the user for a filename to read data from. An error message should be shown if the file cannot be opened. This function will loop until it receives proper input and successfully opens the file. It returns a file pointer b) read journal_file(fp) reads the file object containing jourmal names and their impact factor. We are only interested in the journal name (str), total number of citations (int)(a.k.a. "cites"), and the impact factor (float). It returms a list of tuples, sorted by the impact factor (descending order) (Hint: place your sort outside your loop, otherwise it will take too long and your Mimir test will timeout and fail). Only read the first 30 characters for the journal name. Make sure to remove all commas from all strings with numeric values. See Notes and Hints. Make sure to check that the entries in citations and impact factor are of type int and float respectively. If it is not a valid entry, don't include it in the list. c) read category file(fp) reads the file object containing the citation data from over 200 categories. We are only interested in the category (str), number of journals int), and total CSE 231 Spring 2019 Deliverables The deliverable for this assignment is the following file proj06.py - the source code for your Python program Be sure to use the specified file name and to submit it for grading via the Mimir system before the project deadline Notes and Hints 1. 2. The replace function is useful to remove unwanted characters from a string When reading the citation and journal files, use the reader function from csv module to read each line of the file because some values have commas import csv popen file reader csv . reader (fp) # create csv reader header -next (reader, None) # read one line (useful for skip) for line list in reader: #line list is a list of the line 3. The try-except structure will help determine whether the current column is numeric You can try to convert a string to a float number. If Python raises a ValueError, it means that converting the string to a float type is not possible try: x-float (some str) except ValueError: # do something because some-str isn't a float Sample Output read journal file function: fp- open( ' journal-impact-small .csv ' , ' r ' ) instructordata = [('REVIEWS OF MODERN PHYSICS. 41133, 33.177), ("NEW ASTRONOMY REVIEWS',922, 6.154), ('Nonlinear Analysis-Hybrid Syst' 812, 3.192), ('Microfluidics and Nanofluidics',4089, 2.537) - EXTREMOPHILES', 2718, 2.346), JOURNAL OF COMPUTING IN CIVIL 1541, 1.855),Journal of Neurosurgery-Pediat', 2567, 1.757)'WORLD BANK RESEARCH OBSERVER', 784, 1.667), 'Archaeological and Anthropolog', 301, 1.636),"SKELETAL RADIOLOGY',4318, 1.527), ARCHAEOMETRY, 2112, 1.364), 'Molecular & Cellular Toxicolog', 299, 1.24), ('Applied Geophysics',417, 0.804),Fixed Point Theory', 304, 0.581),(China Communications', 275, 0.424) ] CSE 231 Spring 2019 student-data read-journal-file (fp) assert instructor_datastudent_data read category file function test: fp = open( 'category-impact. Sma 11.csv. 'r') student_data- read_category file (fp) instructor data-[ ('ACOUSTICS', 32, 138295, 4321.71875), 'AGRICULTURE, MULTIDISCIPLINARY,57, 170336, 2988.3508771929824), BIOCHEMISTRY&MOLECULAR BIOLO', 289, 3273965, 11328.598615916955), CHEMTSTRY, MULTIDISCIPLINARY', 163, 2825242, 17332.77300613497) ('ENGINEERING, ENVIRONMENTAL', 50, 510092, 10201.84), ('ENGINEERING, GEOLOGICAL', 35, 76977, 2199.342857142857)'ENVIRONMENTAL SCIENCES', 225, 1412031, 6275.693333333334), ('ETHNIC STUDIES', 15, 11308, 753.8666666666667),GEOGRAPHY, PHYSICAL', 49, 191491, 3907.9795918367345GEOLOGY', 47, 102891, 2189.1702127659573), GERIATRICS & GERONTOLOGY', 49, 171259, 3495.081632653061),'HEALTH CARE SCIENCES&SERVICE, 88, 272255, 3093.806818181818), 'MATERIALS SCIENCE , COATINGS & ', 18, 209367, 11631.5), ("MATERIALS SCIENCE, TEXTILES', 23, 35426, 1540.2608695652175), 'PSYCHOLOGY, APPLIED', 79, 173846, 2200.5822784810125) ] assert instructor datastudent data sort data function test: student_data-'ONCOLOGY',213, 1634966, 7675.896713615023), CHEMISTRY, MEDICINAL', 59, 425363, 7209.542372881356), BIOTECHNOLOGY&APPLIED MICROBIOLOGY, 161, 1103236, 6852.39751552795), (DEVELOPMENTAL BIOLOGY',41, 273038, 6659.463414634146),BEHAVIORAL SCIENCES,51, 305160, 5983.529411764706),MEDICINE, RESEARCH & EXPERIMENTAL', 124, 694043, 5597.120967741936)PHYSICS, MATHEMATICAL', 53, 283825, 5355.188679245283),METALLURGY &METALLURGICAL ENGINEERING', 73, 360924, 4944.164383561 644), 'NUCLEAR SCIENCE&TECHNOLOGY', 32, 149291, 4665.34375)MARINE &FRESHWATER BIOLOGY', 104, 399530, 3841.6346153846152), 'AGRONOMY', 83, 237099, 2856.614457831325), 'VETERINARY SCIENCES', 138, 277519, 2011.0072463768115), 'SOCIOLOGY', 142, 178756, 1258.8450704225352),'HISTORY &PHILOSOPHY OF SCIENCE', 44, 22128, 502.90909090909093)] instructor data = [('AGRONOMY, 83, 237099, 2856614457831325), BEHAVIORAL SCIENCES, 51, 305160, 5983.529411764706), BIOTECHNOLOGY&APPLIED MICROBIOLOGY, 161, 1103236, 6852.39751552795), ('CHEMISTRY, MEDICINAL',59, 425363, 7209.542372881356),DEVELOPMENTAL BIOLOGY', 41, 273038, 6659.463414634146),HISTORY&PHILOSOPHY OF SCIENCE', 44, 22128, 502.90909090909093), 'MARINE & FRESHWATER BIOLOGY', 104, 399530, 3841.6346153846152), 'MEDICINE, RESEARCH &EXPERIMENTAL, 124, 694043, 5597.120967741936), 'METALLURGY&METALLURGICAL ENGINEERING' 73, 360924, 4944.164383561644), ('NUCLEAR SCIENCE &TECHNOLOGY', 32, : 4/8 CSE 231 Spring 2019 149291, 4665.34375),C'ONCOLOGY', 213, 1634966, 7675.896713615023), PHYSICS, MATHEMATICAL, 53, 283825,5355.188679245283), 'SOCIOLOGY',142, 178756, 1258.8450704225352),'VETERINARY SCIENCES', 138, 277519, 2011.0072463768115) ] assert instructor data sort data (student data, 0) prepare_plot data function test: student_data-'Psychological Science in the Public Interest', 858, 19.286), 'Cell Metabolism', 21343, 17.303), ('JOURNAL OF NUCLEAR MEDICINE ' , 22728, 5.849), ("CANCER", 62200, 5.649), ('BRAIN PATHOLOGY ', 4403, 5.256), ('AMERICAN ECONOMIC REVIEW', 35805, 3.833),'INTERNATIONAL JOURNAL OF FOOD MICROBIOLOGY, 22247, 3.445), DRUG SAFETY", 4104, 3.206), ('PSYCHOLOGICAL ASSESSMENT, 7886, 2.901),DRUGS&AGING',2827, 2.61), Journal of Diabetes Investigation', 966, 2.294)'Journal of Real-Time Image Processing', 341, 1.564), CROP SCIENCE', 15892, 1.55), JOURNAL OF RADIATION RESEARCH',2071, 1.536), ('Clinical Nursing Research',563, 1.359), ('Economics of Energy & Environmental Policy', 108, 1.172), 'International Journal of Speech-Language Pathology', 485, 0.985), 'AGROFORESTRY SYSTEMS', 2306, 0.91), 'CREATIVITY RESEARCH JOURNAL', 1712, 0.881),'Information Technology for Development', 258, 0.857),INTERNATIONAL JOURNAL OF COMPUTATIONAL FLUID DYNAMICS, 506, 0.772),'NORWEGIAN JOURNAL OF GEOLOGY, 770, 0.69), ASTRONOMY& GEOPHYSICS', 134, 0.256) instructornames-['Psychological Science in the P, "Cell Metabolism', 'JOURNAL OF NUCLEAR MEDICINE','CANCER'BRAIN PATHOLOGY',AMERICAN ECONOMIC REVIEW', INTERNATIONAL JOURNAL OF FOOD ', 'DRUG SAFETY', 'PSYCHOLOGICAL ASSESSMENT', 'DRUGS & AGING"] instructor_impact-[19.286, 17.303, 5.849, 5.649, 5.256, 3.833 .445, 3.206, 2.901, 2.611 assert (instructor_names, instructor_impact) prepare_plot_data (student_data) Test Case 1: Please enter a valid filename: category_impact_2017.csv Please enter a valid filename: journal_impact 2017.csv Column number to sort data (1-category, 2-journals, 3-citations, 4-average citations): 1 Citation Data of the Top 20 Categories Category ACOUSTICS Journals Total Citations 174,802 Citation per Journal 5,638.774 31 CSE 231 ng 2019 ,821 166, 334 192,794 219,711 287,102 127,991 65,760 AGRICULTURAL ECONOMICS & POLIC AGRICULTURAL ENGINEERING AGRICULTURE, DAIRY& ANIMAL SC AGRICULTURE, MULTIDISCIPLINARY AGRONOMY ALLERGY ANATOMY & MORPHOLOGY ANDROLOGY ANESTHESIOLOGY ANTHROPOLOGY AREA STUDIES ASTRONOMY & ASTROPHYSICS AUDIOLOGY & SPEECH-LANGUAGE PA AUTOMATION & CONTROL SYSTEMS BEHAVIORAL SCIENCES BIOCHEMICAL RESEARCH METHODS BIOCHEMISTRY & MOLECULAR BIOLO BIODIVERSITY CONSERVATION BIOLOGY 1,413.000 11,881.000 3,213.233 3,300.023 4,740.407 3,131.429 201,325 126,983 918 1,071,345 100,231 350,086 259 797,638 3,625,819 207,782 491,775 1,493.918 572.206 16,232.500 4,009.240 5,739.115 6,985.471 18,096.684 12, 374.809 3,645.298 5,785.588 68 293 TOTAL 1,221 8,626,078 111,845.400 Do you want to plot the journal data (yeso)? no st Case Please enter a valid filename: xxxx Error with the file. Please enter a valid filename: category_impact_2016.csv Please enter a valid filename: journal impact 2017 Error with the file. Please enter a valid filename: journal impact 2016.csv Column number to sort data (1-category, 2-journals, 3-citations, 4-average tations) Citation Data of the Top 20 Categories MULTIDISCIPLINARY SCIENCES PHYSICS, CONDENSED MATTER CHEMISTRY, PHYSICAL PHYSICS, ATOMIC, MOLECULAR & C CHEMISTRY, MULTIDISCIPLINARY ELECTROCHEMISTRY PHYSICS, PARTICLES & FIELDS ASTRONOMY&ASTROPHYSICS NANOSCIENCE & NANOTECHNOLOGY CHEMISTRY, ORGANIC PHYSICS, APPLIED ENGINEERING, ENVIRONMENTAL BIOCHEMISTRY&MOLECULAR BIOLO MATERIALS SCIENCE, COATINGS & PHYSICS, MULTIDISCIPLINARY ournals Total Citations 2,803,793 1,344,772 2,865,201 705,786 3,088,211 531,031 474,927 979,492 1,332,720 774,862 1,875,869 619,251 3,435,913 224,479 915,427 Citation per Journal 43,809.266 20,071.224 19,624.664 19,605.167 18,603.681 18,311.414 16,376.793 15,547.492 15,318.621 87 12,674.791 12,637.776 11,847.976 11,814.684 11,587.684 148 CSE 231 Spring 2019 ENERGY & FUELS PHYSICS, NUCLEAR AGRICULTURAL ENGINEERING CELL BIOLOGY MATERIALS SCIENCE, MULTIDISCIP 1,031,892 218,773 150,733 2,044,775 2,957,270 11,216.217 10,938.650 10,766.643 10,761.974 10,753.709 TOTAL 1,922 28,375,177 315,401.678 Do you want to plot the journal data (yeso)? n Incorrect answer! Enter yeso Do you want to plot the journal data (yeso)? no Test Case 3: Plot Test Please enter a valid filename : category mpact 2017.csv Please enter a valid filename journal_impact_2017.csv Column number to sort data (1-category, 2-journals, 3-citations, 4-average citations): 3 Citation Data of the Top 20 Categories Journals Total Citations Citation per Journal 12,374.809 20,282.082 12,109.888 21,686.599 48,948.562 8,989.973 11,234.605 14,344.116 8.660.969 7,823.578 BIOCHEMISTRY & MOLECULAR BIOLO CHEMISTRY, MULTIDISCIPLINARY MATERIALS SCIENCE, MULTIDISCIP CHEMISTRY, PHYSICAL MULTIDISCIPLINARY SCIENCES NEUROSCIENCES CELL BIOLOGY PHYSICS, APPLIED ONCOLOGY ENVIRONMENTAL SCIENCES ENGINEERING, ELECTRICAL & ELEC NANOSCENCE & NANOTECHNOLOGY PHARMACOLOGY & PHARMACY PHYSICS, CONDENSED MATTER MEDICINE, GENERAL & INTERNAL BIOTECHNOLOGY&APPLIED MICROB CLINICAL NEUROLOGY IMMUNOLOGY ENERGY & FUELS SURGERY 3,625,819 3,468,236 3,451,318 3,187,930 3,132,708 2,346,383 2,134,575 2,094,241 1,931,396 1,893,304 1,636,339 1,579,362 1,571,415 1,490,204 1,456, 323 1,323,552 1,303,928 1,280,207 1,278,572 1,206,541 285 147 261 190 146 26e 17,166.978 6,020.747 22,241.851 9,395.632 8,220.820 6,618.924 8,259.400 13,181.155 6,032.705 161 197 155 200 TOTAL 3,667 41,392,353 392 269,886.997 Do you want to plot the journal data (yeso)? yes CSE 231 Spring 2019 ournal Impact Factor Nature Reviews Materials Nature Energy NEW ENGLAND JOURNAL OF MEDICIN NATURE REVIEWS IMMUNOLOGY NATURE REVIEWS DRUG DISCOVERY NATURE REVIEWS CANCER LANCET JAMA-JOURNAL OF THE AMERICAN M CHEMICAL REVIEWS CA-A CANCER JOURNAL FOR CLINIC 50 100 150 Impact Factor 200 250 Grading Rubrics Computer Project #06 General Requirements 06 pts) Coding Standard 1-9 Scoring Summary (descriptive comments, function headers, etc...) Implementation: --(4 pts) open-file function -2 Did not use try/except -2 Did not while loop read journal file function 0(5 pts) 0(5 pts) read category file function 0-(3 pts) sort-data tinction 0(3 pts) prepare plot data function 0-(6 pts) Test! 0_(8 pts) Test2 --(5 pts) Test3: Plotting : 8/8
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started