Skip to content

Instantly share code, notes, and snippets.

View ivanku's full-sized avatar
🏠
Working from home

Ivan Kuznetsov ivanku

🏠
Working from home
View GitHub Profile
package main
import "fmt"
import "math/rand"
import "time"
const NoOfGames = 10000
const NoOfDoors = 3
func main() {
@ivanku
ivanku / heights_climate.jl
Created October 6, 2016 05:48
Are People in Colder Countries Taller? Code for downloading data and creating a visualization of average human male height as a function of country average annual temperature.
using Requests
using DataFrames
using ExcelReaders
using Plotly
using Colors
# read population height dataset
heightsUrl = "http://www.ncdrisc.org/downloads/height/NCD_RisC_eLife_2016_height_age18_countries.csv";
heights = get(heightsUrl; timeout = 30.0)
if heights.status != 200
using Requests
using LibExpat
using DataFrames
using Plotly
using Colors
res = get("https://en.wikipedia.org/wiki/List_of_countries_by_population_(United_Nations)");
et = xp_parse(bytestring(res.data));
rows = LibExpat.find(et, "//table[1]//tr");