Monthly Archives: September 2012

Discrete colors in ggplot

September 1, 2012
By
Discrete colors in ggplot

Have you ever wanted an easy way to generate continuous color pallettes for a discrete factor? I came across a question over on Stackoverflow about how add color to a ggplot figure. I often find myself with lot’s of categories that are discrete when I want a continuous color plot. This can be achieved by writing a quick...

Read more »

New Attribution Functions for PortfolioAnalytics

September 1, 2012
By
New Attribution Functions for PortfolioAnalytics

Another Google Summer of Code (GSoC) project this summer focused on creating functions for doing returns-based performance attribution. I’ve always been a little puzzled about why this functionality wasn’t covered already, but I think that most analysts do this kind of work in Excel. That, of course, has its own perils. But beyond the workflow

Read more »

Getting data on your government

September 1, 2012
By
Getting data on your government

I created an R package a while back to interact with some APIs that serve up data on what our elected represenatives are up to, including the New York Times Congress API, and the Sunlight Labs API. What kinds of things can you do with govdat? Here ...

Read more »