Skip to content

Instantly share code, notes, and snippets.

View AlessandraSozzi's full-sized avatar

Alessandra Sozzi AlessandraSozzi

  • IMF
  • Washington, DC
View GitHub Profile
@AlessandraSozzi
AlessandraSozzi / index.html
Last active October 6, 2015 16:53
Combination of Stroke Dash Interpolation and Point-Along-Path
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<style>
path {
fill: none;
stroke: #000;
stroke-width: 3px;
}
circle {
@AlessandraSozzi
AlessandraSozzi / complete.json
Created November 4, 2015 15:29
Mille Miglia 2015
[{"type":"aggregatedCount","time":"Thu May 14 2015 10:15:00 +0000","value":0},{"type":"aggregatedCount","time":"Thu May 14 2015 10:20:00 +0000","value":1},{"type":"aggregatedCount","time":"Thu May 14 2015 10:25:00 +0000","value":1},{"type":"geolocatedTweet","time":"Thu May 14 2015 10:28:48 +0000","coordinates":[45.535274650000005,10.22381405]},{"type":"aggregatedCount","time":"Thu May 14 2015 10:30:00 +0000","value":42},{"type":"geolocatedTweet","time":"Thu May 14 2015 10:30:23 +0000","coordinates":[45.535274650000005,10.22381405]},{"type":"aggregatedCount","time":"Thu May 14 2015 10:35:00 +0000","value":39},{"type":"geolocatedTweet","time":"Thu May 14 2015 10:35:32 +0000","coordinates":[45.535274650000005,10.22381405]},{"type":"aggregatedCount","time":"Thu May 14 2015 10:40:00 +0000","value":68},{"type":"geolocatedTweet","time":"Thu May 14 2015 10:43:43 +0000","coordinates":[45.535274650000005,10.22381405]},{"type":"aggregatedCount","time":"Thu May 14 2015 10:45:00 +0000","value":73},{"type":"aggregatedCount
@AlessandraSozzi
AlessandraSozzi / index.html
Last active December 23, 2015 14:27
Stroke-dasharray animation with arrow orientation
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<style>
path {
fill: none;
stroke: #000;
stroke-width: 3px;
}
circle {
@AlessandraSozzi
AlessandraSozzi / increase.csv
Last active January 21, 2016 11:32
#PragmaConf 2015 Women Participants & Speakers
year value
2013 2
2014 6
2015 19
@AlessandraSozzi
AlessandraSozzi / data.tsv
Last active January 21, 2016 11:37
#PragmaConf 2015 Participants country of origin
first second third
1 0.73 0.47
0 0.27 0.53
@AlessandraSozzi
AlessandraSozzi / circles.json
Last active January 21, 2016 11:41
#PragmaConf 2015 Participants
{"objects":[
{"circle":{"coordinates":[47.4156189,8.5889722]}},
{"circle":{"coordinates":[45.6982642,9.6772698]}},
{"circle":{"coordinates":[45.4654219,9.1859243]}},
{"circle":{"coordinates":[37.5078772,15.0830304]}},
{"circle":{"coordinates":[45.5454787,11.5354214]}},
{"circle":{"coordinates":[46.151241,14.995463]}},
{"circle":{"coordinates":[45.9549755,13.6493044]}},
{"circle":{"coordinates":[43.7695604,11.2558136]}},
{"circle":{"coordinates":[41.9027835,12.4963655]}},
We can make this file beautiful and searchable if this error is corrected: It looks like row 16 should actually have 12 columns, instead of 4. in line 15.
Liability,Instrument,Asset,Y2006,Y2007,Y2008,Y2009,Y2010,Y2011,Y2012,Y2013,Y2014 MFI,Currency,PC,0.58,0.63,0.53,0.54,0.57,0.57,0.49,0.55,0.55 MFI,Currency,RoW,1.35,1.4,1.37,1.25,1.3,1.31,1.38,1.43,1.51 MFI,Currency,Unknown,47.03,47.99,50.44,56.88,58.8,62,65.33,67.45,71.01 CG,Currency,PC,0.06,0.07,0.06,0.06,0.06,0.06,0.05,0.06,0.06 CG,Currency,RoW,0.15,0.16,0.15,0.14,0.14,0.15,0.15,0.16,0.17 CG,Currency,Unknown,3.58,3.63,3.74,3.8,3.87,3.9,4.06,4.08,4.26 RoW,Currency,PNFC,0.54,0.59,0.56,0.48,0.5,0.5,0.51,0.48,0.56 RoW,Currency,MFI,0.16,0.19,0.38,0.31,0.15,0.12,0.12,0.15,0.19 Unknown,Currency,PNFC,3.28,3.49,3.76,4.09,4.26,4.48,4.72,4.94,5.22 Unknown,Currency,MFI,9.82,8.38,7.63,12.41,10.12,10.64,11.18,10.72,11.19 Unknown,Currency,OFI,0.08,0.08,0.08,0.08,0.08,0.08,0.08,0.08,0.08 Unknown,Currency,HH+NPISH,37.43,39.66,42.71,44.09,48.21,50.69,53.41,55.78,58.78 MFI,Deposits,PC,6,3.9,2.64,2.6,2.44,3.51,2.35,2.91,2.78 MFI,Deposits,PNFC,247.44,269.97,263.27,278.38,299.34,293.32,312.84,331.32,357.69 MFI,Deposits,MFI,1282.
@AlessandraSozzi
AlessandraSozzi / TW_WGS84.geojson
Last active April 22, 2016 10:27
Outliers magnitude vs Consumption
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AlessandraSozzi
AlessandraSozzi / d3.v3.min.js
Last active June 25, 2016 12:19
NYC Taxi Trips
!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function a(n){return n.length}function o(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function s(n){return(n+="")===xa||n[0]===ba?ba+n:n}function f(n){return(n+="")[0]===ba?n.slice(1):n}function h(n){return s(n)in this._}function g(n){return(n=s(n))in this._&&delete this._[n]}function p(){var n=[]
@AlessandraSozzi
AlessandraSozzi / nextResults.py
Last active July 3, 2016 12:06
Google Custom Search API - Get Next pages up to 100 results
from search import SearchWithGoogle
import time
import pandas as pd
import config
gs = SearchWithGoogle("5Ps People, Planet, Partnership, Peace, and Prosperity")
gr = gs.search()