{"info":{"_postman_id":"37ede22b-3997-4a6e-b479-cfe2004f576b","name":"Visualizer Template: Cross Filter","description":"A collection of API requests to demonstrate the data visualization feature through a cross filter, created by student developers at Berkeley CodeBase.\n\nFor the full list of visualizer templates we have created, click [here](https://explore.postman.com/templates/4424).\n\n<br>\n\nA cross filter allows us to take any common data visualization (e.g. a histogram or line chart) and provide additional user control over the dataset by selecting portions in one axis to see its corresponding data on other axes. This is especially useful for more complex, multi-dimensional data. Here, we demonstrate it with histograms, although it can be extended to accommodate other quantitative visualizations.\n\n\nSource: https://square.github.io/crossfilter/\n\n\n![alt text](https://raw.githubusercontent.com/isabelleyzhou/postman_visualizer_templates/master/cross-filter/ufo.PNG \"[Crossfilter]\")\n\n\n<br>\n\nThis collection contains three sample usages for the map visualizer.\n\n1. UFO Sightings\n2. TVMaze\n3. Twitter\n\n<br>\n\nFor detailed descriptions of a request, check its description. \n\n<br>\n\n**Data Parsing**\n\nData parsing is done at the bottom of the test script and at the top of the test script, in the template string.\nAt the bottom of the test script, the data is passed in to the template string.\n\n<br>\n\n**Crossfilter Use**\n\nDrag mouse across the bars of a graph to filter data based on the graph field.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json"},"item":[{"name":"UFO Sightings","event":[{"listen":"test","script":{"id":"e9fbd7d1-3b45-48c4-baae-e446ded557d3","exec":["const template = `","<style>","#charts {","    display: flex;","}",".chartGroup {","    display: flex;","    flex-direction: column;","    align-items: center;","    margin: 32px;","}","#body {","    display: flex;","    align-items: center;","    flex-direction: column;","    background-color: white","}","#charts {","  padding: 10px 0;","}",".chart {","  display: inline-block;","  height: 151px;","  margin-bottom: 20px;","}",".reset {","  padding-left: 1em;","  font-size: smaller;","  color: #ccc;","}",".background.bar {","  fill: #E0DFD5;","}",".foreground.bar {","  fill: #F17D12;","}",".axis path, .axis line {","  fill: none;","  stroke: #000;","  shape-rendering: crispEdges;","}",".axis text {","  font: 10px sans-serif;","}",".brush rect.extent {","  fill: #F17D12;","  fill-opacity: .125;","}",".brush .resize path {","  fill: #eee;","  stroke: #666;","}","h4 {","    font: 30px sans-serif;","    font-weight: bold;","    margin-top: 20;","    margin-bottom: 0;","}","</style>","<script src=\"https://d3js.org/d3.v3.min.js\"></script>","<script src=\"https://cdnjs.cloudflare.com/ajax/libs/crossfilter/1.3.12/crossfilter.min.js\"></script>","<div id='body'>","    <h4>{{title}}</h4>","    <div id=\"charts\">","        <div class=\"chartGroup\">","            <p>{{durationTitle}}</p>","            <div class=\"chart\"></div>","        </div>","        <div class=\"chartGroup\">","            <p>{{dateTitle}}</p>","            <div class=\"chart\"></div>","        </div>","    </div>","    <div id=\"lists\">","      <table class=\"list\">","        <tr>","            <th>Date</th>","            <th>Time</th>","            <th>Location</th>","            <th>Duration</th>","            <th>Shape</th>","        </tr>","      </table>","    </div>","</div>","<script>"," pm.getData((err, value) => {","    const durationRange = value.durationRange;","     ","    // Convert stringified date into Date objects","    const data = value.sightings.map((d) => {","        d.date = new Date(Date.parse(d.date)); ","        return d;","    });","     ","    // Specify crossfilter axes","    const crossfilterData = crossfilter(data),","        all = crossfilterData.groupAll(),","        date = crossfilterData.dimension(function(d) {","                return d.date.getHours();","        }),","        dates = date.group(Math.floor),","        duration = crossfilterData.dimension(function(d) {","            return d.duration;","        }),","        durations = duration.group(Math.floor);","         ","    const charts = [","        barChart()","            .dimension(duration)","            .group(durations)","        .x(d3.scale.linear()","            .domain(durationRange)","            .rangeRound([0, 10 * durationRange[1]])),","        barChart()","            .dimension(date)","            .group(dates)","        .x(d3.scale.linear()","            .domain([0, 24])","            .rangeRound([0, 10 * 24])),","    ]","","    // A nest operator, for grouping the flight list.","    const nestByDate = d3.nest()","        .key(function(d) { ","            console.log(d)","            const date = new Date(d.date);","            return d3.time.day(date); ","        });","","    // Render the initial lists.","    var list = d3.selectAll(\".list\")","        .data([listFunc]);","","    // Various formatters.","    var formatNumber = d3.format(\",d\"),","        formatChange = d3.format(\"+,d\"),","        formatDate = d3.time.format(\"%B %d, %Y\"),","        formatTime = d3.time.format(\"%I:%M %p\");","     ","    // Given our array of charts, which we assume are in the same order as the","    // .chart elements in the DOM, bind the charts to the DOM and render them.","    // We also listen to the chart's brush events to update the display.","    var chart = d3.selectAll(\".chart\")","        .data(charts)","        .each(function(chart) {","            chart.on(\"brush\", renderAll).on(\"brushend\", renderAll);","        });","","     renderAll();","     // Render the specified chart or list.","     function render(method) {","         d3.select(this).call(method);","     }","     ","     // Whenever the brush moves, rerender everything","     function renderAll() {","        chart.each(render);","        list.each(render);","        d3.select(\"#active\").text(formatNumber(all.value()));","    }","","    function listFunc(div) {","        div.each(function() {","            const tableData = d3.select(this).selectAll(\".sighting\")","                .data(date.top(40), function(d) { return d3.time.day(d.date) })","            const rowEnter = tableData.enter().append(\"tr\")","                 .attr(\"class\", \"sighting\");","            for (const {header, field} of value.tableRow) {","                rowEnter.append(\"td\")","                    .attr(\"class\", header)","                    .text(function(d) {","                        return d[field];","                    });","            }","            tableData.exit().remove();","            tableData.order();","        });","    }","","    function barChart() {","        if (!barChart.id) barChart.id = 0;","        var margin = {","                top: 10,","                right: 10,","                bottom: 20,","                left: 10","            },","            x,","            y = d3.scale.linear().range([100, 0]),","            id = barChart.id++,","            axis = d3.svg.axis().orient(\"bottom\"),","            brush = d3.svg.brush(),","            brushDirty,","            dimension,","            group,","            round;","        function chart(div) {","            var width = x.range()[1],","                height = y.range()[0];","            y.domain([0, group.top(1)[0].value]);","            div.each(function() {","                var div = d3.select(this),","                    g = div.select(\"g\");","                     ","                // Create the skeletal chart.","                if (g.empty()) {","                    div.select(\".title\").append(\"a\")","                        .attr(\"href\", \"javascript:reset(\" + id + \")\")","                        .attr(\"class\", \"reset\")","                        .text(\"reset\")","                        .style(\"display\", \"none\");","                    g = div.append(\"svg\")","                        .attr(\"width\", width + margin.left + margin.right)","                        .attr(\"height\", height + margin.top + margin.bottom)","                        .append(\"g\")","                        .attr(\"transform\", \"translate(\" + margin.left + \",\" + margin.top + \")\");","                    g.append(\"clipPath\")","                        .attr(\"id\", \"clip-\" + id)","                        .append(\"rect\")","                        .attr(\"width\", width)","                        .attr(\"height\", height);","                    g.selectAll(\".bar\")","                        .data([\"background\", \"foreground\"])","                        .enter().append(\"path\")","                        .attr(\"class\", function(d) {","                            return d + \" bar\";","                        })","                        .datum(group.all());","                    g.selectAll(\".foreground.bar\")","                        .attr(\"clip-path\", \"url(#clip-\" + id + \")\");","                    g.append(\"g\")","                        .attr(\"class\", \"axis\")","                        .attr(\"transform\", \"translate(0,\" + height + \")\")","                        .call(axis);","                         ","                    // Initialize the brush component with pretty resize handles.","                    var gBrush = g.append(\"g\").attr(\"class\", \"brush\").call(brush);","                    gBrush.selectAll(\"rect\").attr(\"height\", height);","                    gBrush.selectAll(\".resize\").append(\"path\").attr(\"d\", resizePath);","                }","                // Only redraw the brush if set externally.","                if (brushDirty) {","                    brushDirty = false;","                    g.selectAll(\".brush\").call(brush);","                    div.select(\".title a\").style(\"display\", brush.empty() ? \"none\" : null);","                    if (brush.empty()) {","                        g.selectAll(\"#clip-\" + id + \" rect\")","                            .attr(\"x\", 0)","                            .attr(\"width\", width);","                    } else {","                        var extent = brush.extent();","                        g.selectAll(\"#clip-\" + id + \" rect\")","                            .attr(\"x\", x(extent[0]))","                            .attr(\"width\", x(extent[1]) - x(extent[0]));","                    }","                }","                g.selectAll(\".bar\").attr(\"d\", barPath);","            });","","            function barPath(groups) {","                var path = [],","                    i = -1,","                    n = groups.length,","                    d;","                while (++i < n) {","                    d = groups[i];","                    path.push(\"M\", x(d.key), \",\", height, \"V\", y(d.value), \"h9V\", height);","                }","                return path.join(\"\");","            }","","            function resizePath(d) {","                var e = +(d == \"e\"),","                    x = e ? 1 : -1,","                    y = height / 3;","                return \"M\" + (.5 * x) + \",\" + y +","                    \"A6,6 0 0 \" + e + \" \" + (6.5 * x) + \",\" + (y + 6) +","                    \"V\" + (2 * y - 6) +","                    \"A6,6 0 0 \" + e + \" \" + (.5 * x) + \",\" + (2 * y) +","                    \"Z\" +","                    \"M\" + (2.5 * x) + \",\" + (y + 8) +","                    \"V\" + (2 * y - 8) +","                    \"M\" + (4.5 * x) + \",\" + (y + 8) +","                    \"V\" + (2 * y - 8);","                }","            }","        brush.on(\"brushstart.chart\", function() {","            var div = d3.select(this.parentNode.parentNode.parentNode);","            div.select(\".title a\").style(\"display\", null);","        });","        brush.on(\"brush.chart\", function() {","            var g = d3.select(this.parentNode),","                extent = brush.extent();","            if (round) g.select(\".brush\")","                .call(brush.extent(extent = extent.map(round)))","                .selectAll(\".resize\")","                .style(\"display\", null);","            g.select(\"#clip-\" + id + \" rect\")","                .attr(\"x\", x(extent[0]))","                .attr(\"width\", x(extent[1]) - x(extent[0]));","            dimension.filterRange(extent);","        });","        brush.on(\"brushend.chart\", function() {","            if (brush.empty()) {","                var div = d3.select(this.parentNode.parentNode.parentNode);","                div.select(\".title a\").style(\"display\", \"none\");","                div.select(\"#clip-\" + id + \" rect\").attr(\"x\", null).attr(\"width\", \"100%\");","                dimension.filterAll();","            }","        });","        chart.margin = function(_) {","            if (!arguments.length) return margin;","            margin = _;","            return chart;","        };","        chart.x = function(_) {","            if (!arguments.length) return x;","            x = _;","            axis.scale(x);","            brush.x(x);","            return chart;","        };","        chart.y = function(_) {","            if (!arguments.length) return y;","            y = _;","            return chart;","        };","        chart.dimension = function(_) {","            if (!arguments.length) return dimension;","            dimension = _;","            return chart;","        };","        chart.filter = function(_) {","            if (_) {","                brush.extent(_);","                dimension.filterRange(_);","            } else {","                brush.clear();","                dimension.filterAll();","            }","            brushDirty = true;","            return chart;","        };","        chart.group = function(_) {","            if (!arguments.length) return group;","            group = _;","            return chart;","        };","        chart.round = function(_) {","            if (!arguments.length) return round;","            round = _;","            return chart;","        };","        return d3.rebind(chart, brush, \"on\");","    }","});","</script>`;","","const response = pm.response.json();","","// DATA PARSING ","// Replace string version of duration with log of seconds (ie: \"1 minute\" -> \"log(60)\") and add text version of date and location for table","const durationRE = new RegExp('(\\\\d+) (minutes?|hours?|seconds?)');","const sightings = response.sightings.map(s => {","        const dateObj = new Date(Date.parse(s.date));","        s.dateText = dateObj.toLocaleDateString();","        s.timeText = dateObj.toLocaleTimeString('en-US', {hour: '2-digit', minute: '2-digit', hour12: true});","        s.locationText =  s.city + ', ' + s.state;","        s.durationText = s.duration;","        s.duration = s.duration.match(durationRE);","        if (!!s.duration) {","            let res = s.duration[1];","            const unit = s.duration[2];","            if (unit.indexOf('minute') >= 0) {","                res *= 60;","            } else if (unit.indexOf('hour') >= 0) {","                res *= 3600;","            }","            s.duration = Math.log(res);","        }","        return s;","    })","    .filter(s => !!s.duration);","","// Set the range for duration","const durationRange = sightings","     .map(s => s.duration)","     .reduce((a, c) => {","         if (c < a[0]) {","             a[0] = c;","         }","         if (c > a[1]) {","             a[1] = c;","         }","         return a;","     }, [10000, 0]);","durationRange[0] = Math.floor(durationRange[0]);","durationRange[1] = Math.ceil(durationRange[1]);","","//Set graph titles","const title = \"UFO Sightings\";","const durationTitle = \"Duration (log seconds)\";","const dateTitle = \"Time of Day\";","","const tableRow = [","    {","        header: 'Date',","        field: 'dateText'","    },","    {","        header: 'Time',","        field: 'timeText'","    },","    {","        header: 'Location',","        field: 'locationText'","    },","    {","        header: 'Duration',","        field: 'durationText'","    },","    {","        header: 'Shape',","        field: 'shape'","    }","];","","pm.visualizer.set(template, {","    dateTitle,","    durationTitle,","    durationRange,","    sightings,","    tableRow,","    title,","});",""],"type":"text/javascript"}}],"id":"fd2c9760-b059-4f62-a81f-7cd7147d09bd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":{"raw":"http://ufo-api.herokuapp.com/api/sightings/search?limit=200","protocol":"http","host":["ufo-api","herokuapp","com"],"path":["api","sightings","search"],"query":[{"key":"limit","value":"200"}]},"description":"Visualizes UFO sightings data and allows user to filter by date and duration of sighting.\n\n<br>\n\n_Sample JSON response_\n```\n{\n    \"status\": \"OK\",\n    \"sightingsReturned\": 200,\n    \"sightings\": [\n        {\n            \"_id\": \"583e43ac7250d6988d3b33b4\",\n            \"city\": \"Sanborn\",\n            \"date\": \"2016-09-29T23:30:00.000Z\",\n            \"url\": \"http://www.nuforc.org/webreports/130/S130329.html\",\n            \"state\": \"NY\",\n            \"summary\": \"3 orbs dancing/chasing each other in circles in Sanborn, NY.  ((anonymous report))\",\n            \"duration\": \"10 minutes\",\n            \"shape\": \"Oval\",\n            \"loc\": [\n                -78.884761,\n                43.136723\n            ],\n            \"__v\": 0,\n            \"dateAdded\": \"2016-11-30T03:12:44.101Z\"\n        },\n        {\n            \"_id\": \"583e43ac7250d6988d3b33b5\",\n            \"city\": \"Logan\",\n            \"date\": \"2016-09-29T22:00:00.000Z\",\n            \"url\": \"http://www.nuforc.org/webreports/130/S130331.html\",\n            \"state\": \"KS\",\n            \"summary\": \"As we were walking from our RV to the house I noticed a bright light. I thought it was a shooting star at first, as it was a perfect fa\",\n            \"duration\": \"45 seconds\",\n            \"shape\": \"Light\",\n            \"loc\": [\n                -101.155238,\n                38.9058216\n            ],\n            \"__v\": 0,\n            \"dateAdded\": \"2016-11-30T03:12:44.128Z\"\n        },\n        {\n            \"_id\": \"583e43ac7250d6988d3b33b6\",\n            \"city\": \"Kennewick\",\n            \"date\": \"2016-09-29T21:00:00.000Z\",\n            \"url\": \"http://www.nuforc.org/webreports/130/S130338.html\",\n            \"state\": \"WA\",\n            \"summary\": \"Southern sky lit up in bright flash.\",\n            \"duration\": \"1 second\",\n            \"shape\": \"\",\n            \"loc\": [\n                -119.1372337,\n                46.2112458\n            ],\n            \"__v\": 0,\n            \"dateAdded\": \"2016-11-30T03:12:44.134Z\"\n        }\n    ]\n}\n```\n<br>\n\n_Sample Crossfilter_\n![alt text](https://raw.githubusercontent.com/isabelleyzhou/postman_visualizer_templates/master/cross-filter/ufo.PNG \"[Crossfilter]\")"},"response":[],"_postman_id":"fd2c9760-b059-4f62-a81f-7cd7147d09bd"},{"name":"TVMaze","event":[{"listen":"test","script":{"id":"a92d59ed-3b6a-4848-8324-4d2f76e0b1d8","exec":["const template = `","<style>","#charts {","    display: flex;","}",".chartGroup {","    display: flex;","    flex-direction: column;","    align-items: center;","    margin: 32px;","}","#body {","    display: flex;","    align-items: center;","    flex-direction: column;","    background-color: white;","}","#charts {","  padding: 10px 0;","}",".chart {","  display: inline-block;","  height: 151px;","  margin-bottom: 20px;","}",".reset {","  padding-left: 1em;","  font-size: smaller;","  color: #ccc;","}",".background.bar {","  fill: #E0DFD5;","}",".foreground.bar {","  fill: #F17D12;","}",".axis path, .axis line {","  fill: none;","  stroke: #000;","  shape-rendering: crispEdges;","}",".axis text {","  font: 10px sans-serif;","}",".brush rect.extent {","  fill: #F17D12;","  fill-opacity: .125;","}",".brush .resize path {","  fill: #eee;","  stroke: #666;","}","h4 {","    font: 30px sans-serif;","    font-weight: bold;","    margin-top: 20;","    margin-bottom: 0;","}","</style>","<script src=\"https://d3js.org/d3.v3.min.js\"></script>","<script src=\"https://cdnjs.cloudflare.com/ajax/libs/crossfilter/1.3.12/crossfilter.min.js\"></script>","<div id=\"body\">","    <h4>{{title}}</h4>","    <div id=\"charts\">","        <div class=\"chartGroup\">","            <p>{{durationTitle}}</p>","            <div class=\"chart\"></div>","        </div>","        <div class=\"chartGroup\">","            <p>{{dateTitle}}</p>","            <div class=\"chart\"></div>","        </div>","    </div>","    <div id=\"lists\">","      <table class=\"list\">","        <tr>","            {{#each tableRow}}","                <th>{{this.header}}</th>","            {{/each}}","        </tr>","      </table>","    </div>","</div>","<script>"," pm.getData((err, value) => {","     const durationRange = value.durationRange;","     const data = value.mappedData.map((d) => {","        d.airstamp = new Date(Date.parse(d.airstamp)); ","        return d;","     });","     const crossfilterData = crossfilter(data);","     const all = crossfilterData.groupAll();","","     const date = crossfilterData.dimension(function(d) {","                return d.airstamp.getHours();","         }),","         dates = date.group(Math.floor),","         duration = crossfilterData.dimension(function(d) {","             return d.runtime;","         }),","         durations = duration.group(Math.floor);","","     const charts = [","         barChart()","             .dimension(duration)","             .group(durations)","         .x(d3.scale.linear()","             .domain(durationRange)","             .rangeRound([0, 10 * durationRange[1]])),","         barChart()","             .dimension(date)","             .group(dates)","         .x(d3.scale.linear()","             .domain([0, 24])","             .rangeRound([0, 10 * 24])),","     ]","    ","    // Render the initial lists.","    const list = d3.selectAll(\".list\")","        .data([listFunc]);","","","","    // Various formatters.","    var formatNumber = d3.format(\",d\"),","        formatChange = d3.format(\"+,d\"),","        formatDate = d3.time.format(\"%B %d, %Y\"),","        formatTime = d3.time.format(\"%I:%M %p\");","","    // A nest operator, for grouping the flight list.","    var nestByDate = d3.nest()","        .key(function(d) { ","            const date = new Date(d.airstamp)","            return d3.time.day(date); ","        });","","","     // Given our array of charts, which we assume are in the same order as the","     // .chart elements in the DOM, bind the charts to the DOM and render them.","     // We also listen to the chart's brush events to update the display.","     var chart = d3.selectAll(\".chart\")","         .data(charts)","         .each(function(chart) {","             chart.on(\"brush\", renderAll).on(\"brushend\", renderAll);","         });","","     renderAll();","     // Renders the specified chart or list.","     function render(method) {","         d3.select(this).call(method);","     }","     ","     // Whenever the brush moves, re-rendering everything.","     function renderAll() {","         chart.each(render);","         list.each(render);","         d3.select(\"#active\").text(formatNumber(all.value()));","     }","     ","     ","","    function listFunc(div) {","        div.each(function() {","            const tableData = d3.select(this).selectAll(\".sighting\")","                .data(date.top(40), function(d) { return d3.time.day(d.airstamp) })","            const rowEnter = tableData.enter().append(\"tr\")","                 .attr(\"class\", \"sighting\");","            for (const {header, field} of value.tableRow) {","                rowEnter.append(\"td\")","                    .attr(\"class\", header)","                    .text(function(d) {","                        return d[field];","                    });","            }","            tableData.exit().remove();","            tableData.order();","        });","    }","","","     function barChart() {","         if (!barChart.id) barChart.id = 0;","         var margin = {","                 top: 10,","                 right: 10,","                 bottom: 20,","                 left: 10","             },","             x,","             y = d3.scale.linear().range([100, 0]),","             id = barChart.id++,","             axis = d3.svg.axis().orient(\"bottom\"),","             brush = d3.svg.brush(),","             brushDirty,","             dimension,","             group,","             round;","         function chart(div) {","             var width = x.range()[1],","                 height = y.range()[0];","             y.domain([0, group.top(1)[0].value]);","             ","             div.each(function() {","                 var div = d3.select(this),","                     g = div.select(\"g\");","                     ","                 // Create the skeletal chart.","                 if (g.empty()) {","                     div.select(\".title\").append(\"a\")","                         .attr(\"href\", \"javascript:reset(\" + id + \")\")","                         .attr(\"class\", \"reset\")","                         .text(\"reset\")","                         .style(\"display\", \"none\");","                     g = div.append(\"svg\")","                         .attr(\"width\", width + margin.left + margin.right)","                         .attr(\"height\", height + margin.top + margin.bottom)","                         .append(\"g\")","                         .attr(\"transform\", \"translate(\" + margin.left + \",\" + margin.top + \")\");","                     g.append(\"clipPath\")","                         .attr(\"id\", \"clip-\" + id)","                         .append(\"rect\")","                         .attr(\"width\", width)","                         .attr(\"height\", height);","                     g.selectAll(\".bar\")","                         .data([\"background\", \"foreground\"])","                         .enter().append(\"path\")","                         .attr(\"class\", function(d) {","                             return d + \" bar\";","                         })","                         .datum(group.all());","                     g.selectAll(\".foreground.bar\")","                         .attr(\"clip-path\", \"url(#clip-\" + id + \")\");","                     g.append(\"g\")","                         .attr(\"class\", \"axis\")","                         .attr(\"transform\", \"translate(0,\" + height + \")\")","                         .call(axis);","                         ","                     // Initialize the brush component with pretty resize handles.","                     var gBrush = g.append(\"g\").attr(\"class\", \"brush\").call(brush);","                     gBrush.selectAll(\"rect\").attr(\"height\", height);","                     gBrush.selectAll(\".resize\").append(\"path\").attr(\"d\", resizePath);","                 }","                 // Only redraw the brush if set externally.","                 if (brushDirty) {","                     brushDirty = false;","                     g.selectAll(\".brush\").call(brush);","                     div.select(\".title a\").style(\"display\", brush.empty() ? \"none\" : null);","                     if (brush.empty()) {","                         g.selectAll(\"#clip-\" + id + \" rect\")","                             .attr(\"x\", 0)","                             .attr(\"width\", width);","                     } else {","                         var extent = brush.extent();","                         g.selectAll(\"#clip-\" + id + \" rect\")","                             .attr(\"x\", x(extent[0]))","                             .attr(\"width\", x(extent[1]) - x(extent[0]));","                     }","                 }","                 g.selectAll(\".bar\").attr(\"d\", barPath);","             });","","             function barPath(groups) {","                 var path = [],","                     i = -1,","                     n = groups.length,","                     d;","                 while (++i < n) {","                     d = groups[i];","                     path.push(\"M\", x(d.key), \",\", height, \"V\", y(d.value), \"h9V\", height);","                 }","                 return path.join(\"\");","             }","","             function resizePath(d) {","                 var e = +(d == \"e\"),","                     x = e ? 1 : -1,","                     y = height / 3;","                 return \"M\" + (.5 * x) + \",\" + y +","                     \"A6,6 0 0 \" + e + \" \" + (6.5 * x) + \",\" + (y + 6) +","                     \"V\" + (2 * y - 6) +","                     \"A6,6 0 0 \" + e + \" \" + (.5 * x) + \",\" + (2 * y) +","                     \"Z\" +","                     \"M\" + (2.5 * x) + \",\" + (y + 8) +","                     \"V\" + (2 * y - 8) +","                     \"M\" + (4.5 * x) + \",\" + (y + 8) +","                     \"V\" + (2 * y - 8);","             }","         }","         brush.on(\"brushstart.chart\", function() {","             var div = d3.select(this.parentNode.parentNode.parentNode);","             div.select(\".title a\").style(\"display\", null);","         });","         brush.on(\"brush.chart\", function() {","             var g = d3.select(this.parentNode),","                 extent = brush.extent();","             if (round) g.select(\".brush\")","                 .call(brush.extent(extent = extent.map(round)))","                 .selectAll(\".resize\")","                 .style(\"display\", null);","             g.select(\"#clip-\" + id + \" rect\")","                 .attr(\"x\", x(extent[0]))","                 .attr(\"width\", x(extent[1]) - x(extent[0]));","             dimension.filterRange(extent);","         });","         brush.on(\"brushend.chart\", function() {","             if (brush.empty()) {","                 var div = d3.select(this.parentNode.parentNode.parentNode);","                 div.select(\".title a\").style(\"display\", \"none\");","                 div.select(\"#clip-\" + id + \" rect\").attr(\"x\", null).attr(\"width\", \"100%\");","                 dimension.filterAll();","             }","         });","         chart.margin = function(_) {","             if (!arguments.length) return margin;","             margin = _;","             return chart;","         };","         chart.x = function(_) {","             if (!arguments.length) return x;","             x = _;","             axis.scale(x);","             brush.x(x);","             return chart;","         };","         chart.y = function(_) {","             if (!arguments.length) return y;","             y = _;","             return chart;","         };","         chart.dimension = function(_) {","             if (!arguments.length) return dimension;","             dimension = _;","             return chart;","         };","         chart.filter = function(_) {","             if (_) {","                 brush.extent(_);","                 dimension.filterRange(_);","             } else {","                 brush.clear();","                 dimension.filterAll();","             }","             brushDirty = true;","             return chart;","         };","         chart.group = function(_) {","             if (!arguments.length) return group;","             group = _;","             return chart;","         };","         chart.round = function(_) {","             if (!arguments.length) return round;","             round = _;","             return chart;","         };","         return d3.rebind(chart, brush, \"on\");","     }"," });","</script>`;","","const response = pm.response.json();","","// DATA PARSING ","// Replace string version of duration with log of seconds (ie: \"1 minute\" -> \"log(60)\")","const mappedData = response.map(s => {","        if (!!s.runtime) {","            s.runtimeMinutes = s.runtime;","            s.runtime = Math.floor(Math.random() * Math.floor(90));","            s.runtime = Math.log(s.runtime*60);","            let randomNumber = Math.floor(Math.random() * Math.floor(24));","            if (randomNumber < 10) {","                s.airstamp = s.airstamp.substring(0, s.airstamp.indexOf(\"T\")+1) +\"0\"+randomNumber + s.airstamp.substring(s.airstamp.indexOf(\"T\")+3);","            } else {","                s.airstamp = s.airstamp.substring(0, s.airstamp.indexOf(\"T\")+1) + randomNumber + s.airstamp.substring(s.airstamp.indexOf(\"T\")+3);","            }","        }","        const airstamp = new Date(s.airstamp);","        s.date = airstamp.toDateString();","        s.time = airstamp.toTimeString();","        return s;","    })","    .filter(s => !!s.runtime);","     ","// Set the range for duration","const durationRange = mappedData","     .map(s => s.runtime)","     .reduce((a, c) => {","         if (c < a[0]) {","             a[0] = c;","         }","         if (c > a[1]) {","             a[1] = c;","         }","         return a;","     }, [10000, 0]);","durationRange[0] = Math.floor(durationRange[0]);","durationRange[1] = Math.ceil(durationRange[1]);","","// Each array element denotes a column of the table displayed under the barcharts, with header being the column header and field being the data access field to retrieve the data for that row","const tableRow = [","    {","        header: 'Date',","        field: 'date'","    },","    {","        header: 'Time',","        field: 'time'","    },","    {","        header: 'Title',","        field: 'name'","    },","    {","        header: 'Runtime',","        field: 'runtimeMinutes'","    }","];","","// Set graph titles","const title = \"American Horror Story Episodes\";","const durationTitle = \"Length of Episode\";","const dateTitle = \"Time of Day Broadcasted\";","","pm.visualizer.set(template, {","    dateTitle,","    durationTitle,","    durationRange,","    mappedData,","    tableRow,","    title,","});",""],"type":"text/javascript"}}],"id":"9829edf1-59df-4989-8cea-37f759adb20c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://api.tvmaze.com/shows/30/episodes","description":"Visualizes how broadcast time affects episode length of American Horror Story using TVMaze API.\n\n<br>\n\n_Sample JSON response_\n```\n[\n    {\n        \"id\": 1567,\n        \"url\": \"http://www.tvmaze.com/episodes/1567/american-horror-story-1x01-pilot\",\n        \"name\": \"Pilot\",\n        \"season\": 1,\n        \"number\": 1,\n        \"airdate\": \"2011-10-05\",\n        \"airtime\": \"22:00\",\n        \"airstamp\": \"2011-10-06T02:00:00+00:00\",\n        \"runtime\": 60,\n        \"image\": {\n            \"medium\": \"http://static.tvmaze.com/uploads/images/medium_landscape/13/32733.jpg\",\n            \"original\": \"http://static.tvmaze.com/uploads/images/original_untouched/13/32733.jpg\"\n        },\n        \"summary\": \"<p>Therapist Ben Harmon, his wife, Vivien, and their daughter, Violet, move across the country to Los Angeles to escape their troubled past.</p>\",\n        \"_links\": {\n            \"self\": {\n                \"href\": \"http://api.tvmaze.com/episodes/1567\"\n            }\n        }\n    },\n    {\n        \"id\": 1568,\n        \"url\": \"http://www.tvmaze.com/episodes/1568/american-horror-story-1x02-home-invasion\",\n        \"name\": \"Home Invasion\",\n        \"season\": 1,\n        \"number\": 2,\n        \"airdate\": \"2011-10-12\",\n        \"airtime\": \"22:00\",\n        \"airstamp\": \"2011-10-13T02:00:00+00:00\",\n        \"runtime\": 60,\n        \"image\": {\n            \"medium\": \"http://static.tvmaze.com/uploads/images/medium_landscape/13/32734.jpg\",\n            \"original\": \"http://static.tvmaze.com/uploads/images/original_untouched/13/32734.jpg\"\n        },\n        \"summary\": \"<p>Serial killer enthusiasts reenact the brutal murders of two nursing students, while Ben returns to Boston to fix a mistake involving an old flame.</p>\",\n        \"_links\": {\n            \"self\": {\n                \"href\": \"http://api.tvmaze.com/episodes/1568\"\n            }\n        }\n    },\n    ...\n]\n```\n<br>\n\n_Sample Crossfilter_\n![alt text](https://raw.githubusercontent.com/isabelleyzhou/postman_visualizer_templates/master/cross-filter/TVMaze.PNG \"[Crossfilter]\")"},"response":[],"_postman_id":"9829edf1-59df-4989-8cea-37f759adb20c"},{"name":"Twitter","event":[{"listen":"test","script":{"id":"cfe6e975-3bd2-4ccc-a53e-2ebdc920b14a","exec":["const template = `","<style>","#charts {","    display: flex;","}","",".chartGroup {","    display: flex;","    flex-direction: column;","    align-items: center;","    margin: 32px;","}","#body {","    display: flex;","    align-items: center;","    flex-direction: column;","    background-color: white;","}","","#charts {","  padding: 10px 0;","}",".chart {","  display: inline-block;","  height: 151px;","  margin-bottom: 20px;","}",".reset {","  padding-left: 1em;","  font-size: smaller;","  color: #ccc;","}",".background.bar {","  fill: #E0DFD5;","}",".foreground.bar {","  fill: #F17D12;","}",".axis path, .axis line {","  fill: none;","  stroke: #000;","  shape-rendering: crispEdges;","}",".axis text {","  font: 10px sans-serif;","}",".brush rect.extent {","  fill: #F17D12;","  fill-opacity: .125;","}",".brush .resize path {","  fill: #eee;","  stroke: #666;","}","table {","    margin: 0 100px","}","h4 {","    font: 30px sans-serif;","    font-weight: bold;","    margin-top: 20;","    margin-bottom: 0;","}","","</style>","<script src=\"https://d3js.org/d3.v3.min.js\"></script>","<script src=\"https://cdnjs.cloudflare.com/ajax/libs/crossfilter/1.3.12/crossfilter.min.js\"></script>","<div id=\"body\">","    <h4>{{title}}</h4>","    <div id=\"charts\">","        <div class=\"chartGroup\">","            <p>{{durationTitle}}</p>","            <div class=\"chart\"></div>","        </div>","        <div class=\"chartGroup\">","            <p>{{dateTitle}}</p>","            <div class=\"chart\"></div>","        </div>","    </div>","    <div id=\"lists\">","      <table class=\"list\">","        <tr>","            {{#each tableRow}}","                <th>{{this.header}}</th>","            {{/each}}","        </tr>","      </table>","    </div>","</div>","<script>"," pm.getData((err, value) => {","     const durationRange = value.durationRange;","     const sightingsData = value.sightings.map((d) => {","        d.created_at = new Date(Date.parse(d.created_at));","        return d;","     });","     const sightings = crossfilter(sightingsData);","     const all = sightings.groupAll();","","     const date = sightings.dimension(function(d) {","                return d.created_at.getHours();","         }),","         dates = date.group(Math.floor),","         duration = sightings.dimension(function(d) {","             return d.favorite_count;","         }),","         durations = duration.group(Math.floor);","","     const charts = [","         barChart()","             .dimension(duration)","             .group(durations)","         .x(d3.scale.linear()","             .domain(durationRange)","             .rangeRound([0, 10 * durationRange[1]])),","         barChart()","             .dimension(date)","             .group(dates)","         .x(d3.scale.linear()","             .domain([0, 24])","             .rangeRound([0, 10 * 24])),","     ]","    ","    // Render the initial lists.","    const list = d3.selectAll(\".list\")","        .data([listFunc]);","","","","    // Various formatters.","    var formatNumber = d3.format(\",d\"),","        formatChange = d3.format(\"+,d\"),","        formatDate = d3.time.format(\"%B %d, %Y\"),","        formatTime = d3.time.format(\"%I:%M %p\");","","    // A nest operator, for grouping the flight list.","    var nestByDate = d3.nest()","        .key(function(d) { ","            const date = new Date(d.airstamp)","            return d3.time.day(date); ","        });","","","     // Given our array of charts, which we assume are in the same order as the","     // .chart elements in the DOM, bind the charts to the DOM and render them.","     // We also listen to the chart's brush events to update the display.","     var chart = d3.selectAll(\".chart\")","         .data(charts)","         .each(function(chart) {","             chart.on(\"brush\", renderAll).on(\"brushend\", renderAll);","         });","","     renderAll();","     // Renders the specified chart or list.","     function render(method) {","         d3.select(this).call(method);","     }","     ","     // Whenever the brush moves, re-rendering everything.","     function renderAll() {","         chart.each(render);","         list.each(render);","         d3.select(\"#active\").text(formatNumber(all.value()));","     }","     ","     ","","    function listFunc(div) {","        div.each(function() {","            const tableData = d3.select(this).selectAll(\".sighting\")","                .data(date.top(40), function(d) { return d3.time.day(d.created_at) })","            const rowEnter = tableData.enter().append(\"tr\")","                 .attr(\"class\", \"sighting\");","            for (const {header, field} of value.tableRow) {","                rowEnter.append(\"td\")","                    .attr(\"class\", header)","                    .text(function(d) {","                        return d[field];","                    });","            }","            tableData.exit().remove();","            tableData.order();","        });","    }","","","     function barChart() {","         if (!barChart.id) barChart.id = 0;","         var margin = {","                 top: 10,","                 right: 10,","                 bottom: 20,","                 left: 10","             },","             x,","             y = d3.scale.linear().range([100, 0]),","             id = barChart.id++,","             axis = d3.svg.axis().orient(\"bottom\"),","             brush = d3.svg.brush(),","             brushDirty,","             dimension,","             group,","             round;","         function chart(div) {","             var width = x.range()[1],","                 height = y.range()[0];","             y.domain([0, group.top(1)[0].value]);","             ","             div.each(function() {","                 var div = d3.select(this),","                     g = div.select(\"g\");","                     ","                 // Create the skeletal chart.","                 if (g.empty()) {","                     div.select(\".title\").append(\"a\")","                         .attr(\"href\", \"javascript:reset(\" + id + \")\")","                         .attr(\"class\", \"reset\")","                         .text(\"reset\")","                         .style(\"display\", \"none\");","                     g = div.append(\"svg\")","                         .attr(\"width\", width + margin.left + margin.right)","                         .attr(\"height\", height + margin.top + margin.bottom)","                         .append(\"g\")","                         .attr(\"transform\", \"translate(\" + margin.left + \",\" + margin.top + \")\");","                     g.append(\"clipPath\")","                         .attr(\"id\", \"clip-\" + id)","                         .append(\"rect\")","                         .attr(\"width\", width)","                         .attr(\"height\", height);","                     g.selectAll(\".bar\")","                         .data([\"background\", \"foreground\"])","                         .enter().append(\"path\")","                         .attr(\"class\", function(d) {","                             return d + \" bar\";","                         })","                         .datum(group.all());","                     g.selectAll(\".foreground.bar\")","                         .attr(\"clip-path\", \"url(#clip-\" + id + \")\");","                     g.append(\"g\")","                         .attr(\"class\", \"axis\")","                         .attr(\"transform\", \"translate(0,\" + height + \")\")","                         .call(axis);","                         ","                     // Initialize the brush component with pretty resize handles.","                     var gBrush = g.append(\"g\").attr(\"class\", \"brush\").call(brush);","                     gBrush.selectAll(\"rect\").attr(\"height\", height);","                     gBrush.selectAll(\".resize\").append(\"path\").attr(\"d\", resizePath);","                 }","                 // Only redraw the brush if set externally.","                 if (brushDirty) {","                     brushDirty = false;","                     g.selectAll(\".brush\").call(brush);","                     div.select(\".title a\").style(\"display\", brush.empty() ? \"none\" : null);","                     if (brush.empty()) {","                         g.selectAll(\"#clip-\" + id + \" rect\")","                             .attr(\"x\", 0)","                             .attr(\"width\", width);","                     } else {","                         var extent = brush.extent();","                         g.selectAll(\"#clip-\" + id + \" rect\")","                             .attr(\"x\", x(extent[0]))","                             .attr(\"width\", x(extent[1]) - x(extent[0]));","                     }","                 }","                 g.selectAll(\".bar\").attr(\"d\", barPath);","             });","","             function barPath(groups) {","                 var path = [],","                     i = -1,","                     n = groups.length,","                     d;","                 while (++i < n) {","                     d = groups[i];","                     path.push(\"M\", x(d.key), \",\", height, \"V\", y(d.value), \"h9V\", height);","                 }","                 return path.join(\"\");","             }","","             function resizePath(d) {","                 var e = +(d == \"e\"),","                     x = e ? 1 : -1,","                     y = height / 3;","                 return \"M\" + (.5 * x) + \",\" + y +","                     \"A6,6 0 0 \" + e + \" \" + (6.5 * x) + \",\" + (y + 6) +","                     \"V\" + (2 * y - 6) +","                     \"A6,6 0 0 \" + e + \" \" + (.5 * x) + \",\" + (2 * y) +","                     \"Z\" +","                     \"M\" + (2.5 * x) + \",\" + (y + 8) +","                     \"V\" + (2 * y - 8) +","                     \"M\" + (4.5 * x) + \",\" + (y + 8) +","                     \"V\" + (2 * y - 8);","             }","         }","         brush.on(\"brushstart.chart\", function() {","             var div = d3.select(this.parentNode.parentNode.parentNode);","             div.select(\".title a\").style(\"display\", null);","         });","         brush.on(\"brush.chart\", function() {","             var g = d3.select(this.parentNode),","                 extent = brush.extent();","             if (round) g.select(\".brush\")","                 .call(brush.extent(extent = extent.map(round)))","                 .selectAll(\".resize\")","                 .style(\"display\", null);","             g.select(\"#clip-\" + id + \" rect\")","                 .attr(\"x\", x(extent[0]))","                 .attr(\"width\", x(extent[1]) - x(extent[0]));","             dimension.filterRange(extent);","         });","         brush.on(\"brushend.chart\", function() {","             if (brush.empty()) {","                 var div = d3.select(this.parentNode.parentNode.parentNode);","                 div.select(\".title a\").style(\"display\", \"none\");","                 div.select(\"#clip-\" + id + \" rect\").attr(\"x\", null).attr(\"width\", \"100%\");","                 dimension.filterAll();","             }","         });","         chart.margin = function(_) {","             if (!arguments.length) return margin;","             margin = _;","             return chart;","         };","         chart.x = function(_) {","             if (!arguments.length) return x;","             x = _;","             axis.scale(x);","             brush.x(x);","             return chart;","         };","         chart.y = function(_) {","             if (!arguments.length) return y;","             y = _;","             return chart;","         };","         chart.dimension = function(_) {","             if (!arguments.length) return dimension;","             dimension = _;","             return chart;","         };","         chart.filter = function(_) {","             if (_) {","                 brush.extent(_);","                 dimension.filterRange(_);","             } else {","                 brush.clear();","                 dimension.filterAll();","             }","             brushDirty = true;","             return chart;","         };","         chart.group = function(_) {","             if (!arguments.length) return group;","             group = _;","             return chart;","         };","         chart.round = function(_) {","             if (!arguments.length) return round;","             round = _;","             return chart;","         };","         return d3.rebind(chart, brush, \"on\");","     }"," });","</script>`;","","const response = pm.response.json();","","// DATA PARSING ","//Replace string version of duration with log of seconds (ie: \"1 minute\" -> \"log(60)\")","const sightings = response.statuses.map(s => {","         s.handle = s.user.screen_name;","         s.favorites = s.favorite_count;","         s.favorite_count = Math.log(s.favorite_count);","         return s;","     });","","// set the range for duration","const durationRange = sightings","     .map(s => s.favorite_count)","     .reduce((a, c) => {","         if (c < a[0]) {","             a[0] = c;","         }","         if (c > a[1]) {","             a[1] = c;","         }","         return a;","     }, [10000, 0]);","durationRange[0] = Math.floor(durationRange[0]);","durationRange[1] = Math.ceil(durationRange[1]);","","// Each array element denotes a column of the table displayed under the barcharts, with header being the column header and field being the data access field to retrieve the data for that row","const tableRow = [","    {","        header: 'Timestamp',","        field: 'created_at'","    },","    {","        header: 'Username',","        field: 'handle'","    },","    {","        header: 'Favorites',","        field: 'favorites'","    },","    {","        header: 'Tweet',","        field: 'text'","    }","];","","// Set graph titles","const title = \"Tweets\";","const durationTitle = \"Number of Favorites\";","const dateTitle = \"Time of Day\";","","pm.visualizer.set(template, {","    dateTitle,","    durationTitle,","    durationRange,","    sightings,","    tableRow,","    title,","});",""],"type":"text/javascript"}}],"id":"a15a4467-1083-4384-b43e-afcc227a4d06","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer AAAAAAAAAAAAAAAAAAAAAGC%2BAAEAAAAAQBDuL%2BuzLMt2L1V6vVejiYu%2By%2Fg%3DbhzUhGy3XIGSTOgi6ptQSBowr4dRRx4dmigMBNgiN3rS5RZ51l","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"url":{"raw":"https://api.twitter.com/1.1/search/tweets.json?q=@McDonalds&result_type=popular&count=50","protocol":"https","host":["api","twitter","com"],"path":["1.1","search","tweets.json"],"query":[{"key":"q","value":"@McDonalds"},{"key":"result_type","value":"popular"},{"key":"count","value":"50"}]},"description":"Correlation between number of favorites and time of day using Twitter API.\n\n<br/><br/>\n\n_Sample JSON response_\n```\n{\n    \"statuses\": [\n        {\n            \"created_at\": \"Tue Nov 19 02:45:41 +0000 2019\",\n            \"id\": 1196620530998292481,\n            \"id_str\": \"1196620530998292481\",\n            \"text\": \"Career-high 26 points for @H23Ash\\n\\n@Wendys Player of the Game https://t.co/1KNWg7tfXT\",\n            \"truncated\": false,\n            \"entities\": {\n                \"hashtags\": [],\n                \"symbols\": [],\n                \"user_mentions\": [\n                    {\n                        \"screen_name\": \"H23Ash\",\n                        \"name\": \"ashton hagans\",\n                        \"id\": 2682044908,\n                        \"id_str\": \"2682044908\",\n                        \"indices\": [\n                            26,\n                            33\n                        ]\n                    },\n                    {\n                        \"screen_name\": \"Wendys\",\n                        \"name\": \"Wendy's\",\n                        \"id\": 59553554,\n                        \"id_str\": \"59553554\",\n                        \"indices\": [\n                            35,\n                            42\n                        ]\n                    }\n                ],\n                \"urls\": [],\n                \"media\": [\n                    {\n                        \"id\": 1196620092886388737,\n                        \"id_str\": \"1196620092886388737\",\n                        \"indices\": [\n                            62,\n                            85\n                        ],\n                        \"media_url\": \"http://pbs.twimg.com/media/EJs_xl3WsAEimkZ.jpg\",\n                        \"media_url_https\": \"https://pbs.twimg.com/media/EJs_xl3WsAEimkZ.jpg\",\n                        \"url\": \"https://t.co/1KNWg7tfXT\",\n                        \"display_url\": \"pic.twitter.com/1KNWg7tfXT\",\n                        \"expanded_url\": \"https://twitter.com/KentuckyMBB/status/1196620530998292481/video/1\",\n                        \"type\": \"photo\",\n                        \"sizes\": {\n                            \"thumb\": {\n                                \"w\": 150,\n                                \"h\": 150,\n                                \"resize\": \"crop\"\n                            },\n                            \"small\": {\n                                \"w\": 680,\n                                \"h\": 381,\n                                \"resize\": \"fit\"\n                            },\n                            \"large\": {\n                                \"w\": 2048,\n                                \"h\": 1149,\n                                \"resize\": \"fit\"\n                            },\n                            \"medium\": {\n                                \"w\": 1200,\n                                \"h\": 673,\n                                \"resize\": \"fit\"\n                            }\n                        }\n                    }\n                ]\n            },\n            \"extended_entities\": {\n                \"media\": [\n                    {\n                        \"id\": 1196620092886388737,\n                        \"id_str\": \"1196620092886388737\",\n                        \"indices\": [\n                            62,\n                            85\n                        ],\n                        \"media_url\": \"http://pbs.twimg.com/media/EJs_xl3WsAEimkZ.jpg\",\n                        \"media_url_https\": \"https://pbs.twimg.com/media/EJs_xl3WsAEimkZ.jpg\",\n                        \"url\": \"https://t.co/1KNWg7tfXT\",\n                        \"display_url\": \"pic.twitter.com/1KNWg7tfXT\",\n                        \"expanded_url\": \"https://twitter.com/KentuckyMBB/status/1196620530998292481/video/1\",\n                        \"type\": \"video\",\n                        \"sizes\": {\n                            \"thumb\": {\n                                \"w\": 150,\n                                \"h\": 150,\n                                \"resize\": \"crop\"\n                            },\n                            \"small\": {\n                                \"w\": 680,\n                                \"h\": 381,\n                                \"resize\": \"fit\"\n                            },\n                            \"large\": {\n                                \"w\": 2048,\n                                \"h\": 1149,\n                                \"resize\": \"fit\"\n                            },\n                            \"medium\": {\n                                \"w\": 1200,\n                                \"h\": 673,\n                                \"resize\": \"fit\"\n                            }\n                        },\n                        \"video_info\": {\n                            \"aspect_ratio\": [\n                                16,\n                                9\n                            ],\n                            \"duration_millis\": 10000,\n                            \"variants\": [\n                                {\n                                    \"content_type\": \"application/x-mpegURL\",\n                                    \"url\": \"https://video.twimg.com/amplify_video/1196620092886388737/pl/eU57Vz_XjLHPN7BN.m3u8?tag=13\"\n                                },\n                                {\n                                    \"bitrate\": 288000,\n                                    \"content_type\": \"video/mp4\",\n                                    \"url\": \"https://video.twimg.com/amplify_video/1196620092886388737/vid/480x270/yFA0o-64ynB05Hz6.mp4?tag=13\"\n                                },\n                                {\n                                    \"bitrate\": 2176000,\n                                    \"content_type\": \"video/mp4\",\n                                    \"url\": \"https://video.twimg.com/amplify_video/1196620092886388737/vid/1024x576/6n2YPpRVMIxoJa0P.mp4?tag=13\"\n                                },\n                                {\n                                    \"bitrate\": 832000,\n                                    \"content_type\": \"video/mp4\",\n                                    \"url\": \"https://video.twimg.com/amplify_video/1196620092886388737/vid/640x360/igUHJBlF8aRncGC4.mp4?tag=13\"\n                                }\n                            ]\n                        },\n                        \"additional_media_info\": {\n                            \"title\": \"Ashton Hagans\",\n                            \"description\": \"Wendy's Player of the Game\",\n                            \"embeddable\": true,\n                            \"monetizable\": false\n                        }\n                    }\n                ]\n            },\n            \"metadata\": {\n                \"result_type\": \"popular\",\n                \"iso_language_code\": \"en\"\n            },\n            \"source\": \"<a href=\\\"https://studio.twitter.com\\\" rel=\\\"nofollow\\\">Twitter Media Studio</a>\",\n            \"in_reply_to_status_id\": null,\n            \"in_reply_to_status_id_str\": null,\n            \"in_reply_to_user_id\": null,\n            \"in_reply_to_user_id_str\": null,\n            \"in_reply_to_screen_name\": null,\n            \"user\": {\n                \"id\": 35583547,\n                \"id_str\": \"35583547\",\n                \"name\": \"Kentucky Basketball\",\n                \"screen_name\": \"KentuckyMBB\",\n                \"location\": \"Rupp Arena\",\n                \"description\": \"Official Twitter account for Kentucky Men’s Basketball. #TGT - 𝗧he 𝗚reatest 𝗧radition. Eight-time NCAA champions, winningest program in college basketball.\",\n                \"url\": \"https://t.co/HcLn0lkgYi\",\n                \"entities\": {\n                    \"url\": {\n                        \"urls\": [\n                            {\n                                \"url\": \"https://t.co/HcLn0lkgYi\",\n                                \"expanded_url\": \"http://giphy.com/kentuckymbb\",\n                                \"display_url\": \"giphy.com/kentuckymbb\",\n                                \"indices\": [\n                                    0,\n                                    23\n                                ]\n                            }\n                        ]\n                    },\n                    \"description\": {\n                        \"urls\": []\n                    }\n                },\n                \"protected\": false,\n                \"followers_count\": 791003,\n                \"friends_count\": 653,\n                \"listed_count\": 1217,\n                \"created_at\": \"Sun Apr 26 22:25:01 +0000 2009\",\n                \"favourites_count\": 549,\n                \"utc_offset\": null,\n                \"time_zone\": null,\n                \"geo_enabled\": true,\n                \"verified\": true,\n                \"statuses_count\": 35138,\n                \"lang\": null,\n                \"contributors_enabled\": false,\n                \"is_translator\": false,\n                \"is_translation_enabled\": false,\n                \"profile_background_color\": \"0A11B8\",\n                \"profile_background_image_url\": \"http://abs.twimg.com/images/themes/theme1/bg.png\",\n                \"profile_background_image_url_https\": \"https://abs.twimg.com/images/themes/theme1/bg.png\",\n                \"profile_background_tile\": false,\n                \"profile_image_url\": \"http://pbs.twimg.com/profile_images/1192886378310373378/XGgfxVMk_normal.jpg\",\n                \"profile_image_url_https\": \"https://pbs.twimg.com/profile_images/1192886378310373378/XGgfxVMk_normal.jpg\",\n                \"profile_banner_url\": \"https://pbs.twimg.com/profile_banners/35583547/1502115999\",\n                \"profile_link_color\": \"060404\",\n                \"profile_sidebar_border_color\": \"FFFFFF\",\n                \"profile_sidebar_fill_color\": \"FFFFFF\",\n                \"profile_text_color\": \"060404\",\n                \"profile_use_background_image\": true,\n                \"has_extended_profile\": false,\n                \"default_profile\": false,\n                \"default_profile_image\": false,\n                \"following\": null,\n                \"follow_request_sent\": null,\n                \"notifications\": null,\n                \"translator_type\": \"none\"\n            },\n            \"geo\": null,\n            \"coordinates\": null,\n            \"place\": null,\n            \"contributors\": null,\n            \"is_quote_status\": false,\n            \"retweet_count\": 69,\n            \"favorite_count\": 602,\n            \"favorited\": false,\n            \"retweeted\": false,\n            \"possibly_sensitive\": false,\n            \"lang\": \"en\"\n        },\n        ...\n    ]\n}\n```\n\n\n<br>\n<br>\n\n_Sample Crossfilter_\n![alt text](https://raw.githubusercontent.com/isabelleyzhou/postman_visualizer_templates/master/cross-filter/Twitter.PNG \"[Crossfilter]\")"},"response":[],"_postman_id":"a15a4467-1083-4384-b43e-afcc227a4d06"}],"event":[{"listen":"prerequest","script":{"id":"5bb26bec-e4d9-4cad-9d77-bf755b3e52b3","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"33754c3e-fe00-49fc-bad3-f88be6223472","type":"text/javascript","exec":[""]}}]}