by Earl F. Glynn, Kansas Watchdog This article describes how the data obtained from scraping 105 pages of county election data were analyzed and mapped using R. Background The Kansas Secretary of State published Nov. 2010 election results online, inclu... [Read more...]
by Earl F. Glynn, Kansas Watchdog The goal of this article is to describe how to “reshape” data from screen scraping to make analysis with existing tools easier. Background The Kansas Secretary of State published Nov. 2010 election results ... [Read more...]
by Earl F. Glynn, Kansas Watchdog The goal of this article is to show how to visit 105 online web pages programmatically and “scrape” data from them to form a statewide summary of election data in Kansas. An earlier article gave details of ... [Read more...]
The folks at IPE at UNC have produced this nice animated gif of some network data on increasing financial integration in the run-up to the 2008 crisis. They used a small trick I pointed to a while ago (just using a pipe, nothing fancy) that lets you generate the gif from ... [Read more...]
Here's some R code that can be used to download archived tide height data from NOAA's CO-OPS OPeNDAP server. The code makes use of RCurl to send a URL query to the server, and then splits apart the resulting data into a data frame. [Read more...]
by Earl F. Glynn, Kansas Watchdog The goal of this exercise is to show how to “screen scrape” data from an online web page using R. Additional articles will extend this example to scrape data from 105 Kansas county pages to form a statewide... [Read more...]
Packages for R are being added and updated so frequently now that it's tough to keep up with them all (the @CRANberriesFeed Twitter feed helps, though). But here are a couple of recent package updates that caught my eye: The Rcpp package for seamless integration between R and C++ has ... [Read more...]
In my explorations with R, Mathematica, FreeMat, MatLab, and RapidMiner (now with R support! Yay!), I’m seeing integration of R to be quite useful in building a trading app, as technical analysis is one of R’s fortés. For the sake of brevity, I’...
This post is the introduction to a series that will illustrate how to backtest the same strategy in Excel and R. The impetus for this series started with this tweet by Jared Woodard at Condor Options. After Soren Macbeth introduced us, Jare... [Read more...]
A simple challenge in Le Monde this week: find the group of four primes such that any sum of three terms in the group is prime and the overall sum is minimised. Here is a quick exploration by simulation, using the schoolmath package (with its imperfections): A=primes(start=1,end=53)[... [Read more...]
For students planning to attend the annual worldwide R user conference, useR! 2011, travel grants are available to help defray the cost of attending the conference in the UK. CRISM is offering bursaries for accommodation and conference fees, and Revolu... [Read more...]
In his detailed research on RSI(2) indicator, MarketSci emphasized several times that the contrarian strategies based on the RSI(2) indicator didn’t start working until the 80s. I remembered this observation recently when I observed another interesting anomaly … In statistics, an important initial step in studying time series data is ... [Read more...]
Had a mental block today trying to figure out how to get the indices of columns in a data frame given their names. Simple task but difficult to search Google for an answer. Thanks to jashapiro, Matt, and Vince for giving me a heads up on the which() fu... [Read more...]
Book InformationMittal, H. (2011). R graphs cookbook. Birmingham, UK: Packt Publishing Ltd.AudienceThe book's stated audience is anyone who is familiar with the basics of R, as well as expert users who are looking for a graphical reference. However, it...
As we dig deeper into Stata or R debate, a few questions have come up.Question 1: One of the things Stata does well is the way it constructs new variables (see example below). How to do this in R? We can rewrite it as-is using for loops in R... [Read more...]
I would like to thank Tal Galili for establishing and maintaining the blog aggregator at R-bloggers. This site has been added to their directory and new posts which are tagged with R will now appear on their feed. https://www.r-bloggers.com/ In part a, I presented a series of ... [Read more...]
My friend Michael Bommarito has been doing the data community quite a service, capturing and sharing all of the traffic on Twitter related to the Iranian protests. Specifically, he has all of the tweets containing the #25bahman hast-tag, and made them available for anyone to download.
I am unable to ... [Read more...]
When I find a chart that looks like this, I always like to explore a little further. via StockCharts.com I pull it into R and try to find anything worthwhile. I do not find anything, except that I do not want to be trading both in the same direc...