Skip to content

Instantly share code, notes, and snippets.

@ramnathv
Last active August 29, 2015 14:14
Show Gist options
  • Save ramnathv/4cd53e8c82039e497e67 to your computer and use it in GitHub Desktop.
Save ramnathv/4cd53e8c82039e497e67 to your computer and use it in GitHub Desktop.
Another Scatterplot
.axis line,
.axis path{
fill: none;
stroke: black;
}
.axis text {
font-size: 11px;
}
{"description":"Another Scatterplot","endpoint":"","display":"div","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"data.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"inlet.coffee":{"default":true,"vim":false,"emacs":false,"fontSize":12},"app.css":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"pingpong","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"ajax-caching":true,"thumbnail":"http://i.imgur.com/NwBep2X.png"}
{
"kind": "Listing",
"data": {
"modhash": "dfkwd1sl2kf3ab48050f92b682d6ac6a55f294278be0a1cf50",
"children": [
{
"kind": "t3",
"data": {
"domain": "imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mlz6j",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "wear_r_your_pants",
"media": null,
"score": 2899,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://a.thumbs.redditmedia.com/2eqS6DyDSsSeLnnZ.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 4394,
"is_self": false,
"permalink": "/r/pics/comments/1mlz6j/i_should_probably_check_whats_under_the_stove/",
"name": "t3_1mlz6j",
"created": 1379493146,
"url": "http://imgur.com/FuW3Qnd",
"author_flair_text": null,
"title": "I should probably check whats under the stove",
"created_utc": 1379464346,
"link_flair_text": null,
"ups": 7293,
"num_comments": 242,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mlvag",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "DizzleDe",
"media": null,
"score": 1685,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://c.thumbs.redditmedia.com/DgNR2wx7ejsNV9p8.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 1079,
"is_self": false,
"permalink": "/r/pics/comments/1mlvag/art_on_a_steel_beam_under_a_bridge/",
"name": "t3_1mlvag",
"created": 1379489987,
"url": "http://imgur.com/hHzSk4a",
"author_flair_text": null,
"title": "Art on a steel beam under a bridge.",
"created_utc": 1379461187,
"link_flair_text": null,
"ups": 2764,
"num_comments": 21,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "i.imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mlk75",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "dirtymindfilthyways",
"media": null,
"score": 2558,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://d.thumbs.redditmedia.com/EM13DNfeuIsxqI5W.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 4837,
"is_self": false,
"permalink": "/r/pics/comments/1mlk75/jrr_tolkien_looking_at_flowers/",
"name": "t3_1mlk75",
"created": 1379481466,
"url": "http://i.imgur.com/RxILAYz.jpg",
"author_flair_text": null,
"title": "JRR Tolkien Looking at Flowers",
"created_utc": 1379452666,
"link_flair_text": null,
"ups": 7395,
"num_comments": 241,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "i.imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1ml74x",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "horse_you_rode_in_on",
"media": null,
"score": 3337,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://e.thumbs.redditmedia.com/5PC9EMAKXnvet83p.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 38646,
"is_self": false,
"permalink": "/r/pics/comments/1ml74x/patrick_stewart_marries_sunny_ozell_in_a_ceremony/",
"name": "t3_1ml74x",
"created": 1379471983,
"url": "http://i.imgur.com/cdpiJdF.jpg",
"author_flair_text": null,
"title": "Patrick Stewart marries Sunny Ozell, in a ceremony officiated by Ian McKellen",
"created_utc": 1379443183,
"link_flair_text": null,
"ups": 41983,
"num_comments": 1446,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mlacf",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "averagedekutree",
"media": null,
"score": 2453,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://b.thumbs.redditmedia.com/_GfV8EEPO1S2XwL1.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 2275,
"is_self": false,
"permalink": "/r/pics/comments/1mlacf/class_of_1913_yearbook/",
"name": "t3_1mlacf",
"created": 1379474345,
"url": "http://imgur.com/a/5twkk",
"author_flair_text": null,
"title": "Class of 1913 Yearbook",
"created_utc": 1379445545,
"link_flair_text": null,
"ups": 4728,
"num_comments": 438,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mljvv",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "mrwhiskers123",
"media": null,
"score": 1665,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://d.thumbs.redditmedia.com/D0hkhS98kjLJZmSQ.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 988,
"is_self": false,
"permalink": "/r/pics/comments/1mljvv/beautiful_backyard_view/",
"name": "t3_1mljvv",
"created": 1379481226,
"url": "http://imgur.com/7VNGF36",
"author_flair_text": null,
"title": "beautiful backyard view",
"created_utc": 1379452426,
"link_flair_text": null,
"ups": 2653,
"num_comments": 53,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "i.imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mldzq",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "JacktheNasty",
"media": null,
"score": 2027,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://d.thumbs.redditmedia.com/kz4wZz4pcn8shl8K.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 8562,
"is_self": false,
"permalink": "/r/pics/comments/1mldzq/i_finally_got_my_halo_off_reddit_its_a_good_day/",
"name": "t3_1mldzq",
"created": 1379477037,
"url": "http://i.imgur.com/plhghxx.jpg",
"author_flair_text": null,
"title": "I finally got my halo off, Reddit. It's a good day to be alive.",
"created_utc": 1379448237,
"link_flair_text": null,
"ups": 10589,
"num_comments": 655,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "i.imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1ml697",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "jesbaker",
"media": null,
"score": 2615,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://c.thumbs.redditmedia.com/S3PsF2peZZt5AGpV.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 4554,
"is_self": false,
"permalink": "/r/pics/comments/1ml697/flowers_refracted_within_dew_drops/",
"name": "t3_1ml697",
"created": 1379471313,
"url": "http://i.imgur.com/w7P3FSi.jpg",
"author_flair_text": null,
"title": "Flowers refracted within dew drops.",
"created_utc": 1379442513,
"link_flair_text": null,
"ups": 7169,
"num_comments": 41,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mlraz",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "Vanderwoolf",
"media": null,
"score": 1151,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://e.thumbs.redditmedia.com/VoJyFNBDMHceRIFv.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 2513,
"is_self": false,
"permalink": "/r/pics/comments/1mlraz/i_had_a_breakthrough_yesterday_with_my_cat_that/",
"name": "t3_1mlraz",
"created": 1379486911,
"url": "http://imgur.com/a/WfJiJ",
"author_flair_text": null,
"title": "I had a breakthrough yesterday with my cat that nearly brought me to tears. Story w/pics.",
"created_utc": 1379458111,
"link_flair_text": null,
"ups": 3664,
"num_comments": 169,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "i.imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1ml5ow",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "mygrapefruit",
"media": null,
"score": 2536,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://d.thumbs.redditmedia.com/roAbJKrYeR2PRbC3.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 14399,
"is_self": false,
"permalink": "/r/pics/comments/1ml5ow/accidentally_shot_a_evolutionary_perspective/",
"name": "t3_1ml5ow",
"created": 1379470882,
"url": "http://i.imgur.com/AgLcteX.jpg",
"author_flair_text": null,
"title": "Accidentally shot a evolutionary perspective photo of my two brothers and dad",
"created_utc": 1379442082,
"link_flair_text": null,
"ups": 16935,
"num_comments": 473,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "i.imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mlwyd",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "jmailangi",
"media": null,
"score": 842,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://e.thumbs.redditmedia.com/Oi9NZyHK9v65sa4X.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 173,
"is_self": false,
"permalink": "/r/pics/comments/1mlwyd/control_room_of_a_submarine_in_1918_xpost_from/",
"name": "t3_1mlwyd",
"created": 1379491336,
"url": "http://i.imgur.com/OnMc8HO.jpg",
"author_flair_text": null,
"title": "Control room of a submarine in 1918 (x-post from /r/militaryporn)",
"created_utc": 1379462536,
"link_flair_text": null,
"ups": 1015,
"num_comments": 53,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "i.imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mky5a",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "vamonos_pest",
"media": null,
"score": 2512,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://f.thumbs.redditmedia.com/T8lgfORz9TzHvybe.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 24595,
"is_self": false,
"permalink": "/r/pics/comments/1mky5a/my_local_sams_club_is_selling_a_barrel_of_jack/",
"name": "t3_1mky5a",
"created": 1379465116,
"url": "http://i.imgur.com/x7eSCAZ.jpg",
"author_flair_text": null,
"title": "My local Sam's Club is selling a barrel of Jack Daniels",
"created_utc": 1379436316,
"link_flair_text": null,
"ups": 27107,
"num_comments": 2214,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "i.imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mkxco",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "mrcarlita",
"media": null,
"score": 2561,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://f.thumbs.redditmedia.com/sQrM7jlRAxUfEEM5.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 10350,
"is_self": false,
"permalink": "/r/pics/comments/1mkxco/went_to_pee_at_a_party_and_saw_this_dope_shower/",
"name": "t3_1mkxco",
"created": 1379439331,
"url": "http://i.imgur.com/k2ys9BE.jpg",
"author_flair_text": null,
"title": "Went to pee at a party and saw this dope shower",
"created_utc": 1379435731,
"link_flair_text": null,
"ups": 12911,
"num_comments": 571,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "i.imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mkxkq",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "fuck_they_found_me",
"media": null,
"score": 2417,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://a.thumbs.redditmedia.com/efR5Gen3rd-rbNIT.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 16870,
"is_self": false,
"permalink": "/r/pics/comments/1mkxkq/patrick_stewart_just_posted_this_on_twitter/",
"name": "t3_1mkxkq",
"created": 1379464707,
"url": "http://i.imgur.com/yNWOq9H.jpg",
"author_flair_text": null,
"title": "Patrick Stewart just posted this on Twitter.",
"created_utc": 1379435907,
"link_flair_text": null,
"ups": 19287,
"num_comments": 501,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1ml5ns",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "BottledBlondePhD",
"media": null,
"score": 1553,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://f.thumbs.redditmedia.com/RtYy8bh8MNC67YDq.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 1056,
"is_self": false,
"permalink": "/r/pics/comments/1ml5ns/allllllll_by_myselffffff/",
"name": "t3_1ml5ns",
"created": 1379470858,
"url": "http://imgur.com/ZV8UYBz",
"author_flair_text": null,
"title": "Allllllll by myselffffff...",
"created_utc": 1379442058,
"link_flair_text": null,
"ups": 2609,
"num_comments": 69,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "i.imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mm4rr",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "DonTago",
"media": null,
"score": 376,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://f.thumbs.redditmedia.com/hbmCyWhN3hFTEiiM.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 118,
"is_self": false,
"permalink": "/r/pics/comments/1mm4rr/a_red_tsunami_of_sand_off_the_coast_of_australia/",
"name": "t3_1mm4rr",
"created": 1379497740,
"url": "http://i.imgur.com/IgWZXsN.jpg",
"author_flair_text": null,
"title": "A red tsunami of sand off the coast of Australia",
"created_utc": 1379468940,
"link_flair_text": null,
"ups": 494,
"num_comments": 24,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "i.imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mkrq0",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "samkick19",
"media": null,
"score": 2545,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://a.thumbs.redditmedia.com/gnkN07FM1M8voWBx.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 19219,
"is_self": false,
"permalink": "/r/pics/comments/1mkrq0/dat_feel/",
"name": "t3_1mkrq0",
"created": 1379460123,
"url": "http://i.imgur.com/pYEXuwV.jpg",
"author_flair_text": null,
"title": "Dat feel",
"created_utc": 1379431323,
"link_flair_text": null,
"ups": 21764,
"num_comments": 418,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "i.imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mkslu",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "thenamesteve",
"media": null,
"score": 2402,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://a.thumbs.redditmedia.com/3HzLjucaLOZ92LSx.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 3180,
"is_self": false,
"permalink": "/r/pics/comments/1mkslu/orange_chicken/",
"name": "t3_1mkslu",
"created": 1379460837,
"url": "http://i.imgur.com/EUV7Qse.jpg",
"author_flair_text": null,
"title": "Orange chicken",
"created_utc": 1379432037,
"link_flair_text": null,
"ups": 5582,
"num_comments": 105,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mlt10",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "rocketwikkit",
"media": null,
"score": 515,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://e.thumbs.redditmedia.com/XAWPZZGbVHBmGd94.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 97,
"is_self": false,
"permalink": "/r/pics/comments/1mlt10/dedicated_hitchhikers_guide_fans_send_vase_of/",
"name": "t3_1mlt10",
"created": 1379488236,
"url": "http://imgur.com/7IIMF9n",
"author_flair_text": null,
"title": "Dedicated Hitchhiker's Guide fans send vase of petunias to near space",
"created_utc": 1379459436,
"link_flair_text": null,
"ups": 612,
"num_comments": 29,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "i.imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mksk4",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "thenamesteve",
"media": null,
"score": 1965,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://e.thumbs.redditmedia.com/No_q2up6ykbPJgeF.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 5012,
"is_self": false,
"permalink": "/r/pics/comments/1mksk4/coffee_leaking_out_the_cracks_of_a_mug/",
"name": "t3_1mksk4",
"created": 1379460803,
"url": "http://i.imgur.com/iDwjSsX.jpg",
"author_flair_text": null,
"title": "Coffee leaking out the cracks of a mug",
"created_utc": 1379432003,
"link_flair_text": null,
"ups": 6977,
"num_comments": 118,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "i.imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mkvlt",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "CarettaSquared",
"media": null,
"score": 1696,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://f.thumbs.redditmedia.com/FI1_buO_wlWLAHUe.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 901,
"is_self": false,
"permalink": "/r/pics/comments/1mkvlt/shes_been_in_rehabilitation_for_the_last_four/",
"name": "t3_1mkvlt",
"created": 1379463179,
"url": "http://i.imgur.com/gSwVOI7.jpg",
"author_flair_text": null,
"title": "She's been in rehabilitation for the last four years after having half of her body crushed by a boat, but today she's going home!",
"created_utc": 1379434379,
"link_flair_text": null,
"ups": 2597,
"num_comments": 60,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mkps5",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "ARM_Alaska",
"media": null,
"score": 2129,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://d.thumbs.redditmedia.com/wPJR-QE0RVpZXAHc.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 1738,
"is_self": false,
"permalink": "/r/pics/comments/1mkps5/alaska_is_an_odd_place/",
"name": "t3_1mkps5",
"created": 1379458538,
"url": "http://imgur.com/bcTAEW4",
"author_flair_text": null,
"title": "Alaska is an odd place..",
"created_utc": 1379429738,
"link_flair_text": null,
"ups": 3867,
"num_comments": 73,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mkjoo",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "ani625",
"media": null,
"score": 2735,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://b.thumbs.redditmedia.com/fSgs2_TGWjpM2NAy.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 6863,
"is_self": false,
"permalink": "/r/pics/comments/1mkjoo/band_of_brothers_where_are_they_now/",
"name": "t3_1mkjoo",
"created": 1379453019,
"url": "http://imgur.com/a/GBjC1",
"author_flair_text": null,
"title": "Band of Brothers: Where Are They Now?",
"created_utc": 1379424219,
"link_flair_text": null,
"ups": 9598,
"num_comments": 579,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mkmm6",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "likwitsnake",
"media": null,
"score": 2278,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://f.thumbs.redditmedia.com/l-H5SYlf2omIFAu5.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 2080,
"is_self": false,
"permalink": "/r/pics/comments/1mkmm6/sculptures_from_old_watch_part/",
"name": "t3_1mkmm6",
"created": 1379455847,
"url": "http://imgur.com/a/QIttE",
"author_flair_text": null,
"title": "Sculptures from old watch part",
"created_utc": 1379427047,
"link_flair_text": null,
"ups": 4358,
"num_comments": 42,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "i.imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1ml7pt",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "Trubbles",
"media": null,
"score": 834,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://e.thumbs.redditmedia.com/tQQip7tflCt_L4Zv.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 336,
"is_self": false,
"permalink": "/r/pics/comments/1ml7pt/no_one_believes_me_but_my_son_did_in_fact_hold/",
"name": "t3_1ml7pt",
"created": 1379472391,
"url": "http://i.imgur.com/OV2iA0W.jpg",
"author_flair_text": null,
"title": "No one believes me, but my son did in fact hold his head up less than 5 minutes after being born",
"created_utc": 1379443591,
"link_flair_text": null,
"ups": 1170,
"num_comments": 104,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "i.imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mkqf5",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "LifelessTomato",
"media": null,
"score": 1637,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://d.thumbs.redditmedia.com/zibc3sqjfWPHPZwW.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 10271,
"is_self": false,
"permalink": "/r/pics/comments/1mkqf5/son_gives_his_dad_a_tattoo/",
"name": "t3_1mkqf5",
"created": 1379459032,
"url": "http://i.imgur.com/29F3Pkn.jpg",
"author_flair_text": null,
"title": "Son gives his dad a tattoo",
"created_utc": 1379430232,
"link_flair_text": null,
"ups": 11908,
"num_comments": 654,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "media-cache-ak0.pinimg.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mld91",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "inoor042",
"media": null,
"score": 613,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://d.thumbs.redditmedia.com/kwHd2A436_X7qJFu.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 135,
"is_self": false,
"permalink": "/r/pics/comments/1mld91/adorable_baby_flamingo_its_the_first_time_i_have/",
"name": "t3_1mld91",
"created": 1379476502,
"url": "http://media-cache-ak0.pinimg.com/736x/28/47/3e/28473e8cfee884ac326025f762bc3f76.jpg",
"author_flair_text": null,
"title": "adorable baby flamingo. its the first time i have seen any baby flamingo pic",
"created_utc": 1379447702,
"link_flair_text": null,
"ups": 748,
"num_comments": 8,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "i.imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mkd7e",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "likk",
"media": null,
"score": 3034,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://b.thumbs.redditmedia.com/N8aGEV-juU7wrq2O.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 28903,
"is_self": false,
"permalink": "/r/pics/comments/1mkd7e/mended/",
"name": "t3_1mkd7e",
"created": 1379444924,
"url": "http://i.imgur.com/bjMr7am.jpg",
"author_flair_text": null,
"title": "Mended",
"created_utc": 1379416124,
"link_flair_text": null,
"ups": 31937,
"num_comments": 282,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mm542",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "Cunderthunt2113",
"media": null,
"score": 192,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://f.thumbs.redditmedia.com/KCKuEjZirO7sLtdA.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 261,
"is_self": false,
"permalink": "/r/pics/comments/1mm542/i_made_a_promise_to_one_of_my_best_friend_since/",
"name": "t3_1mm542",
"created": 1379498030,
"url": "http://imgur.com/PY2EDsv",
"author_flair_text": null,
"title": "I made a promise to one of my best friend since middle school that when he returned home on leave from the marines, that we would go and get a beer together and catch up. He died today in a training accident. I held up to that promise.",
"created_utc": 1379469230,
"link_flair_text": null,
"ups": 453,
"num_comments": 47,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mkr2k",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "robbiekhan",
"media": null,
"score": 1340,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://c.thumbs.redditmedia.com/sV2P2f618c5Ds2uh.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 718,
"is_self": false,
"permalink": "/r/pics/comments/1mkr2k/i_have_a_king_dick_heres_a_photo/",
"name": "t3_1mkr2k",
"created": 1379459575,
"url": "http://imgur.com/iWXBoLx",
"author_flair_text": null,
"title": "I have a king dick, here's a photo.",
"created_utc": 1379430775,
"link_flair_text": null,
"ups": 2058,
"num_comments": 53,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "i.imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mkogf",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "horse_you_rode_in_on",
"media": null,
"score": 1297,
"approved_by": null,
"over_18": true,
"hidden": false,
"thumbnail": "nsfw",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 958,
"is_self": false,
"permalink": "/r/pics/comments/1mkogf/disregard_the_constabulary/",
"name": "t3_1mkogf",
"created": 1379457388,
"url": "http://i.imgur.com/GJvjKDC.jpg",
"author_flair_text": null,
"title": "Disregard the constabulary",
"created_utc": 1379428588,
"link_flair_text": null,
"ups": 2255,
"num_comments": 87,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mm8q3",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "danthoms",
"media": null,
"score": 130,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://a.thumbs.redditmedia.com/Fg6cBx6muAmhmb4Z.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 28,
"is_self": false,
"permalink": "/r/pics/comments/1mm8q3/found_this_strange_book_in_a_storage_unit/",
"name": "t3_1mm8q3",
"created": 1379501042,
"url": "http://imgur.com/a/JX258",
"author_flair_text": null,
"title": "Found this Strange Book in a Storage Unit",
"created_utc": 1379472242,
"link_flair_text": null,
"ups": 158,
"num_comments": 45,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mm7ji",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "mikelem",
"media": null,
"score": 138,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "default",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 54,
"is_self": false,
"permalink": "/r/pics/comments/1mm7ji/my_oneyearold_went_to_the_zoo_yesterday_she_was/",
"name": "t3_1mm7ji",
"created": 1379500050,
"url": "http://imgur.com/qnuSkRG",
"author_flair_text": null,
"title": "My one-year-old went to the zoo yesterday. She was mesmerized.",
"created_utc": 1379471250,
"link_flair_text": null,
"ups": 192,
"num_comments": 16,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "i.imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mm8dx",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "ujheisenburg94",
"media": null,
"score": 132,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://e.thumbs.redditmedia.com/lJEjal9iVgCBR8dL.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 46,
"is_self": false,
"permalink": "/r/pics/comments/1mm8dx/should_i_invade_their_privacy/",
"name": "t3_1mm8dx",
"created": 1379500769,
"url": "http://i.imgur.com/rodPInM.jpg",
"author_flair_text": null,
"title": "Should I invade their privacy?",
"created_utc": 1379471969,
"link_flair_text": null,
"ups": 178,
"num_comments": 19,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mlkg1",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "mrwhiskers123",
"media": null,
"score": 326,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://d.thumbs.redditmedia.com/JxDQ1SSN-NwZAv0W.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 87,
"is_self": false,
"permalink": "/r/pics/comments/1mlkg1/wire_art/",
"name": "t3_1mlkg1",
"created": 1379481656,
"url": "http://imgur.com/9AkxoMN",
"author_flair_text": null,
"title": "Wire art",
"created_utc": 1379452856,
"link_flair_text": null,
"ups": 413,
"num_comments": 8,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mkzrl",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "PlatinumAero",
"media": null,
"score": 681,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://f.thumbs.redditmedia.com/4kAYGRc_1JUoain_.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 233,
"is_self": false,
"permalink": "/r/pics/comments/1mkzrl/i_work_at_a_very_large_dealership_this_guy_just/",
"name": "t3_1mkzrl",
"created": 1379466328,
"url": "http://imgur.com/R9iap7F",
"author_flair_text": null,
"title": "I work at a very large dealership. This guy just drove in for a new tire.",
"created_utc": 1379437528,
"link_flair_text": null,
"ups": 914,
"num_comments": 128,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "i.imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mlevs",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "MikeDaBomb20",
"media": null,
"score": 376,
"approved_by": null,
"over_18": true,
"hidden": false,
"thumbnail": "nsfw",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 291,
"is_self": false,
"permalink": "/r/pics/comments/1mlevs/a_duck_charged_at_my_friends_moms_bike_it_did_not/",
"name": "t3_1mlevs",
"created": 1379477713,
"url": "http://i.imgur.com/sPuNQ2l.jpg",
"author_flair_text": null,
"title": "A duck charged at my friend's mom's bike. It did not end well for the duck.",
"created_utc": 1379448913,
"link_flair_text": null,
"ups": 667,
"num_comments": 60,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "i.imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mk8q5",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "engti",
"media": null,
"score": 2784,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://c.thumbs.redditmedia.com/BVjl56VUl2jnFAE2.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 3937,
"is_self": false,
"permalink": "/r/pics/comments/1mk8q5/dinosaur_feather_with_a_mite_found_in_amber_from/",
"name": "t3_1mk8q5",
"created": 1379437191,
"url": "http://i.imgur.com/Fgi2NBK.jpg",
"author_flair_text": null,
"title": "Dinosaur feather, with a mite, found in amber from Canada",
"created_utc": 1379408391,
"link_flair_text": null,
"ups": 6721,
"num_comments": 234,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "flickr.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mlse7",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "Anthraxium",
"media": null,
"score": 203,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://e.thumbs.redditmedia.com/UMkhOJDQ_NL3hpzR.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 58,
"is_self": false,
"permalink": "/r/pics/comments/1mlse7/i_took_a_pic_of_a_fox_mic/",
"name": "t3_1mlse7",
"created": 1379487737,
"url": "http://www.flickr.com/photos/deadpixelphotos/9790800924/",
"author_flair_text": null,
"title": "I took a pic of a fox (MIC)",
"created_utc": 1379458937,
"link_flair_text": null,
"ups": 261,
"num_comments": 28,
"num_reports": null,
"distinguished": null
}
},
{
"kind": "t3",
"data": {
"domain": "imgur.com",
"banned_by": null,
"media_embed": {},
"subreddit": "pics",
"selftext_html": null,
"selftext": "",
"likes": null,
"secure_media": null,
"saved": false,
"id": "1mljab",
"secure_media_embed": {},
"clicked": false,
"stickied": false,
"author": "mrwhiskers123",
"media": null,
"score": 235,
"approved_by": null,
"over_18": false,
"hidden": false,
"thumbnail": "http://b.thumbs.redditmedia.com/xplx4kYtcPWJ-YW1.jpg",
"subreddit_id": "t5_2qh0u",
"edited": false,
"link_flair_css_class": null,
"author_flair_css_class": null,
"downs": 78,
"is_self": false,
"permalink": "/r/pics/comments/1mljab/abandoned_yugoslavia_war_monument/",
"name": "t3_1mljab",
"created": 1379480761,
"url": "http://imgur.com/z6pzbyW",
"author_flair_text": null,
"title": "Abandoned Yugoslavia war monument",
"created_utc": 1379451961,
"link_flair_text": null,
"ups": 313,
"num_comments": 17,
"num_reports": null,
"distinguished": null
}
}
],
"after": "t3_1mljab",
"before": null
}
}
d3.chart = {} if not d3.chart
d3.chart.scatter = (S, A) ->
that = this
ydomain = d3.functor(S.y.domain())
datum_ = (d) -> d
@G =
cx: (d) -> S.x A.x d
cy: (d) -> S.y A.y d
r: A.r || 3.12
fill: (d, i) -> S.c?(A.c?(d, i)) || "steelblue"
exports = (selection) ->
selection.each (data) ->
console.log data[0]
S.y.domain ydomain(data)
#gEnter = d3.select(this).selectAll("g")
# .data([data]).enter().append("g")
circles = d3.select(this)
.selectAll("circle")
.data(datum_, (d) -> A.y d)
circles.enter()
.append("circle")
.attr("class", "circle")
.attr that.G
circles.exit()
.remove();
exports.ydomain = (_) ->
ydomain = _; exports
exports.datum = (_) ->
datum_ = _; exports
exports
d3.chart.area = (S, A) ->
that = this
ydomain = d3.functor(S.y.domain())
datum_ = (d) -> d
@G = d3.svg.area()
.x((d) -> S.x A.x d)
.y0(S.y(0))
.y1((d) -> S.y A.y d)
.interpolate("basis")
exports = (selection) ->
selection.each (data) ->
S.y.domain ydomain(data)
d3.select(this).append("path")
.attr("class", "area")
.datum(datum_)
.attr("d", that.G)
exports.ydomain = (_) ->
ydomain = _; exports
exports.datum = (_) ->
datum_ = _; exports
exports
Axis = (S) ->
that = this
@xAxis = d3.svg.axis().scale(S.x).orient("bottom")
exports = (selection) ->
selection.each (data) ->
d3.select(this).append("g")
.attr("class", "x axis")
.attr("transform", "translate(0, #{S.y.range()[0]})")
.call(that.xAxis)
d3.rebind(exports, xAxis, "ticks", "tickFormat")
exports
###
symbol date price
S&P 500 Jan 2000 1394.46
###
d3.chart.line = (S, A) ->
that = this
datum_ = (d) -> d
ydomain = null
d_ = d3.svg.line()
.x((d) -> S.x A.x d)
.y((d) -> S.y A.y d)
@G =
d: d_
stroke: "darkblue"
"stroke-width": 1
exports = (selection) ->
selection.each (data) ->
S.y.domain ydomain(data)
d3.select(this).append("path")
.attr("class", "line")
.datum(datum_)
.attr that.G
exports.ydomain = (_) ->
ydomain = _; exports
exports.datum = (_) ->
datum_ = _; exports
exports
appendSvg = (sel, O, W, H) ->
sel.append("svg")
.attr({width: W, height: H})
.append("g")
.attr("transform", "translate(#{O.margin.left}, #{O.margin.top})")
O =
margin: {top: 44, bottom: 20, left: 108, right: 20}
width: 450
height: 233
W = O.width + O.margin.left + O.margin.right
H = O.height + O.margin.top + O.margin.bottom
#svg = appendSvg(d3.select("#display"), O, W, H)
dat = tributary.data.data.children
dat2 = dat.map (d) ->
x: new Date(d.data.created*1000)
y: d.data.score
k: d.data.domain
id: d.data.id
A =
x: (d) -> d.x
y: (d) -> d.y
c: (d, i) -> d.k
S =
x: d3.time.scale().range([0, O.width])
y: d3.scale.linear().range([O.height, 0])
c: d3.scale.category10()
ydomain = d3.extent(dat2, A.y)
S.x.domain d3.extent(dat2, A.x)
S.y.domain ydomain
myScatter = d3.chart.scatter(S, A)
.ydomain((data) ->
yd = d3.extent(data, A.y)
yd[0] -= 200; yd[1] += 200
yd
)
sel = d3.select("#display")
.selectAll("div")
.data([dat2, dat2]).enter()
.append("div")
svg = appendSvg(sel, O, W, H)
svg.call(myScatter)
myAxis = Axis(S)
.tickFormat(d3.time.format("%b %H:%M"))
svg.call(myAxis)
dat3 = (i) ->
dat.map (d) ->
x: new Date(d.data.created*1000)
y: d.data[i]
k: d.data.domain
id: d.data.id
console.log dat3("ups")[0]
update = (d, i) ->
console.log("Hi")
svg.data([dat3("num_comments"), dat3("ups")]).call(myScatter)
btn = d3.select("#display")
.append("button")
.text("Update")
.on("click", update)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment