Could Online Data Have Predicted Taichung's 2026 Flip? A 20-Race Test
A sentiment flip backtest is a method that compares pre-vote news and social media data against election counts to test whether online metrics flagged a reversal early. InfoMiner Election Lab, part of LargitData, backtested 345,884 items against the 2026 Central Election Commission preliminary count across 20 Taiwan races. The rule saved before checking the count did not issue a flip alert for Taichung and issued a false alert for Taipei. A model fitted after the count using prior results, incumbency, and news volume matched 16 of 18 scored races and must be saved before voting next time to be tested.
The 2026 Taichung mayoral race produced a surprise reversal. According to the Central Election Commission (CEC) preliminary count as of 00:21 on November 29 (unofficial), Democratic Progressive Party (DPP) candidate Ho Hsin-chun led Kuomintang (KMT) candidate Johnny Chiang, while major polls published before Taiwan's pre-election polling blackout did not point in that direction. After election night, many corporate clients and journalists asked a direct question: could online sentiment data have spotted the Taichung flip early? To test this, InfoMiner Election Lab, part of LargitData, compiled 345,884 news articles and social media posts collected in real time before voting and compared them against the CEC preliminary count across 20 counties and cities in Taiwan.
Here are our three main findings upfront. First, the volume and favorability rule that InfoMiner Election Lab saved after voting ended, before comparing against the vote counts, did not issue a flip alert for Taichung, and it issued a false alert for Taipei, which did not flip. Second, looking back at the data after the count, a three-factor model combining the 2022 result, whether the incumbent ran, and news volume in the two weeks before the polling blackout matched which side led in 16 of 18 scored races, including Taichung. That model was fitted after the count, so it must be saved before voting next time to be tested. Third, online sentiment cannot replace polling. Looking back at this election, an approach worth saving before voting next time is to use polls as the primary reference and treat it as a warning when the polling average and the model point to different leading candidates. The rest of this post walks through the main findings, while step-by-step math, six-municipality comparisons, and raw data are published in the full feature on our election site.
We saved our rule before checking the count and defined our data and metrics
This analysis covers 20 of Taiwan's 22 counties and cities. Two outlying counties are left out of the 20-race model: Kinmen County, where the candidate elected in 2022 was an independent with no party continuity to the two main 2026 contenders, and Lienchiang County, where online data volume was too small. All 2026 vote figures come from the CEC preliminary count as of 00:21 on November 29 (unofficial). Yunlin County and Hualien County are marked as undecided because the margin between the top two candidates was smaller than the number of invalid ballots. Both counties remain in model estimation, while both are excluded from outcome scoring. As a result, denominators differ by section: the pre-saved rule covers 19 decided races (including Lienchiang County and excluding Yunlin County and Hualien County), the post-count model is scored on 18 races, and the poll comparison covers 13 races (14 counties with public polls minus Hualien County).
Our online dataset comes from news articles and social media posts mentioning candidates, collected in real time before voting by the InfoMiner election monitoring site. The main observation window runs from September 4, the candidate registration deadline, to November 17, the final day before the statutory polling blackout. It totals 345,884 items, all stored in the database before voting started on November 28. Throughout this post, the phrase "two weeks before the blackout" refers specifically to November 4 to November 17, which ended 11 days before election day.
To compare counties on a common scale, we use two core metrics. The first is two-candidate share, which counts only the votes of the two main candidates from the pan-blue camp (aligned with the KMT, including joint KMT and Taiwan People's Party (TPP) tickets) and the pan-green camp (aligned with the DPP). Their combined votes are treated as 100%, and each candidate's share is calculated out of that total. For 2022, we use the candidate from the same camp as in 2026. Unless stated otherwise, two-candidate share in this post refers to the pan-green candidate's share. In Taichung, for example, Ho Hsin-chun had an official preliminary vote share of 50.68%, and counting only Ho Hsin-chun and Johnny Chiang, her two-candidate share was 51.2%. The second metric is news share, defined as the pan-green candidate's news article count divided by the combined news articles for both main candidates, using news coverage only and excluding social media posts.
We also draw a strict line between pre-saved tests and post-count findings. The rule examined in the next section was committed to version control (git) on November 30 at 15:09 and 15:14, two days after voting, locking in the rule conditions, thresholds, time window, and calculated signal table before comparing them with the vote counts. Our team already knew Taichung had flipped when writing the rule, and saving it first prevented us from modifying the rule after seeing the comparison. Every finding after that section regarding incumbency, news volume, and polling warnings was identified after examining the vote counts and cannot be treated as a forecast.
The rule saved before checking the vote count did not issue a flip alert for Taichung
The pre-saved rule had one condition. During the two weeks before the polling blackout, if the challenger (the 2026 candidate from the camp that lost in 2022) had both a higher volume share and higher net favorability than the opponent, the rule issued a flip alert. Volume share means one candidate's combined news and social media mentions as a percentage of total mentions for both main candidates. Net favorability means the percentage of items automatically tagged as positive by the InfoMiner system minus the percentage tagged as negative, showing whether the wording leans positive or negative. Across the 19 decided races, 6 counties and cities flipped (Taichung, Yilan County, Hsinchu County, Changhua County, Penghu County, and Chiayi City). The rule issued a flip alert only for Penghu County and Chiayi City, missing Taichung and 3 other flips. Among the 13 races that did not flip, it issued a false alert for Taipei.
| Race | Volume share gap | Net favorability gap | Alert | Result |
|---|---|---|---|---|
| Taichung | +13.7 | -9.0 | No | Flipped |
| Penghu County | +25.0 | +14.1 | Yes | Flipped |
| Chiayi City | +19.0 | +7.4 | Yes | Flipped |
| Yilan County | -11.9 | +40.2 | No | Flipped |
| Hsinchu County | -11.9 | -21.1 | No | Flipped |
| Changhua County | -2.7 | +6.3 | No | Flipped |
| Taipei | +12.3 | +17.2 | Yes | Held |
Volume share gap: the challenger's share of mentions of the two candidates minus 50%, in points. Net favorability gap: (positive minus negative) divided by total for each candidate, challenger minus opponent, times 100. Both must be above zero for an alert. Of 19 settled races, 2 of 6 flips were caught and 1 of 13 holds got a false alarm (Taipei).
Breaking down the two metrics shows why the rule stayed silent on Taichung. During the two weeks before the blackout, Ho Hsin-chun accounted for 63.7% of combined mentions, 13.7 percentage points above half (a volume share difference of +13.7). However, her net favorability trailed Johnny Chiang by 9.0 percentage points (a net favorability difference of -9.0). Because only one of the two conditions was met, the rule did not issue a flip alert for Taichung. Over the same period, major pre-blackout polls also showed Johnny Chiang ahead, so neither tool flagged the reversal early. Comparing the 10-week trend before the blackout in Taichung and Taipei highlights the blind spot of relying on volume and net favorability alone.
Week by week across those 10 weeks, Ho Hsin-chun's volume share difference in Taichung stayed above 0 every week, while her net favorability difference sat below 0 in most weeks. Taipei followed the opposite pattern. DPP candidate Puma Shen held a higher volume share and higher net favorability than KMT candidate Chiang Wan-an in all 10 consecutive weeks. In the two weeks before the blackout, Puma Shen's volume share difference reached +12.3 and his net favorability difference reached +17.2, meeting the flip alert threshold for 10 straight weeks. In the CEC preliminary count, Chiang Wan-an still led with 53.72% of the official vote compared with Puma Shen's 45.69% (a pan-green two-candidate share of 46.0%), making Taipei a false alert under the rule.
Separating news from social media in Taichung during the two weeks before the blackout clarifies why combined net favorability favored Johnny Chiang. In news coverage, Johnny Chiang had 1,450 articles (49.4% positive, 6.7% negative, news net favorability +42.8), while Ho Hsin-chun had 2,555 articles (26.8% positive, 12.9% negative, news net favorability +13.9). On social media, Johnny Chiang had 2,077 posts (25.0% positive, 18.8% negative, social net favorability +6.3), while Ho Hsin-chun had 3,628 posts (26.9% positive, 15.8% negative, social net favorability +11.1). Including news lifted Johnny Chiang's combined net favorability much more strongly, putting Ho Hsin-chun behind overall. If the rule had used social media alone, it would have issued a flip alert for Taichung, while false alerts in non-flipping counties would have climbed to 4 (Taipei, Keelung, Miaoli County, and Hsinchu City). Automated positive and negative labels also measure text tone rather than voting intent. When we reviewed a sample of 554 social media posts tagged as negative across the four candidates in Taipei and Taichung, a separate AI model judged 157 of them (28%) to be supportive of the candidate.
Post-count analysis found three factors that moved alongside vote shifts
After confirming that volume and favorability alone missed Taichung, we examined the 20-county preliminary results against multiple combinations of indicators and arrived at a simple three-factor formula. It uses each county's 2022 two-candidate share, whether the incumbent ran, and news volume in the two weeks before the blackout. Starting from a county's 2022 pan-green two-candidate share, the formula adds 3.9 percentage points for the overall 2026 shift toward the pan-green camp. It then adjusts for incumbency: adding 8.1 percentage points if the KMT held the seat and the incumbent did not run, subtracting 8.1 percentage points if the DPP held the seat and the incumbent did not run, and making no adjustment if the incumbent ran for re-election. Finally, it looks at pan-green news share in the two weeks before the blackout, adding about 1.6 percentage points for every 10 percentage points above 50% and subtracting proportionally below 50%.
To evaluate this formula, we used leave-one-out testing. In plain terms, we hold out one county at a time, recalculate the formula's coefficients using only the other 19 counties' vote counts, and estimate the held-out county, repeating that process across all 20 races. We measured accuracy with mean absolute error, which subtracts each county's estimated share from its actual preliminary share, drops the plus or minus sign, and averages those gaps. Across the 18 scored races, we compared three methods:
- Using only the 2022 result, predicting that the same camp would lead again, matched the leading camp in 12 of 18 races.
- Combining the 2022 result with whether the incumbent ran, estimated with leave-one-out, matched 14 of 18 races, with a mean absolute error of 5.2 percentage points.
- Adding news volume from the two weeks before the blackout, estimated with leave-one-out, matched 16 of 18 races, reducing the mean absolute error to 4.0 percentage points.
Under leave-one-out testing, the three-factor model estimated Ho Hsin-chun's two-candidate share in Taichung at 54.2%, matching the direction of the preliminary count of 51.2%. Adding up the full 20-county coefficients step by step yields 53.8%, and the complete calculation alongside six-municipality comparisons appears in the full feature on our election site. To check whether the improvement from news volume could happen by chance, we kept the model structure fixed, randomly shuffled news share across counties, and re-ran the calculation 2,000 times. Only 2 runs achieved a mean absolute error of 4.01 percentage points or lower. That shuffle test does not account for selecting the variables and time window after seeing the count, so the true probability of coincidence is higher.
The model also has clear misses and narrow margins. Among the 18 scored races, it missed Tainan (estimating 46.2% against an actual 54.0%) and Hsinchu County (estimating 39.9% against an actual 58.7%). In Taipei (49.7%), Taitung County (49.7%), and Chiayi City (50.6%), the model matched the leading side, while each estimate fell within 1 percentage point of 50%. Taitung County's estimate missed the actual 37.2% by 12.5 percentage points. We also tested 663 extra fields covering engagement counts, mobilization keywords, and AI-classified stance. Letting software automatically pick the best additional feature in this small sample dropped the match count from 16 to 13 and widened the mean absolute error to 4.7 percentage points, showing high overfitting risk. Because this three-factor formula was fitted after the count, it must be saved before voting next time to be tested.
All six flips in this election happened where the incumbent did not run
Among the three elements in the formula, the largest adjustment comes from whether the incumbent ran. Grouping all 20 counties and cities (including undecided Yunlin County and Hualien County) into three categories by incumbent status shows the average change in pan-green two-candidate share from 2022 to 2026.
In the 9 KMT-held seats where the incumbent did not run, pan-green two-candidate share rose by an average of 12.5 percentage points from 2022. All 5 flips from pan-blue to pan-green (Taichung, Yilan County, Hsinchu County, Changhua County, and Chiayi City) occurred in this group. In the 7 counties and cities where the incumbent ran, pan-green two-candidate share rose by an average of 0.9 percentage points, with no flips. In the 4 DPP-held seats where the incumbent did not run, pan-green two-candidate share dropped by an average of 5.3 percentage points, including the 1 flip from pan-green to pan-blue in Penghu County. Every one of the 6 flips in this election occurred where the incumbent did not run.
Two caveats apply when reading these averages. First, among the 7 races where an incumbent ran, 6 involved a pan-blue incumbent (5 KMT officials plus Hsinchu City incumbent Kao Hung-an running as an independent under a joint KMT and TPP arrangement), while only Pingtung County's Chou Chun-mi was a DPP incumbent. Data from a single election cannot separate an incumbency effect from a party effect. Second, the bar chart reports group averages, while individual county swings varied widely within each group. Incumbent status alone cannot determine which candidate leads.
Pre-blackout news volume moved with vote shifts while Taipei showed the opposite
Placing all 20 counties on a scatter plot shows the relationship between media coverage and vote changes directly. The horizontal axis plots pan-green news share in the two weeks before the blackout, the vertical axis plots the change in pan-green two-candidate share from 2022, colors show incumbent status, and solid dots mark races that flipped.
The points slope upward to the right. Counties with a higher pan-green news share in the two weeks before the blackout generally saw larger pan-green gains over 2022, and KMT-held seats with no incumbent running sit mostly in the upper half. This pattern does not establish causation. Higher news coverage could put a candidate in front of more voters, or a race where a candidate already had growing local momentum could draw more reporters to cover it. We can only record that news volume and vote shifts moved together.
We also tested splitting news articles into positive, neutral, and negative subsets using automated tone tags and feeding each group separately into the model. Positive news matched 14 races, neutral news matched 15, and negative news matched 16, so no single tone outperformed counting all news articles together. News volume can also push an estimate in the wrong direction, and Taipei is a clear counterexample. In the two weeks before the blackout, Puma Shen had 1,696 news articles compared with 938 for Chiang Wan-an, yet Chiang Wan-an still led by about 8 percentage points in official preliminary vote share. The model matched the leading side in Taipei because of Chiang Wan-an's incumbency and the 2022 pan-blue baseline; news volume actually pulled the pan-green estimate upward to 49.7%, 3.7 percentage points above the actual 46.0%.
We used polls as the primary reference and treated disagreements with the model as warnings
Because the three-factor model missed Tainan and Hsinchu County, we brought in public pre-blackout polls to test how the two tools work together. We compiled polls released from October 17 to November 17, combining primary-tier polls (live telephone interviews with complete candidate lists) and reference-tier polls (such as online panels), with each poll weighted equally. Out of the 20 modeled counties, 14 had public polls; excluding undecided Hualien County leaves 13 scored races.
The warning rule stays simple: whenever the polling average and the model point to different leading candidates, a warning appeared. A warning indicates that the two signals disagree and prompts decision-makers and readers to review poll details and local race conditions. It does not assume the polls are wrong or that the model is right. Like the model itself, this warning rule was identified after seeing the count and is an approach worth saving before voting next time to be tested.
| Race | Poll avg | Model | Actual | Warning | Poll winner |
|---|---|---|---|---|---|
| Taipei | 50.8 | 49.7 | 46.0 | Yes | Wrong |
| New Taipei | 51.9 | 46.1 | 48.5 | Yes | Wrong |
| Taichung | 46.3 | 54.2 | 51.2 | Yes | Wrong |
| Tainan | 72.4 | 46.2 | 54.0 | Yes | Right |
| Hsinchu County | 53.2 | 39.9 | 58.7 | Yes | Right |
| Taoyuan | 44.9 | 42.6 | 44.3 | Right | |
| Kaohsiung | 56.4 | 52.5 | 53.6 | Right | |
| Keelung | 49.7 | 47.7 | 48.2 | Right | |
| Yilan County | 50.7 | 55.6 | 54.8 | Right | |
| Changhua County | 66.7 | 54.8 | 53.1 | Right | |
| Taitung County | 43.4 | 49.7 | 37.2 | Right | |
| Penghu County | 42.8 | 44.3 | 42.6 | Right | |
| Hsinchu City | 44.5 | 43.9 | 40.9 | Right |
DPP two-candidate share (%). Polls: published Oct 17 to Nov 17, main and secondary tiers, equal weight per poll. Model: last result + whether the incumbent ran + news share in the last two weeks, each race predicted from the other races (leave-one-out); it was fitted after the count. A warning means the two pick different winners. Hualien is pending and not scored.
Using the polling average alone matched the leading candidate in 10 of 13 races and missed 3 races: Taipei, New Taipei, and Taichung. Under the warning rule, a warning appeared in all 3 races that polls missed, while polls matched the leading candidate in all 8 races where no warning appeared. If 5 races were selected at random out of 13, the chance of hitting all 3 poll-missed races would be about 3.5%. Because the model was chosen after seeing the vote counts, that percentage is for reference only and is not a formal statistical test. In 2 of the 5 races where a warning appeared (Tainan and Hsinchu County), polls matched the leading candidate while the model missed. Polling averages in Taipei (50.8%) and New Taipei (51.9%) were also close to 50%, and in Taipei the polling average and model estimate differed by only 1.1 percentage points.
Sensitivity checks show that this warning mechanism responds strongly to methodological choices. If polls from the same sponsor are averaged first before computing a county average, Taichung's polling average shifts to about 50.003% (rounding to 50.0%, which the program classifies as slightly above 50% for the pan-green candidate). That aligns polls with the model, removes the Taichung warning, and raises the random-draw reference probability to 7.7%. Furthermore, two of the model's three inputs (prior election result and incumbent status) are non-online fundamentals. Removing news volume from the model still produces warnings for all 3 poll-missed races, adding only 1 false warning in Taitung County (a random-draw reference probability of 7.0%). Changing the news window to October 10 to November 13 shifts Taipei's estimate to 50.3% and removes the Taipei warning. Together, these checks show that warnings came mainly from prior results and incumbency, while the contribution of news volume shifts with the time window.
We also tested a simple 50/50 average of polls and the model. Across the 13 races, mean absolute error fell from 5.35 to 3.69 percentage points, while 60% of that gain came from Tainan alone, followed by Changhua County, and each had only 1 poll. Dropping Tainan and Changhua County leaves a mean absolute error difference of just 0.23 percentage points. In addition, a 50/50 average puts Taichung at 50.2%, only 0.2 percentage points above half, so a different polling aggregation method would flip the direction. At this stage, we do not recommend averaging the two figures directly. Poll sponsors by county and the full robustness table are available in the full feature on our election site.
Hsinchu County flipped sharply while online data and the model missed it
Focusing only on Taichung can lead readers to overestimate what news volume detects, and Hsinchu County offers the opposite reminder. According to the CEC preliminary count as of 00:21 on November 29, DPP candidate Cheng Chao-fang received 174,384 votes and KMT candidate Hsu Hsin-ying received 122,785 votes. Cheng Chao-fang led by about 17 percentage points in official preliminary vote share, reaching a pan-green two-candidate share of 58.7%. That was up 24.8 percentage points from 2022, the largest gain among all 20 counties.
In the online data from the two weeks before the blackout, however, Hsu Hsin-ying had 1,732 news articles compared with 766 for Cheng Chao-fang. Cheng Chao-fang also had a higher negative news share at 27.3% compared with Hsu Hsin-ying's 14.6%, while their social media post counts were close (953 compared with 1,060). The leave-one-out model estimated a pan-green two-candidate share of only 39.9%, falling 18.8 percentage points short of the preliminary count. News volume, social media counts, and the model used in this study all missed the flip. By contrast, the 5 pre-blackout polls averaged 53.2% (51.1% using primary-tier polls alone) and matched the leading candidate. Readers interested in local vote shifts can also review our comparison of county magistrate and district councilor vote totals across the two elections in the full feature.
Five limits must be considered when reading this sentiment backtest
- This analysis covers a single election and 18 scored counties, with only 3 polled races missed by polls. One additional miss would noticeably alter the accuracy rates.
- Apart from the rule saved on November 30, every formula, time window, and polling warning was selected after looking at the vote counts. Leave-one-out testing cannot eliminate the circularity of post-count variable and window selection, so these patterns must be saved before voting next time to be tested.
- News volume counts only media outlets tracked by InfoMiner, syndicated reprints are counted multiple times, and total news volume varies widely across counties. Automated positive and negative tags reflect text tone and cannot be equated with voter support or voting decisions.
- Among the 7 races where an incumbent ran, 6 featured a pan-blue incumbent, so a single election cannot separate incumbency from party effects. Counties without public polls also cannot apply the poll-versus-model warning rule.
- All vote comparisons in this post rely on the CEC preliminary count as of 00:21 on November 29 (unofficial). Yunlin County and Hualien County are listed as undecided because the margin between the top two candidates was smaller than the number of invalid ballots, and both are excluded from outcome scoring.
The full dataset and companion election reviews are available on our election site
This backtest clarifies the practical role of online sentiment in election analysis. A pre-saved rule built on volume and favorability alone missed the 2026 Taichung flip and issued a false alert in Taipei. A post-count model combining prior results, incumbency, and news volume matched 16 of 18 scored races and flagged poll disagreements, yet it missed Tainan and Hsinchu County and depended heavily on non-online fundamentals. To examine the step-by-step Taichung calculation, side-by-side tables for the six special municipalities and Hsinchu County, the poll-divergence robustness checks, the Hsinchu County magistrate and councilor vote comparison, the complete 20-county summary table, and downloadable raw CSV files to reproduce every calculation, read the full English feature on the InfoMiner Election Lab site. A Chinese version of the full feature is also available.
Two companion reviews in the same post-election series examine how traditional surveys and market pricing performed against the preliminary count: our report comparing pre-blackout polls with 2026 preliminary results and our report comparing international prediction markets with 2026 preliminary results.