Skip to content

Instantly share code, notes, and snippets.

@mehak-sachdeva
Last active June 27, 2017 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mehak-sachdeva/a3f346b63ae9835c08c50cd210eac141 to your computer and use it in GitHub Desktop.
Save mehak-sachdeva/a3f346b63ae9835c08c50cd210eac141 to your computer and use it in GitHub Desktop.
GWR tweets - final (all to all)

Geographically Weighted Regression

Objective: To understand geographically related tweets.

Methodology:

  • Aggregate all tweets per hashtag to the county geography in United States

  • Understand distibution of raw tweets per county

  • Normalize the raw counts with population of the county

  • Log transformation of the data to better suit geographically weighted regression methodolgy

  • GWR on each combination of the tweets to understand basic observations

  • Basic observations:
  • Map matrix (all hashtags vs. all other hashtags)

final_grid

  • Top twelve hashtags correlations weighted geographically for each tweet -

blackgirlsmagic blackgirlsrock blackgirlsrun blacktwitter getoutchallenge growingupblack icebucketchallenge jessewilliams neweditionbet oscarsowhite sayhername thanksgiving thankyouobama unameitchallenge whoistacey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment