首页 > > 详细

讲解 DS 413/613 FINAL EXAM讲解 R编程

DS 413/613  FINAL EXAM (2,4,5,and 6 only)

Instructions:  Please submit on Canvas an RMarkdown File and a HTML file for problems 2,4, and 5.  For the shiny app problem (problem 6) you are to submit your shiny app code in a separate R file.  Do not send an R Markdown file for problem 6.

1) Use the link https://forecast.weather.gov/MapClick.php?CityName=Washington&state=DC&site=LWX&textField1=38.895&textField2=-77.0373&e=1#.YLPCyflKiUk R code and the Web Scraping methods illustrated in class to collect data on weather for Denver Colorado.  The entire table is given below (There may be differences in your table, but structurally, you should get a table very similar to the one shown below.  Do not forget to use Chrome and Selector Gadget. Show and use all R code needed for this problem

2) a) Use data.table coding to read in the nyc data as was done in class. Assign the data table to the variable flights3 (The nycdata.csv is found on Canvas in the Data.Table module 3/18/2024)

b) Use data.table coding to modify flights3 so that only the column variables origin, dest, and carrier appear.

c) Now use data.table coding that reflects an origin of JFK, a destination of SEA and a carrier of only Delta Airlines  DL.

d) Use data.table coding to remove the variable air_time from the original flights3 data table.

e) Use and show data.table coding to output the maximum and the minimum values for the variable distance.

f) Use two or three sentences to explain the summary provided below and then use and show data.table coding to produce the table.

3) Provided below is the famous poem “ Stopping by the Wood On a Snowy Evening”  by Robert Frost.

Use the text mining sequence of steps and the R code modeled in class to a) create a tibble, b) find line locations of words, c) produce a word frequency table, and d) and create a bar graph data visualization plot that will also display word frequency trends.

Hint( do not forget to process a single spaced body of text ; be careful about commas and double quotation marks. Use the examples demonstrated in class.)

Whose woods these are I think I know.

His house is in the village though;

He will not see me stopping here

To watch his woods fill up with snow.

My little horse must think it queer

To stop without a farmhouse near

Between the woods and frozen lake

The darkest evening of the year.

He gives his harness bells a shake

To ask if there is some mistake.

The only other sound’s the sweep

Of easy wind and downy flake.

The woods are lovely, dark and deep,

But I have promises to keep,

And miles to go before I sleep,

And miles to go before I sleep.

4) Go to and study the texmining R file again, Using the code provided, change the text link and produce your own word cloud. Screen shot your word cloud and post the image on Canvas. I used the link for the “I have a Dream Speech”, Find your own text source to use as data for your word cloud.

5) Use and show an R coding structure (found in your notes) that will produce the following matrix

6) Produce the R code(In an R script. file) that will produce the interactive shiny app shown below. The histogram and the boxplot are Reactive and controlled by the select input box Iris variables.



联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!