Coding Challenge #48: White House Social Media Data Visualization
In this Coding Challenge, I discuss how to use the newly released White House social media data to make simple data visualization example with p5.js. Code: https://thecodingtrain.com/challenges/48-white-house-social-media-data-visualization
đšī¸ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/adc42eDiu
đĨ Previous video: https://youtu.be/JUDYkxU6J0o?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
đĨ Next video: https://youtu.be/nnlAH1zDBDE?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
đĨ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
References:
đ The White House Social Media Data: https://obamawhitehouse.archives.gov/blog/2017/01/05/new-lenses-first-social-media-presidency
đ ITP 'Obamathon' Github Repo: https://github.com/ITPNYU/Obamathon/tree/master/examples/P5/TweetsByMonth
Videos:
đ TF-IDF: https://codingtrain.github.io/website-archive/CodingChallenges/040.3-tf-idf
đĨ Livestream Archive: https://youtu.be/pF0cadg2mg0
Related Coding Challenges:
đ #109 Visualizing 500,000 Subscribers: https://youtu.be/Ae73YY_GAU8
Timestamps:
0:00 Introduce the coding challenge
1:38 Describe the format of the data
2:05 Illustrate the JSON data
2:51 Let's code
3:28 Load the JSON data
5:05 Iterate through the tweets
6:20 Count tweets by month
7:01 Create a date object
8:03 Describe date properties
9:12 Create a key based on the year and month
9:28 Explain how to count instances with an identifier
9:54 Create an object to count tweets
11:14 Visualize data
11:50 Consider data chronologically
12:40 Draw a bar for each month
14:39 Use the count for the height of the bars
15:22 Consider the minimum and maximum values to normalize the data
16:40 Resize the height of the bars
18:05 Count words in each month
18:44 Create an object to count words
20:00 Consider the text of all tweet
20:21 Break the text into words
22:32 Iterate through the words
22:53 Count the frequency of the words
23:56 Explain the existing code
24:30 Examine object and word count
25:32 Filter words
26:37 Find the most frequent word in each month
26:47 Mention video 'Term Frequency - Inverse Document Frequency' for an alternative analysis.
27:14 Extract the words for each month.
28:04 Iterate through the words to consider the most frequent value
29:39 Clean up data to ignore a set of words
31:45 Draw data to the canvas
32:45 Summarize the coding challenge
32:55 Test with a different dataset
33:53 Conclude the coding challenge
Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound
đ Website: http://thecodingtrain.com/
đž Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
đŠ Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
đĄ GitHub: https://github.com/CodingTrain
đŦ Discord: https://discord.gg/hPuGy2g
đ Membership: http://youtube.com/thecodingtrain/join
đ Store: https://standard.tv/codingtrain
đī¸ Twitter: https://twitter.com/thecodingtrain
đ¸ Instagram: https://www.instagram.com/the.coding.train/
đĨ Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
đĨ Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
đ p5.js: https://p5js.org
đ p5.js Web Editor: https://editor.p5js.org/
đ Processing: https://processing.org
đ Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct
This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new
#datavisualization #wordcount #javascript #p5js