Skip to content

Instantly share code, notes, and snippets.

@pierandrea
pierandrea / index.html
Created Apr 27, 2015
#KnightD3 - Exercise Module 6: Multiple lines
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>#KnightD3 - Exercise Module 6: Multiple lines</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.js"></script>
<style type="text/css">
body {
background-color: white;
@pierandrea
pierandrea / FacebookGovReport20132014.csv
Last active Aug 29, 2015
#KnightD3 - Exercise Module 5: Scatterplot, transitions and delays
View FacebookGovReport20132014.csv
country year2013 year2014 dataProduced2013 dataProduced2014
United States 12598 14274 81 79.1
India 3598 5473 53 44.7
United Kingdom 1906 2366 71.3 75.1
Germany 1687 2132 37.9 34.3
France 1661 2094 33.9 42.4
Italy 1699 1774 52.5 46.5
Brazil 1165 1212 33.8 34.3
Australia 603 829 65.5 68.6
Spain 404 500 39.6 37
@pierandrea
pierandrea / FacebookGovRep.csv
Last active Aug 29, 2015
#KnightD3 - Exercise Module 4: Adding scales and axes
View FacebookGovRep.csv
country year2013 year2014
United States 12598 14274
India 3598 5473
United Kingdom 1906 2366
Italy 1699 1774
Germany 1687 2132
France 1661 2094
Brazil 1165 1212
Australia 603 829
Spain 404 500
@pierandrea
pierandrea / FacebookGovRep.csv
Last active Aug 29, 2015
#Knight D3 - Exercise Module 3 - Creating a bar chart
View FacebookGovRep.csv
Country year2013 year2014
Afghanistan 0 1
Albania 6 16
Algeria 0 1
Andorra 0 3
Argentina 278 482
Armenia 1 1
Australia 603 829
Austria 28 46
Bahrain 1 3
View Facebook-Government-Report-2013-2014.csv
Country 2013 2014
Afghanistan 0 1
Albania 6 16
Algeria 0 1
Andorra 0 3
Argentina 278 482
Armenia 1 1
Australia 603 829
Austria 28 46
Bahrain 1 3
View Apps Scripts - Importing data from a different spreadsheet using scripts
function ImportDataRange() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName("toWorksheetName");
var ssraw = SpreadsheetApp.openById("fromSheetID");
var sheetraw = ssraw.getSheetByName("fromWorksheetName");
var range = sheetraw.getRange("rangeFrom");
var data = range.getValues();
sheet.getRange("rangeTO").setValues(data)
}
@pierandrea
pierandrea / Apps Script Code - Copy the edit response link from Google Forms entries into a Google Sheet
Last active Apr 11, 2020
Google Apps Script code to add Google Form edit response links to spreadsheet
View Apps Script Code - Copy the edit response link from Google Forms entries into a Google Sheet
@pierandrea
pierandrea / Facebook-Government-Requests-2013-2014.csv
Last active Aug 29, 2015
Government and Law Enforcement Requests for Facebook Data - 2013 vs 2014
View Facebook-Government-Requests-2013-2014.csv
Country 2013 2014
Afghanistan 0 1
Albania 6 16
Algeria 0 1
Andorra 0 3
Argentina 278 482
Armenia 1 1
Australia 603 829
Austria 28 46
Bahrain 1 3
You can’t perform that action at this time.