This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#data from http://www.modestinsights.com/analyzing-the-billboard-hot-100/ 'Instead I’ve uploaded all the raw data here, in PSV format ' | |
#library used is ggjoy from https://github.com/clauswilke/ggjoy | |
data<-read.csv("all_billboard_data.csv", header=TRUE, sep="\t")#this is the psv where ive swapped \| for \t. I probably didnt need to. | |
library(lubridate) | |
library(devtools) | |
install_github("clauswilke/ggjoy") | |
library(ggplot2) | |
library(ggjoy) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Code is a copy of 'It brings me ggjoy' http://austinwehrwein.com/data-visualization/it-brings-me-ggjoy/ | |
#Data from met.ie http://www.met.ie/climate-request/ | |
dublin.raw<-read.csv('dublinairportNoHead.csv', sep=',', header=TRUE) | |
head(dublin.raw) | |
library(lubridate) | |
library(dplyr) | |
library(ggjoy) | |
library(ggplot2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
oxford<-read.csv('oxforddata.csv', sep=',', header=TRUE) | |
options(digits=2) | |
oxford$min <- as.numeric(as.character(oxford$tmin)) | |
oxford$tmax <- as.numeric(oxford$tmax) | |
oxford <- oxford %>% mutate(average = (tmax+min)/2) | |
mins<-min(oxford$average) | |
maxs<-max(oxford$average) | |
oxford <- oxford %>% mutate(month =month.abb[mm]) | |
oxford$months<-factor(rev(oxford$month),levels=rev(unique(oxford$month))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setwd("/Users/davidcurran/Documents/monthlyEngland") | |
readLines("cetml1659on.dat", | |
n=10) | |
#Start of borrowed bit | |
## from https://gist.github.com/gavinsimpson/b52f6d375f57d539818b | |
CET <- url("http://www.metoffice.gov.uk/hadobs/hadcet/cetml1659on.dat") | |
cet <- read.table("cetml1659on.dat", sep = "", skip = 6, header = TRUE, | |
fill = TRUE, na.string = c(-99.99, -99.9)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(gapminder) | |
library(ggplot2) | |
library(devtools) | |
install_github("dgrtwo/gganimate") | |
library(gganimate) | |
library(dplyr) | |
mydata <- dplyr::select(gapminder, country,continent,year,lifeExp,pop,gdpPercap) | |
#bin years into 5 year bins | |
mydata$lifeExp2 <- as.integer(round((mydata$lifeExp-2)/5)*5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var SpeechToTextV1 = require('watson-developer-cloud/speech-to-text/v1'); | |
var speech_to_text = new SpeechToTextV1 ({ | |
username: 'username', | |
password: 'password' | |
}); | |
var params = { | |
name: 'DC Example model', | |
'base_model_name': 'en-US_BroadbandModel', | |
description: 'Example custom language model' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<tmx version="1.4"> | |
<header creationtool="" creationtoolversion="" | |
segtype="sentence" o-tmf="" adminlang="EN" | |
srclang="en" datatype="rtf" o-encoding="UTF-8" /> | |
<body> | |
<tu> | |
<tuv xml:lang="en"> | |
<seg>Exchange</seg> | |
</tuv> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import turtle | |
import random | |
random.seed(42) | |
i=0 | |
#file = open("emil.txt", "r") | |
#file = open("pi1000000.txt", "r") | |
file = open("sqrt2.txt", "r") | |
text=file.read() | |
pi = list(text) | |
pi = list(map(int, pi)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import turtle | |
#the number of digits to use | |
numDigits = 1000000 | |
changeColorInc = numDigits / 10 | |
colors = iter(["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6", "#551A8B"]) | |
#scale = 0.99 1k | |
#scale = 0.199#10k |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !/usr/bin/python3 | |
import turtle | |
import numpy as np | |
import math | |
#the number of digits to use | |
numDigits = 1000000 | |
changeColorInc = numDigits / 10 | |
colors = iter(["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6", "#551A8B"]) |