Question: Explore Data Portal Create a R script or R markdown file. Download a dataset that is in csv format. Write code to import a dataset
Explore Data Portal
Create a R script or R markdown file. Download a dataset that is in csv
format. Write code to import a dataset and explore the dataset.
Explore the open data portal for a city or state you are interested. Do
you find any datasets interesting?
Download a csv dataset from the portal.
Check the first lines of the data.
Get a statistical summary of the data.
Read JSON file with R
Create a R script or R markdown file. Follow the instructions to import
and explore json data.
# install the packages
install.packagesrjson
install.packagesjsonlite
# load the packages
libraryrjson
libraryjsonlite
# find the directory where your file is saved
setwdfilepath
# read the file with streamin
jsonfile "snowstormsample.json"
stormtweets streaminfilejsonfile
# check the dimension of stormtweets
nrowstormtweets
ncolstormtweets
#extract the elements from storm tweets.
datetime stormtweets$createdat
username stormtweets$user$screenname
tweettext stormtweets$text
# check the values
strdatetime
strusername
strtweettext
# create a new data frame with the extracted information
storm data.framedatetime, username, tweettext
# simple summary of the dataset
headstorm
strstorm
#Process datetime information, count number of tweets for each
minute in the dataset
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
