Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions

Question

What is a reasonableness test?

Answered: 1 week ago

Question

What is the relation of physical mathematics with examples?

Answered: 1 week ago

Question

What are oxidation and reduction reactions? Explain with examples

Answered: 1 week ago