Skip to content

Instantly share code, notes, and snippets.

@pierandrea
pierandrea / index.html
Created April 27, 2015 12:37
#KnightD3 - Exercise Module 6: Multiple lines
<!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 August 29, 2015 14:19
#KnightD3 - Exercise Module 5: Scatterplot, transitions and delays
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 August 29, 2015 14:19
#KnightD3 - Exercise Module 4: Adding scales and axes
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 August 29, 2015 14:18
#Knight D3 - Exercise Module 3 - Creating a bar chart
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
@pierandrea
pierandrea / Facebook-Government-Report-2013-2014.csv
Last active August 29, 2015 14:17
Facebook Government Report
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
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 September 9, 2024 06:46
Google Apps Script code to add Google Form edit response links to spreadsheet
@pierandrea
pierandrea / Facebook-Government-Requests-2013-2014.csv
Last active August 29, 2015 14:17
Government and Law Enforcement Requests for Facebook Data - 2013 vs 2014
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