The US Geological Surveys USGS National water Informa system

The US. Geological Surveys (USGS) National water Informa system (Nwis) is that supports the acquisition, vsualization, comprehensive and distributed webinterface processing, and long-term storage of w data. Summary of stream flow data each day for the period of record is provided by daily data reco that represent the daily mean ater level or other maximum, minimum, of stream flow (discharge derived values, for instance temperature Water We are intending to work with daily data record of one of t 27000 US stations which has the site number of 02162500 an near Check the following URL and learn about its content: 65 on&form; no 02465 waterdat s.govlnwi 2011-01-01 end dates2011-12-31 00&referred; modu sw&periode;&begin; dates It is rated format of a large table including stream flow data e, maximum, minimum and mean values of stream flow (discharge) and water level stages (gage-height) along with to their recording dates. Be aware that whatever you see following after \"a\" sign are commented information that we do not need them to be imported into Therefore, we are willing RStudio. import lines starting right after the last \"a\" sign as table of data into RStudio. Following functions must be investigated and used for importing information from this and webpage as text file into Rstudio, so you must search for learing the required arguments procedures url0 function read table following as one of the argument of this for If using \"read table()\" function you should use \"NA\" values for capturing missing data records of time-series and replace empty cells with ease up next procedures. na strings NA\") the objects that holds the data in R. Data will be imported as \"data.frame\" that is one type of modify or likewise matrix and array. Search about this types of object and see how you can work with them. Hint: sunf through following link read robe-cookbookldata-basi m/user-area/documentation/portfolio ioprobe a tab-separated file-into-l Problems to be solved:

Solution

I am assuming that file is downloaded from web and stored in the current directory as \"data.txt\"

1. USG$_Raw_Daily_Data <- read.table(file=\"data.txt\",sep=\'\\t\',header=TRUE)

2. USG$_Raw_Daily_Data <- USG$_Raw_Daily_Data[-1,] #Select all rows but first rows

3. cols_needed <- c(\"agency_cd\",\"site_no\",\"datetime\",\"X****_00060_00003\") #List of columns needed
USG$_Mean_Daily_Discharge_Data <- USG$_Raw_Daily_Data[,cols_needed] #Select all rows and necessary columns

4. names(USG$_Mean_Daily_Discharge_Data)[4] <- \"Mean Daily Discharge (cfs)\" #Change the name of 4th column

 The US. Geological Surveys (USGS) National water Informa system (Nwis) is that supports the acquisition, vsualization, comprehensive and distributed webinterfa

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site