Skip to content

Instantly share code, notes, and snippets.

@askrht
askrht / ClusterCars.Rmd
Last active August 29, 2015 14:15
Hierarchical Clustering using cars dataset
---
title: "Cluster Analysis on Cars"
author: "Rohit Rana"
date: '`r Sys.Date()`'
output:
html_document: default
pdf_document: default
---
## Cluster analysis
@askrht
askrht / googlevis.heatmap.R
Last active August 29, 2015 14:08
How to create a geographic heatmap using googleVis
## un-comment th eline below to install googleVis package
##install.packages("googleVis", dependencies = TRUE)
library(googleVis)
#op <- options(gvis.plot.tag='chart') # uncomment to dump the output as html
head(Exports) # let's peek at the data
# this function does the bulk of the work
Geo <- gvisGeoChart(Exports, locationvar='Country', colorvar='Profit',
options=list(height=300, width=350))
# The script that I use to broadcast tweets about
# Nike to Dashku's demo account, in CoffeeScript.
# require some npm libraries
Twit = require 'twit'
analyze = require('Sentimental').analyze
Placefinder = require 'placefinder'
dashku = require 'dashku'
# Set your API Key
@askrht
askrht / install_locust
Created May 28, 2013 02:14
Install and run Locust.io on OSX 10.8.3
virtualenv locust
cd locust
source bin/activate
git clone https://github.com/locustio/locust.git
cd locust
sudo port install libevent
CFLAGS="-I /opt/local/include -L /opt/local/lib" pip install gevent
python setup.py install
# run locust