Importazione intermedia di dati in R
Filip Schouwenaars
Instructor, DataCamp
Prima: pagine e file dal web
JSON
Semplice, conciso, ben strutturato
Leggibile per l’utente
Facile da analizzare e generare per i computer
Per comunicare con le Web API
Application Programming Interface
Insieme di routine e protocolli per creare software
Come interagiscono i componenti
Web API
interfaccia per ottenere o aggiungere dati al server
verbi HTTP (GET e altri)
Ottenere tweet
Commentare i tweet
Molte applicazioni
url <- "http://www.imdb.com/title/tt0095953/"
download.file(url, "local_imdb.html")

Jeroen Ooms
Migliora pacchetti precedenti
Coerente, robusto
Copre tutti i casi d’uso
install.packages("jsonlite") library(jsonlite)fromJSON("http://www.omdbapi.com/?i=tt0095953&r=json")
List of 20
$ Title : chr "Rain Man"
$ Year : chr "1988"
$ Rated : chr "R"
$ Released : chr "16 Dec 1988"
$ Runtime : chr "133 min"
...
$ imdbVotes : chr "359,903"
$ imdbID : chr "tt0095953"
$ Type : chr "movie"
$ Response : chr "True"
Importazione intermedia di dati in R