{
  "base_audience": {
    "id": "1",
    "name": "All Internet Users",
    "expression": null
  },
  "locations": [
    "s2_1"
  ],
  "waves": [
    "q1_2024",
    "q2_2024",
    "q3_2024",
    "q4_2024"
  ],
  "rows": [
    {
      "id": "1",
      "name": "fb_boomers",
      "expression": {
        "and": [
          {
            "question": "q42011a",
            "datapoints": [
              "q42011a_3"
            ],
            "suffixes": [
              1,
              2
            ]
          },
          {
            "question": "q3new",
            "datapoints": [
              "q3new_1"
            ]
          }
        ]
      }
    },
    {
      "id": "2",
      "name": "fb_millennials",
      "expression": {
        "and": [
          {
            "question": "q42011a",
            "datapoints": [
              "q42011a_3"
            ],
            "suffixes": [
              1,
              2
            ]
          },
          {
            "question": "q3new",
            "datapoints": [
              "q3new_3"
            ]
          }
        ]
      }
    }
  ],
  "columns": [
    {
      "id": "1",
      "name": "Q1 2024",
      "expression": {
        "question": "waves",
        "datapoints": [
          "q1_2024"
        ]
      }
    },
    {
      "id": "2",
      "name": "Q2 2024",
      "expression": {
        "question": "waves",
        "datapoints": [
          "q2_2024"
        ]
      }
    },
    {
      "id": "3",
      "name": "Q3 2024",
      "expression": {
        "question": "waves",
        "datapoints": [
          "q3_2024"
        ]
      }
    },
    {
      "id": "4",
      "name": "Q4 2024",
      "expression": {
        "question": "waves",
        "datapoints": [
          "q4_2024"
        ]
      }
    }
  ]
}
{
  "row": {
    "id": "1",
    "name": "fb_boomers",
    "expression": {
      "and": [
        {
          "question": "q42011a",
          "options": [
            "q42011a_3"
          ],
          "suffixes": [
            1,
            2
          ]
        },
        {
          "question": "q3new",
          "options": [
            "q3new_1"
          ]
        }
      ]
    }
  },
  "row_index": 1,
  "column": {
    "id": "1",
    "name": "Q1 2024",
    "expression": {
      "question": "waves",
      "options": [
        "q1_2024"
      ]
    }
  },
  "column_index": 1,
  "audiences": {
    "column": {
      "audience": "1",
      "size": 257758496,
      "sample": 24922,
      "percentage": 100,
      "intersect_percentage": 100
    },
    "row": {
      "audience": "1",
      "size": 36643034,
      "sample": 3728,
      "percentage": 14.2,
      "intersect_percentage": 14.2
    }
  },
  "base": {
    "size": 257758496,
    "sample": 24922
  },
  "intersect": {
    "size": 36643034,
    "sample": 3728,
    "percentage": 14.2,
    "index": 100
  }
}
{}
{}
...

To explore how behaviours or preferences shift over time, a powerful method is to use a Crosstab analysis. A Crosstab structures data into a matrix where rows or columns represent audiences, specific data points, or variables like time periods or locations. That way, Crosstabs allow you to examine large amounts of data and spot trends, compare audience behaviours, and generate actionable insights.

For example, using GWI’s API, you can track how Facebook usage among Boomers and Millennials has changed over the last four quarters. Such analysis helps identify behavioural shifts and refine marketing strategies based on evolving trends.

You can use the waves question and its datapoints in Crosstab columns to see the shift in trends over time. For that, you can set appropriate audiences (we’ll call them fb_boomers and fb_millennials) as rows and the waves of the last 4 quarters as columns:

curl -X POST "https://api.globalwebindex.com/v2/saved/crosstabs" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d @req.json

The response is potentially a large JSON Lines file but you can extract the relevant data from response with a script like the one provided in examples.

{
  "base_audience": {
    "id": "1",
    "name": "All Internet Users",
    "expression": null
  },
  "locations": [
    "s2_1"
  ],
  "waves": [
    "q1_2024",
    "q2_2024",
    "q3_2024",
    "q4_2024"
  ],
  "rows": [
    {
      "id": "1",
      "name": "fb_boomers",
      "expression": {
        "and": [
          {
            "question": "q42011a",
            "datapoints": [
              "q42011a_3"
            ],
            "suffixes": [
              1,
              2
            ]
          },
          {
            "question": "q3new",
            "datapoints": [
              "q3new_1"
            ]
          }
        ]
      }
    },
    {
      "id": "2",
      "name": "fb_millennials",
      "expression": {
        "and": [
          {
            "question": "q42011a",
            "datapoints": [
              "q42011a_3"
            ],
            "suffixes": [
              1,
              2
            ]
          },
          {
            "question": "q3new",
            "datapoints": [
              "q3new_3"
            ]
          }
        ]
      }
    }
  ],
  "columns": [
    {
      "id": "1",
      "name": "Q1 2024",
      "expression": {
        "question": "waves",
        "datapoints": [
          "q1_2024"
        ]
      }
    },
    {
      "id": "2",
      "name": "Q2 2024",
      "expression": {
        "question": "waves",
        "datapoints": [
          "q2_2024"
        ]
      }
    },
    {
      "id": "3",
      "name": "Q3 2024",
      "expression": {
        "question": "waves",
        "datapoints": [
          "q3_2024"
        ]
      }
    },
    {
      "id": "4",
      "name": "Q4 2024",
      "expression": {
        "question": "waves",
        "datapoints": [
          "q4_2024"
        ]
      }
    }
  ]
}
{
  "row": {
    "id": "1",
    "name": "fb_boomers",
    "expression": {
      "and": [
        {
          "question": "q42011a",
          "options": [
            "q42011a_3"
          ],
          "suffixes": [
            1,
            2
          ]
        },
        {
          "question": "q3new",
          "options": [
            "q3new_1"
          ]
        }
      ]
    }
  },
  "row_index": 1,
  "column": {
    "id": "1",
    "name": "Q1 2024",
    "expression": {
      "question": "waves",
      "options": [
        "q1_2024"
      ]
    }
  },
  "column_index": 1,
  "audiences": {
    "column": {
      "audience": "1",
      "size": 257758496,
      "sample": 24922,
      "percentage": 100,
      "intersect_percentage": 100
    },
    "row": {
      "audience": "1",
      "size": 36643034,
      "sample": 3728,
      "percentage": 14.2,
      "intersect_percentage": 14.2
    }
  },
  "base": {
    "size": 257758496,
    "sample": 24922
  },
  "intersect": {
    "size": 36643034,
    "sample": 3728,
    "percentage": 14.2,
    "index": 100
  }
}
{}
{}
...