Download files over HTTPS in R with httr

< 1 min. read To download a file over HTTP connection, we normally use download.file command in R, for example: url = "http://vincentarelbundock.github.io/Rdatasets/csv/datasets/iris.csv" download.file(url, "iris.csv", quiet=TRUE) For HTTPS connections, download.file may give you some issues. In situations like this you can consider using the httr package to download files: library(httr) url <- "https://rawgit.com/yoke2/dsxref/master/iris.xlsx" GET(url, write_disk("iris.xlsx", overwrite=TRUE))

Wordcloud for National Day Rally 2014 speech

< 1 min. read Inspired by a wordcloud from Obama’s State of the Union address, let’s look at creating a wordcloud for Singapore’s National Day Rally 2014 speech using R. library(rvest) library(RCurl) ## Loading required package: bitops url <- "http://www.pmo.gov.sg/mediacentre/prime-minister-lee-hsien-loongs-national-day-rally-2014-speech-english" # scrapes the speech from the URL above curlSpeech<- getURL(url) speech <- curlSpeech %>% html() %>% html_nodes(".view-mode-full") %>% html_text() […]

A virtual environment for data science

< 1 min. read I wanted to conveniently use data science tools without the hassle of installing the required languages and packages, while benefiting from the strengths of the Linux command line tools. There is a pre-packaged VM called the Data Science Toolbox that fills this need. It comes with R and Python installed, along with the respective popular […]

Exploring Focal Length with Exiftool and R

5 min. read Picture Credits: Pixabay A good way to understand your shooting style and guide your future camera equipment buying decisions will be to discover your frequently used focal lengths. Focal Lengths can be extract from photos that have EXIF data, which in short refers to data on how these photos are taken. You can find out […]