Using APIs

SICSS, 2022

Christopher Barrie

Introduction

  • Why count tweets?
    • Test your API call

    • Of substantive interest

      • But… design considerations (normalizing)

Counting tweets

  • As barometer of public opinion

)

Source: here

Counting tweets

  • As measure of issue salience

Source: here

Counting tweets

  • As archival source

Source: here and here

Design considerations

  • Is this a barometer of offline opinion…?

Design considerations

  • Is this a barometer of offline opinion…?

Source: here

Design considerations

  • Is this an appropriate measure of issue salience?

    • What % of MPs are on Twitter?

Design considerations

  • Is this an appropriate measure of issue salience?

    • What % of MPs are on Twitter?
    • Answer: ~90% (see this useful website)
      • Coverage questions similar to survey design:

        • Does my sample capture population of interest?

          • What is the coverage?

          • Is there temporal bias?

          • Is there (equivalent) non-response?

Design considerations

  • Is this an appropriate measure of issue salience?

    • Does this capture online and offline dimensions?
      • Is communication here domain-specific?

      • How could we tell?

Group work

  1. Come up with a question answerable using get_tweet_counts()
  2. Formulate code needed to request that data
  3. (If access granted) make the API call to get data
  4. Consider limitations + design considerations
    • What bias might be built in?

    • Does this illuminate dynamics outside online domain?

    • What is the coverage like?