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

  Assess the benefits gained by running applications when the

most operating systems use a virtual memory manager vmm whose responsibility is to manage the relationship between the

  The ways to depict constraint graph

The ways to depict constraint graph? illustrate how splitting a domain can be used to solve this problem.

  Make a perl script that accepts the name of directory

build a Perl script that accepts the name of directory as an argument to the script, and lists out the files in this directory that are older than 2 hours from the time the script is executed.

  1 complete the partial code provided with this lab that

1. complete the partial code provided with this lab that implements a simple group communication application using

  Program that help an elementary school learn multiplication

Computers are playing an increasing role in education. Write a program that will help an elementary school learn multiplication. make Use of a Random object to produce two positive one-digit integers.

  Creates a competitive environment

The capable project manager understands what motivates team members and creates a competitive environment in which individuals compete as part of a high-performing team and are required to excel

  Generating the crow’s foot erd

Provided the following business scenario, generate a Crow’s Foot ERD utilizing a specialization hierarchy if suitable. Tiny Hospital keeps the information on patients and the hospital rooms.

  Find out the correct solution

if the percentage of the correct answers is 75% of the 10 questions, then it would take us to the next level from 7 to 9. it continues to next level from 10 to 60 and thne next level from 70 to 90.

  Is platos view of knowledge more closely aligned

Heraclitus concluded that everything is "becoming", or that everything is in a state of flux. Parmenides concluded reality is Being, one thing which is motionless, eternal etc. Compare their conclusions with the ideas of Plato in the divided line ..

  Data storage problem in the database tables

You must select the data storage problem of your interest and recognize the different pieces of the data which must be stored within the database.

  Developing uml one state diagram

How the system responds to the external and/or internal events by developing a UML ONE State Diagram.

  At what rate must the magnetic field change

At what rate must the magnetic field change with the time if an induced current of 10 A is to appear in the loop?The resistivity of copper is 1.7X10^-8 ohm.

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