SOLVED:Web Scraping III ISTA 350 Hw8,

35.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: zip solution files instantly, after Payment

Securely Powered by: Secure Checkout

Description

5/5 - (2 votes)

Introduction. This homework is the third part of an introduction to the art of web scraping. Now that you have scraped, cleaned, and stored some data, you will do some statistics on it and plot it. At the heart of this assignment are the numpy, pandas, and matplotlib modules. Instructions. Copy your hw7.py module and rename the copy hw8.py. Below is the spec for five new functions and some additions to main. Implement them and upload your module to the D2L dropbox. Testing. Download hw8_test.py and the associated files necessary for testing and put them in the same folder as your hw8.py module. Run it from the command line to see your current correctness score. Each of the five new functions in hw8.py is worth 20% of your correctness score. The test file we will use to grade your program will be different and may uncover failings in your work not evident upon testing with the provided file. Add any necessary tests to make sure your code works in all cases.
Documentation. Your modules must contain a header docstring containing your name, your section leader’s name, the date, ISTA 350 Hw8, and a brief summary of the module. Each method/function must contain a docstring. Each docstring should include a description of the function’s purpose, the name, type, and purpose of each parameter, and the type and meaning of the function’s return value. Grading. Your module will be graded on correctness, documentation, and coding style. Code should be clear and concise. You will only lose style points if your code is a real mess. Include inline comments to explain tricky lines and summarize sections of code (not necessary on this assignment). Collaboration. Collaboration is allowed. You are responsible for your learning. Depending too much on others will hurt you on the tests. “Helping” others too much harms them in reality. Cite any sources/collaborators in your header docstring. Leaving this out is dishonest. Resources. http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.html#pandas.DataFrame hw8.py: get_panda: this function takes a string representing a filename as its sole argument. The file contains a json object representing a list of lists. Load the list and store it into a variable. Return a DataFrame that has the same data as the list with row labels (index) that are the three-letter abbreviations for the months and the year [‘Jan’, ‘Feb’, …, ‘Dec’, ‘Ann’] and column labels (columns) that are integers representing years [1894, 1895, …]. get_stats: this function takes a DataFrame as its sole argument and returns a new DataFrame containing a statistical summary of the argument. Use these values for the return object’s index: [‘mean’, ‘sigma’, ‘s’, ‘r’] and the index from the argument for its columns. Calculate the statistics and populate the DataFrame with them. You may want to store them in a list of lists or np array and then pass that to the DataFrame constructor. print_stats: this function takes a filename as its sole argument. Print the following header: ‘—– Statistics for

  • 8.zip