Skip to content

Instantly share code, notes, and snippets.

View nikolay-shenkov's full-sized avatar

Nikolay Shenkov nikolay-shenkov

  • Canada
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
function createVis(error, data, completion_type) {
// output error message, if any:
if (error) { console.log(error); }
// use a global variable to store parsed_data
// so that we have access to it from other functions
data_parsed = data;
// set a default completion type:
// if completion type is undefined, set it to female completion
@nikolay-shenkov
nikolay-shenkov / Read_data_demonstration.py
Created May 22, 2015 16:57
Office hour - read csv data in Python
# -*- coding: utf-8 -*-
"""
Tue May 19, 2015
Reading tabular data in Python
DA ND Office hour
We will use the improved turnstile dataset and
compare several different methods for reading in the data.
There are 42650 rows in the dataset.
@nikolay-shenkov
nikolay-shenkov / ggplot_diamonds_exploration.R
Last active August 29, 2015 14:18
How to create a plot of a categorical variable versus a continuous (numerical one) and deal with overploting.
library(ggplot2)
# some background about the data
# http://www.diamondse.info/
?diamonds
summary(diamonds)
str(diamonds)
is.factor(diamonds$clarity)
is.factor(diamonds$color)
# clarity and color are already factor variables
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.