Last active
August 29, 2015 14:20
-
-
Save israelst/eef96d3f315df4116a4a to your computer and use it in GitHub Desktop.
Show facebook post data with d3.parcoords
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Curto Café Facebook Page</title> | |
<script src="preprocess.js" charset="utf-8"></script> | |
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> | |
<script src="http://syntagmatic.github.io/parallel-coordinates/d3.parcoords.js" charset="utf-8"></script> | |
<link href="http://syntagmatic.github.io/parallel-coordinates/d3.parcoords.css" rel="stylesheet" /> | |
</head> | |
<body> | |
<div id="example1" class="parcoords" style="width:900px;height:350px"></div> | |
<script type="text/javascript"> | |
d3.json('insights.json', function(posts) { | |
var summary = posts.data.map(preprocess); | |
d3.parcoords()("#example1") | |
.data(summary) | |
.composite("darker") | |
.alpha(0.35) | |
.render() | |
.brushMode("1D-axes") | |
.reorderable(); | |
}); | |
</script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": [ | |
{ | |
"id": "197655153653715_857723314313559", | |
"created_time": "2015-04-30T15:01:22+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_857723314313559/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 3 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_857723314313559/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 84 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 0 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 0 | |
} | |
} | |
}, | |
{ | |
"id": "197655153653715_857723277646896", | |
"created_time": "2015-04-30T15:01:18+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_857723277646896/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 0 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_857723277646896/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 16 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 0 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 0 | |
} | |
} | |
}, | |
{ | |
"id": "197655153653715_857705017648722", | |
"created_time": "2015-04-30T14:26:47+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_857705017648722/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 0 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_857705017648722/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 81 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 3 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 0 | |
} | |
} | |
}, | |
{ | |
"id": "197655153653715_857609390991618", | |
"created_time": "2015-04-30T13:02:33+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_857609390991618/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 4 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_857609390991618/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 89 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 2 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 0 | |
} | |
} | |
}, | |
{ | |
"shares": { | |
"count": 1 | |
}, | |
"id": "197655153653715_857019661050591", | |
"created_time": "2015-04-29T21:02:28+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_857019661050591/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 11 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_857019661050591/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 121 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 7 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 0 | |
} | |
} | |
}, | |
{ | |
"shares": { | |
"count": 1 | |
}, | |
"id": "197655153653715_856429491109608", | |
"created_time": "2015-04-28T21:07:14+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_856429491109608/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 9 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_856429491109608/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 45 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 1 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 0 | |
} | |
} | |
}, | |
{ | |
"id": "197655153653715_855297614556129", | |
"created_time": "2015-04-27T16:34:35+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_855297614556129/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 6 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_855297614556129/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 323 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 12 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 0 | |
} | |
} | |
}, | |
{ | |
"shares": { | |
"count": 1 | |
}, | |
"id": "197655153653715_853209514764939", | |
"created_time": "2015-04-26T02:13:20+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_853209514764939/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 156 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_853209514764939/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 178 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 13 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 0 | |
} | |
} | |
}, | |
{ | |
"shares": { | |
"count": 1 | |
}, | |
"id": "197655153653715_852289728190251", | |
"created_time": "2015-04-25T02:58:23+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_852289728190251/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 22 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_852289728190251/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 173 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 10 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 0 | |
} | |
} | |
}, | |
{ | |
"id": "197655153653715_852418471510710", | |
"created_time": "2015-04-24T20:37:43+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_852418471510710/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 21 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_852418471510710/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 448 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 2 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 0 | |
} | |
} | |
}, | |
{ | |
"shares": { | |
"count": 2 | |
}, | |
"id": "197655153653715_851234924962398", | |
"created_time": "2015-04-23T10:59:19+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_851234924962398/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 26 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_851234924962398/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 828 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 31 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 2 | |
} | |
} | |
}, | |
{ | |
"shares": { | |
"count": 1 | |
}, | |
"id": "197655153653715_850829125002978", | |
"created_time": "2015-04-23T00:10:27+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_850829125002978/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 16 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_850829125002978/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 132 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 9 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 0 | |
} | |
} | |
}, | |
{ | |
"shares": { | |
"count": 4 | |
}, | |
"id": "197655153653715_849910348428189", | |
"created_time": "2015-04-21T13:12:22+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_849910348428189/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 25 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_849910348428189/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 906 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 43 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 1 | |
} | |
} | |
}, | |
{ | |
"shares": { | |
"count": 1 | |
}, | |
"id": "197655153653715_849557615130129", | |
"created_time": "2015-04-21T02:27:20+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_849557615130129/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 12 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_849557615130129/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 679 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 13 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 0 | |
} | |
} | |
}, | |
{ | |
"shares": { | |
"count": 1 | |
}, | |
"id": "197655153653715_849369365148954", | |
"created_time": "2015-04-20T18:21:35+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_849369365148954/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 13 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_849369365148954/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 703 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 22 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 4 | |
} | |
} | |
}, | |
{ | |
"id": "197655153653715_959083647449360", | |
"created_time": "2015-04-18T01:58:28+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_959083647449360/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 190 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_959083647449360/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 2334 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 83 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 14 | |
} | |
} | |
}, | |
{ | |
"shares": { | |
"count": 1 | |
}, | |
"id": "197655153653715_846672248751999", | |
"created_time": "2015-04-17T00:41:32+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_846672248751999/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 36 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_846672248751999/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 138 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 11 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 0 | |
} | |
} | |
}, | |
{ | |
"id": "197655153653715_846360108783213", | |
"created_time": "2015-04-16T01:38:57+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_846360108783213/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 14 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_846360108783213/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 692 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 10 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 0 | |
} | |
} | |
}, | |
{ | |
"shares": { | |
"count": 1 | |
}, | |
"id": "197655153653715_846184385467452", | |
"created_time": "2015-04-16T01:36:33+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_846184385467452/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 18 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_846184385467452/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 113 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 6 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 0 | |
} | |
} | |
}, | |
{ | |
"shares": { | |
"count": 1 | |
}, | |
"id": "197655153653715_846260002126557", | |
"created_time": "2015-04-15T20:30:36+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_846260002126557/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 16 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_846260002126557/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 645 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 9 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 0 | |
} | |
} | |
}, | |
{ | |
"shares": { | |
"count": 1 | |
}, | |
"id": "197655153653715_845537612198796", | |
"created_time": "2015-04-15T00:32:46+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_845537612198796/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 39 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_845537612198796/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 518 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 9 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 1 | |
} | |
} | |
}, | |
{ | |
"shares": { | |
"count": 2 | |
}, | |
"id": "197655153653715_844991675586723", | |
"created_time": "2015-04-13T21:33:41+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_844991675586723/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 29 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_844991675586723/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 822 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 21 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 0 | |
} | |
} | |
}, | |
{ | |
"id": "197655153653715_844850458934178", | |
"created_time": "2015-04-13T17:13:54+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_844850458934178/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 26 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_844850458934178/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 725 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 8 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 0 | |
} | |
} | |
}, | |
{ | |
"shares": { | |
"count": 1 | |
}, | |
"id": "197655153653715_844281008991123", | |
"created_time": "2015-04-12T13:51:13+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_844281008991123/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 28 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_844281008991123/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 771 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 10 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 0 | |
} | |
} | |
}, | |
{ | |
"id": "197655153653715_844054575680433", | |
"created_time": "2015-04-12T02:03:24+0000", | |
"insights": { | |
"data": [ | |
{ | |
"id": "197655153653715_844054575680433/insights/post_consumptions/lifetime", | |
"name": "post_consumptions", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 26 | |
} | |
], | |
"title": "Lifetime Post Consumptions", | |
"description": "Lifetime: The number of clicks anywhere in your post. (Total Count)" | |
}, | |
{ | |
"id": "197655153653715_844054575680433/insights/post_impressions_unique/lifetime", | |
"name": "post_impressions_unique", | |
"period": "lifetime", | |
"values": [ | |
{ | |
"value": 755 | |
} | |
], | |
"title": "Lifetime Post Total Reach", | |
"description": "Lifetime: The total number of people your Page post was served to. (Unique Users)" | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=-86400&until=0", | |
"next": "https://graph.facebook.com/v2.3/curtocafe/posts/?debug=all&fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&pretty=0&suppress_http_code=1&since=0&until=86400" | |
} | |
}, | |
"likes": { | |
"data": [ | |
], | |
"summary": { | |
"total_count": 24 | |
} | |
}, | |
"comments": { | |
"data": [ | |
], | |
"summary": { | |
"order": "chronological", | |
"total_count": 1 | |
} | |
} | |
} | |
], | |
"paging": { | |
"previous": "https://graph.facebook.com/v2.3/197655153653715/posts?fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&since=1430406082&limit=25&__paging_token=enc_AdDr9mbX1fzRSzc9iHYDaAJhclqjaYuCb8rDT6xkcL2O8hQADoQr54yZAmYbk2ge8DYAQaJPOuOBOUsOxL5DJdTvwYFVqAe2FNSh1gYgSkmUpvwZDZD", | |
"next": "https://graph.facebook.com/v2.3/197655153653715/posts?fields=insights.metric(post_consumptions,post_impressions_unique),likes.limit(0).summary(true),comments.limit(0).summary(true),shares&limit=25&until=1428804204&__paging_token=enc_AdA9OZAipG6Jb7QZBxjNk7WE6AKl9OZBfwEpV9ldqFGy4MStih4bKrnPc8vE4f0eLuFAnVWOmcPLqwTTy2wQ6vZAo7QXShn6NJjmQwSPq6L2JgbUxgZDZD" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function preprocess(post){ | |
var flatPost = post.insights.data.reduce(function(post, insight){ | |
post[insight.name] = insight.values[0].value; | |
return post; | |
}, {}); | |
flatPost.likes = post.likes.summary.total_count; | |
flatPost.comments = post.comments.summary.total_count; | |
flatPost.shares = (post.shares || {'count': 0}).count; | |
return flatPost; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment