Skip to content

Instantly share code, notes, and snippets.

@Chicago
Chicago / gist:1165275
Created August 23, 2011 14:29
Crimes - Sample R code - Pie Chart
##Quick and easy way to visualize the crimes data set using open source techniques
##Have more ideas? Tell me about them at @ChicagoCDO
##All you need to do is install R at http://cran.r-project.org/ and run this file
install.packages("googleVis")
library(googleVis)
crimes_stage <- read.csv("http://data.cityofchicago.org/views/x2n5-8w5q/rows.csv")
attach(crimes_stage)
##remove first row with column names
crimes <- crimes_stage[-c(1),]
##create frequency table from crime
@Chicago
Chicago / gist:1113802
Created July 29, 2011 13:30 — forked from ChicagoMap/gist:1104919
Workups for Open Space
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Google Maps JavaScript API v3 Example: KmlLayer KML</title>
<link href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
var map;
@Chicago
Chicago / gist:1098404
Created July 21, 2011 22:37 — forked from srobbin/gist:1098045
Test of KML
<!DOCTYPE html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0px; padding: 0px }
#map_canvas { height: 100% }
</style>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
</head>