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 5 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.packages("rjson")
install.packages("jsonlite")
# load the packages
library('rjson')
library('jsonlite')
# find the directory where your file is saved
setwd(filepath)
# read the file with stream_in
json_file <- "snowstorm_sample.json"
storm_tweets <- stream_in(file(json_file))
# check the dimension of storm_tweets
nrow(storm_tweets)
ncol(storm_tweets)
#extract the elements from storm tweets.
date_time = storm_tweets$created_at
username = storm_tweets$user$screen_name
tweet_text = storm_tweets$text
# check the values
str(date_time)
str(username)
str(tweet_text)
# create a new data frame with the extracted information
storm <- data.frame(date_time, username, tweet_text)
# simple summary of the dataset
head(storm)
str(storm)
#Process date_time 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!