Skip to content

Instantly share code, notes, and snippets.

View markmarkoh's full-sized avatar

Mark DiMarco markmarkoh

View GitHub Profile
@markmarkoh
markmarkoh / index.html
Last active December 24, 2015 03:19 — forked from ramnathv/index.html
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='http://d3js.org/d3.v3.min.js' type='text/javascript'></script>
<script src='http://d3js.org/topojson.v1.min.js' type='text/javascript'></script>
<script src='http://datamaps.github.io/scripts/datamaps.all.min.js' type='text/javascript'></script>
<style>
@markmarkoh
markmarkoh / code.R
Last active December 24, 2015 03:09 — forked from ramnathv/code.R
# read data and replace dots in names with underscores
obesity = read.csv(
'http://www.stat.berkeley.edu/classes/s133/data/obesity.csv',
stringsAsFactors = F
)
names(obesity) = gsub("\\.", "_", names(obesity))
# add column with two letter state names and
obesity = plyr::mutate(obesity,
State = str_trim(State),