This page explores the creation of simple interactive charts created from weighted data from the The Pew Research Center's Internet & American Life Project, "The Social Side of the Internet". Permission to use the survey data was granted by the Pew Research Center's Internet Project December 2013.

The charts were created with R, using the following packages:

The chart uses aggregated data prepared to provide weighted totals for plotting. The tooltip modification appears below. The hashtag and pound characters #! are a bit of hackery graciously provided to me by Ramnath Vaidyanathan, the rCharts package author.

mp <- mPlot(ttl~sex, data = agg, type = "Bar", names.arg=c("Male","Female") ) mp$set(hoverCallback = "#! function(index, options, content){ var row = options.data[index] return '' + row.sex + '' + '
' + 'Weighted Total: ' + row.ttl + '
' + 'Percent: ' + row.pct } !#") mp