Articles by Andrew Brooks - R

Advanced Tips and Tricks with data.table

August 30, 2015 | Andrew Brooks - R

Tips and tricks learned along the way 1. DATA STRUCTURES & ASSIGNMENT =__ Columns of lists =__ Suppressing intermediate output with {} =__ Fast looping with set =__ Using shift for to lead/lag vectors and lists =__ Create multiple columns with := in one statement =__ Assign a column with := named with a character object 2. BY =__ Calculate a function ... [Read more...]

Render reports directly from R scripts

March 4, 2015 | Andrew Brooks - R

Workflow This post is really about workflow. Specifically a data-science workflow, although it should be relevant for others. It will probably resonate most (if at all) with those who have some experience (mostly positive) generating reports from Rmarkdown files with knitr, but might have some gripes. Maybe not gripes, maybe ... [Read more...]

New York Times Article Search API to MongoDB

January 5, 2015 | Andrew Brooks - R

Motivation Accessing NYT API Extracting and parsing the article body text Writing to MongoDB Pipeline Results Motivation I’ve learned a little about a lot of different corners of the text mining and NLP world over the last few years… which sometimes makes me feel like I know nothing for ... [Read more...]

Scraping with Selenium

December 10, 2014 | Andrew Brooks - R

If you’ve ever… felt like you’re playing Simon Says with mouse clicks when repeatedly extracting data in chunks from a front-end interface to a database on the web, well, you probably are. There’s probably a better solution – Selenium. ever used XML or httr in R or urllib2 ... [Read more...]

DIY building an R package

November 19, 2014 | Andrew Brooks - R

Why create a personal R package? As a consulting data scientist, I write a lot of R code in a lot of different places – physically and virtually. Different computers, servers, evironments, VPNs, operating systems, all of the above. Even when I have the luxury of working with the same client (... [Read more...]

Deploying Shiny apps with shinyapps.io

October 10, 2014 | Andrew Brooks - R

So I’ve been messing around with Shiny for a year or so now. It’s great tool and getting greater. the good: capability to rapidly build an interactive visualization with the full universe of R packages to choose from for the computation engine and visualization options. ability to code ... [Read more...]

How accurate is Next Bus II: wrangling data

September 9, 2014 | Andrew Brooks - R

Goal: determine how accurate Next Bus predictions are Step 1: Create a timeseries Step 2: Flag arrivals and departures Step 2: Filter Step 3: Calculate error in Next Bus predictions Step 4: Write out data to csv In a the previous post we extracted Next Bus predictions from the Wmata API. If that’s too ... [Read more...]

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)