Skip to content

Instantly share code, notes, and snippets.

View fformenti's full-sized avatar

Felipe Formenti Ferreira fformenti

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.
@fformenti
fformenti / index.html
Last active April 17, 2016 00:00
Simple Line Chart with Color Gradient
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.12/d3.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.min.js"></script>
<style>
body {
font-family: futura;
width: 960px;
@fformenti
fformenti / data_prep_domains.R
Created June 30, 2014 03:31
domain names data treatment
df <- read.csv('original_gtld.csv', header=TRUE,fileEncoding="LATIN-9")
names(df) <- c("Domain","Company")
df$Company <- gsub(pattern = "AARP", replacement = "AARP Company", df$Company)
df$Company <- gsub(pattern = "ALSTOM", replacement = "ALSTOM Company", df$Company)
df$Company <- gsub(pattern = "LANCASTER", replacement = "LANCASTER Company", df$Company)
df$Company <- gsub(pattern = "SES", replacement = "SES Company", df$Company)
df$Company <- gsub(pattern = "TRANSLATIONS", replacement = "TRANSLATIONS Company", df$Company)
@fformenti
fformenti / billionaires.R
Created June 19, 2014 07:21
Billionaires
# Source: http://www.forbes.com/billionaires/list/#tab:overall
# DateTaken: March 4th, 2014
data_path_original <- '../data/original/'
data_path <- '../data/'
# Load Data
df <- read.csv(paste0(data_path_original,"billionaires.txt"), header = TRUE, sep = "\t", stringsAsFactors=FALSE)
df <- head(df,1645)
@fformenti
fformenti / Clubs_ranked.csv
Last active August 29, 2015 14:02
World Cup 2014 Blogpost
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
Club;Ranking
Spain Real Madrid;1
Germany Bayern Munich;2
Italy Juventus;3
England Manchester City;4
Spain Barcelona;5
Germany Borussia Dortmund;6
France Paris Saint-Germain;7
Spain Atl?tico Madrid;8
England Liverpool;9