
Media Analysis Reimagined
In today's rapidly evolving media landscape, understanding how different platforms shape public discourse has become crucial for informed citizenship. Traditional legacy media outlets - newspapers, television networks, and established digital publications - operate under editorial standards developed over decades. Meanwhile, social media platforms like X provide real-time, unfiltered reactions from millions of users, creating a dynamic environment where news spreads instantly but with varying degrees of accuracy and emotional intensity. This AI-powered app monitors top global headlines and finds corresponding X posts, comparing how the same stories are covered, discussed, and received across these fundamentally different media environments. By examining sentiment patterns, emotional responses, and narrative framing, we can discover hidden patterns that influence how society processes information, forms opinions, and makes decisions. This comparative approach doesn't seek to determine which platform is "better," but rather to illuminate how each contributes to the complex tapestry of modern news consumption, helping readers develop media literacy skills essential for navigating our interconnected information age. Specifically, news stories are analyzed for overall sentiment (on a 0-1 scale where 0=very negative, 1=very positive) as well as the dominant emotion expressed, from both legacy sources and X posts. The data is then filtered for news items that are covered substantially differently and conveniently displayed in a table below (see the Latest Data section) for users to peruse, along with a commentary on the differences. The data automatically updates each day at 10pm CST (to capture a full day's worth of news stories), and is automatically posted here as well as on our X account, @Legacy_VS_X. Note that while only stories with a substantial difference in coverage are displayed here (in the latest data section), the full data for each article is in the database in case you'd like to refer to it later. See the source for further details.
Latest Data
Comparison of world news coverage between legacy media outlets and social media discourse on X. Data is automatically updated daily at 10pm to capture evolving narratives based on a full day's worth of news headlines.
Timestamp | Article Title | Legacy Sentiment | X Sentiment | Legacy Emotion | X Emotion | Analysis |
---|---|---|---|---|---|---|
July 19, 2025 @ 10:45AM | Scientist makes astonishing discovery after observing US-Mexico border wall with motion-sensing cameras: 'Beautiful region' | 0.4 | 0.5 | Concern | Curiosity | The X posts related to the topic of the border wall's impact on wildlife, as covered in the Yahoo article, exhibit a slightly more neutral sentiment with an average score of 0.5 compared to the article's sentiment of 0.4, which leans towards negative due to its focus on unintended consequences. While the article's dominant emotion is concern over environmental impacts, the posts on X more commonly express curiosity, reflecting an interest in the discovery rather than alarm. This difference suggests that X users may be engaging with the topic from a more exploratory perspective rather than a critical or worried stance. |
July 19, 2025 @ 1:20PM | The AI Ghost in the Machine Fired Him. Then It Gave Him a New Life | 0.8 | 0.27 | Hope | Fear | The Gizmodo article carries a notably positive tone with a sentiment score of 0.8 and hope as its dominant emotion, reflecting an optimistic view of AI's impact on personal reinvention. In contrast, recent popular X posts on the topic of AI-related job loss and replacement exhibit a much more negative average sentiment of 0.27, with fear emerging as the most common dominant emotion due to widespread anxiety over job security. This stark difference highlights a divide between the article's uplifting narrative and the prevalent distress and uncertainty expressed in X discussions. |
Archive
To access data for a previous date, please refer to our account on X, which automatically posts the current day's data at 10pm CST daily.
Source Code
This project is completely open source and free. It requires only PHP, MySQL, and API keys for xAI and NewsAPI. It is webserver agnostic, so you can use Apache, nginx, or whatever else will run PHP. The code that automatically posts the data to X also requires an API key from X and the free software packages wkhtmltopdf/wkhtmltoimage and ImageMagick (if you're running Ubuntu, sudo apt install wkhtmltopdf imagemagick is quick and easy).
Here is a quick rundown on the files:
- config.php - set your API keys here
- database.php - database functions to connect to your MySQL server, uses the MySQLi PHP extension
- get_news.php - gets today's global news headlines from legacy source via NewsAPI
- index.php - this file, which acts as the primary frontend
- main.php - responsible for invoking the functions defined in get_news.php, xai_article.php, and xai_x_posts.php. This is the file you want to execute in your crontab
- table.php - handles the latest data table, index.php calls this file as an include
- xai_article.php - passes a legacy news article to the xAI API to perform sentiment and emotion analysis
- xai_x_posts.php - searches X (via xAI API) for posts describing a particular news story. Finds the average sentiment and dominant emotion among these posts
- x_post.php - responsible for automatically posting the data to X. This should also be executed via cron slightly after main.php. Personally, I run them at 10:00 pm and 10:05 pm. Note that this requires an X API key in config.php as well as the TwitterOAuth package (easy install via composer)