Abstract
Gathering up-to-date information on food prices is critical in developing regions, as it allows policymakers and development practitioners to rely on accurate data on food security. This study explores the feasibility of utilizing social media as a new data source for predicting food security landscape in developing countries. Through a case study of Indonesia, we developed a nowcast model that monitors mentions of food prices on Twitter and forecasts daily price fluctuations of four major food commodities: beef, chicken, onion, and chilli. A longitudinal test over 15 months of data demonstrates that not only the proposed model accurately predicts food prices, but also it is resilient to data scarcity. The high accuracy of the nowcast model is attributed to the observed trend that the volume of tweets mentioning food prices tends to increase on days when food prices change sharply. We discuss factors that affect the veracity of price quotations such as social network-wide sensitivity and user influence.
Introduction
In developing regions, food security is a high-stakes, fast-moving target. Policymakers require timely information to manage risks, yet official commodity price data is often plagued by "data lag"—sometimes released only monthly or quarterly due to infrastructure limitations. While crowdsourcing and web-scraping have been explored, they can be expensive or limited to formal e-commerce sites. This research addresses the challenge of transforming the noisy stream of social media (specifically Twitter) into a reliable, high-resolution economic indicator. The objective is "nowcasting": predicting the current state of the market before official statistics are finalized.
Methodology
The study proposes a two-step "Nowcast" model tailored for the volatility of developing markets.
Data Extraction and Cleaning
Using a custom taxonomy in Bahasa Indonesia, the researchers extracted tweets mentioning four staples: beef, chicken, onion, and chilli. Aggressive cleaning was implemented to remove "relative" price mentions (e.g., "prices went up") and filter out spam bots—primarily food vendors whose high-volume advertising skewed the data.
The Nowcast Algorithm
Unlike standard time-series models, the formula calculates the current price ($P_t$) as a weighted average of the previous day’s price and the current day’s tweet-derived price.
- Dynamic Weighting: The model uses the logarithmic volume of tweets as a weighting parameter ($\beta$). This is based on the observation that social media activity increases significantly during price spikes.
- The $\delta$ Filter: To mitigate the impact of outliers or "joke" prices, the model rejects any tweet suggesting a daily price change that exceeds a historical threshold ($\delta$).
- Resilience: If no tweets occur for several days, the model "restarts" using a moving average of recent estimates to prevent drift.
Key Insights and Results
The research utilized 15 months of Indonesian Twitter data (June 2012 – September 2013), totaling over 78,000 raw tweets.
Social Sensitivity as a Signal
A critical finding is that tweet volume peaks when prices change sharply. Users are 2.8 times more likely to tweet when prices are rising than when they are falling. This "social sensitivity" allows Twitter to function as an effective early-warning system for inflation.
Model Performance
The Nowcast model significantly outperformed traditional statistical filters like Inter-Quartile Range (IQR) and Kernel Density Estimation (KDE).
- Correlation: The model achieved a Pearson correlation ($r$) of 0.85 for beef and onion, and 0.84 for chicken. Even for chilli, which had lower tweet volume, the correlation remained strong at 0.76.
- Accuracy: The Mean Absolute Percentage Error (MAPE) was notably low, reaching 4.86% for beef.
- Timeliness: Cross-correlation analysis showed the highest accuracy at a "0-day" lag, confirming the model's ability to capture market status in real-time.
Limitations and Future Directions
While the results are promising, several challenges remain for global deployment. The keyword taxonomy is currently specific to Bahasa Indonesia, requiring localized linguistic expertise for other regions. Additionally, the model depends on high Twitter adoption; in areas where closed platforms like WhatsApp dominate, data extraction is more difficult. Future iterations could integrate multi-modal data sources, such as Google Trends or satellite imagery, to create an even more robust food security monitor.
Summary updated