Write a function senatorname

Assignment Help Computer Engineering
Reference no: EM131233879

Assignment:

Data Import ­ - A

Learning Objectives

In this assignment, you will learn how to:

? read and write Excel files

? shape data

Tasks

Before diving into the programming problems, study the data file "2013 Geographic Coordinate Spreadsheet for US Farmers Markets 8'3'1013"  that is provided for the assignment:

1. Load the data file into a data frame.

2. The seasons are not standardized and would make analysis difficult. Create six levels of seasons: Summer, Fall, Winter, Spring, Year­Round, Half­Year and convert each provided season in the Season1Date column to one of the season levels. Come up with reasonable rules, for example, June to August would be Summer, while 5/1 to 10/30 would be Half­Year. You need to use string processing functions to parse the strings and shape the data into the categories. If there are missing end dates, ignore the entire row.

3. Write a retrieval function acceptsWIC() that allows a data scientist to find which markets accept WIC. The function should output a data frame containing only the markets that accept WIC. Use the function and output the data frame.

Data Import ­ - B

Learning Objectives: In this assignment, you will learn how to:

? read and parse XML

? retrieve data from XML

Tasks

1. Load the XML document at the URL

(https://www.xmldatasets.net/temp/179681356453762.xml) directly into a data frame.

2. Write a function senatorName() that returns the names of the senators for a given state, i.e., the function takes a state as an argument and returns the names of the senators for that state in a vector.

3. Write a function senatorPhone() that returns the phone number for a given senator. The function should take the first and last name of the senator as an argument, parse the name, search for a match in the data frame and return the phone number for that senator.

Be sure to call your functions to test that it works. Use local variables only and pass any information your function needs as parameters.

Data Import ­ - C

Learning Objectives: In this assignment, you will learn how to:

? read and parse XML

? retrieve data from XML

Tasks

1. Load and then parse the XML document at the URL

(https://www.cs.washington.edu/research/xmldatasets/data/auctions/ebay.xml) using xmlTreeParse() . The data sets contains bidding information about items on eBay. Create any intermediate data objects as deemed necessary to write a function named moreFiveBids() to answer the following question: how many auctions had more than 5 bids? Use the function to output the answer.

2. Take a look at the data set on trades during a single day for ESZ13 futures trades at the URL https://www.barchartmarketdata.com/data­samples/getHistory15.xml. After loading the data, write and use the following functions to answer these retrieval queries:

a. highestClosingPrice() answers the question: what was the highest closing price for the security?

b. totalVolume() answers the question: what was the total volume traded?

c. averageVolume() answers the question: what was the average trading volume during each HOUR of the trading day? The function should place the result into a data frame containing the hour and average trading volume for that hour.

Data Import ­ - D

Learning Objectives: In this assignment, you will learn how to:

? read and parse text files

Tasks

1. Load IMDB movie listing from the file movies.list.gz. Note that the file is compressed so you need to figure out how to uncompress it in R. Inspect the file and determine how to best load it ­­ this is not an XML file and requires custom string parsing. 

2. Parse the data. You should identify all the fields and their meanings within the file. Place the data into a data frame suitable for further analysis.

3. Comment your code where you identify the movie rows that are part of your result set. 

4. Your result set should only contain movie title and movie release year. Your result set should NOT include rows for TV shows. You can identify the movies within the data file (look for a special marking field or some other indication). Make any other assumptions you need, but comment your assumptions. For a cleaner result set, look for duplicate titles and remove the duplicates.

5. For correct syntax, coding style and readable code format. If the data size is overwhelming, you can build a smaller subset of the file that's easier for testing, loads faster and is representative of the file (a random sample of rows). This is a common technique when building data loaders. This technique is for debugging purposes only.

Your submitted assignment should be run against the complete data set.

Assignment Link -

https://www.dropbox.com/s/pewqshz7oylv26w/Assignment.rar?dl=0

Reference no: EM131233879

Questions Cloud

Mentoring be used for career advancement : Topic: How Can Socialization and Mentoring Be Used for Career Advancement. In 300-400 words explain how socialization and mentoring can both help minimize resistance to change.
What is the flow rate under the practical worst case : Consider the following four-workstation production line. Station Number of Machines Processing Time (hours) 1 1 0.05 2 6 0.25 3 3 0.2 4 2 0.167 1) (15 pts) What are the bottleneck rate, raw process time and critical inventory of this production line?..
The senior management team of efficient network : The senior management team of Efficient Network HMO is evaluating the year-end data related to emergency room (ER) expenses. One physician group within the network had ER expenses that were three times the rate of any other group within the network. ..
Analyze the strategy of the organization and the hr strategy : Create a list of the key HR functions that you believe will be beneficial to the organization. From the list, choose one (1) HR function that will be the focus of your business proposal moving forward. Explain the main reasons why you chose that H..
Write a function senatorname : CS6020 Assignment: Write a function senatorName() that returns the names of the senators for a given state, i.e., the function takes a state as an argument and returns the names of the senators for that state in a vector
The life of the typical organization : What is the most important role HR managers play in the life of the typical organization? What might be the most challenging aspect of performing HR's role, and how can future HR professionals specifically prepare to meet such challenges?
How non-profit organizations can do at least : 1. Discuss how businesses can do at least two of the following; support, maintain, or decrease the quality of life for society. 2. Discuss how non-profit organizations can do at least two of the following; support, maintain, or decrease the qualit..
How would you help to explain this reorganization : It seems as though we are always hearing about health services organizations and health supplier organizations that are merging, consolidating, or going out of business. How would you help to explain this reorganization? Is this reorganization eve..
Receive the packages he needs from previous workstation : Jason Carter works for a producer of soaps that come in packages of 6 each. His job is to fill the packages with soap, and he is expected to process 30 packages an hour. The facility where Jason works uses a kanban production system in which each con..

Reviews

len1233879

10/7/2016 5:59:49 AM

It has to be written like someone just beginning to learn this stuff and there needs to be comments after each line of code saying what it's doing and I need to be able to run on my own computer through my working directory which is. https://drive.google.com/file/d/0B3vV-uda2F1yUTI0dmhVTlg2RUU/view

Write a Review

Computer Engineering Questions & Answers

  Compare and contrast machine and high-level languages

Assume that the memory cells at addresses F0 to F9 are in the machine described here, and that it contains the hexadecimal bit patterns described in the following table

  Write down a program using the vector class

create a program using vector class that allows the user to input the number of days worked in a 7 day workweek and, using a fixed hourly rate, calculates the weeks wages and the average number of hours worked per day.

  Explain why six-sigma efforts do not apply to software

why six-sigma efforts do not apply to software consider a situation where you are working for a large software

  Explain how to create a budget

Refer to the City of Granston Case. Using the ‘Current Year Q-3' data in Exhibit 2 and Exhibit 3, create a project supply and materials budget based on the information in the case. Your budget must include a one paragraph introduction on the impor..

  How can you limit breadth and scope of a vulnerability scan

What is a CVE listing? Who hosts and sponsors the CVE database listing Web site? What is Zenmap typically used for? How is it related to Nmap?  How can you limit the breadth and scope of a vulnerability scan?

  How to use ms access and create a database

How to use MS Access and create a database

  How to insert a row into the student table

Make yourself a student by writing and executing an INSERT statement to insert a row into the STUDENT table with data about you. Use one of the zip codes you inserted.

  How to design a class and a program

create a class and a program that creates an object of the class and prompts the user to enter the name, type, and age of his or her pet. This data should be stored in the object. Use the object's accessor method to retrieve the pet's name, type, ..

  Questiongenerate a time class which holds following

questiongenerate a time class which holds following information-hourminutesecondcreate a date class which holds the

  Consider the reasons implementations fail for at least

1. consider the reasons implementations fail. for at least three of these reasons explain why this happens if there is

  Give the type of clip art found at the sites

search on the Internet for at least 2 additional sites other than Microsoft's that offer clip art, either free or for a price. If you have real-life or professional experience with clip art sites.

  Give the trade-off between the two technologies

Cite two examples of a circuit switch and packet switch environment. Base one instance on a circuit switch and the other on a packet switch. Describe the trade-off between the two technologies and the reason why packet switching is more appropriat..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd