Coronavirus and social data analysis with Twitter
The 2019-2020 coronavirus outbreak, officially known as COVID-19, was caused by the SARS-CoV-2 virus. The outbreak started in December 2019 in Wuhan, China, when several cases of pneumonia of unknown origin were reported.
This project approaches the topic from the perspective of Big Data and social media, using Twitter as a textual source to study temporal correlations between the evolution of the virus and social perception.
It should be read as historical and methodological context for the data project, not as medical advice. The technical continuation is the Tweepy CSV collection guide.
The implementation can be found at 1938.com.es/en/coronavirus-tweets-csv-tweepy .
Study context
Twitter is useful for capturing immediate public reactions because it concentrates short, timely messages that can be collected and analyzed through the platform API.
That makes it a practical source for studying trends, public concerns and changes in perception over time.
This page provides a short introductory overview of the virus, its origin and some key concepts before moving into data analysis.
Why are they called coronaviruses?
Because under an electron microscope they show an outer structure that resembles a crown.

Was this the first coronavirus we knew?
No. Several other coronaviruses were already known in humans, including HCoV-229E, HCoV-OC43, HCoV-NL63, HKU1, SARS-CoV and MERS-CoV.
The most severe earlier outbreaks were SARS-CoV and MERS-CoV, both of which caused serious mortality but were eventually contained.
How does it spread?
Viruses cannot reproduce on their own. They need to enter living cells and use their biological machinery to multiply.

Those outer spikes are precisely what the virus uses to enter human cells.

Do we know its genetic material?
Yes. RNA from infected patients was sequenced and shows roughly 30,000 letters encoding the viral genome.

Coronavirus and bats
The viral genome is highly similar to known coronaviruses found in bats.
Even so, it is still not fully certain whether the virus passed directly from bats or through another host animal first.
How can spread be reconstructed?
As the virus spreads, its RNA accumulates small mutations. Comparing genomes from different patients makes it possible to partially reconstruct transmission paths.
A reproducible social-data research design
Start with a question that can be measured, for example whether the volume and vocabulary of public posts changed around specific announcements. Define the observation period, languages, geographic scope, query terms and comparison events before collecting data. Changing keywords after seeing the results makes the analysis difficult to reproduce and increases confirmation bias.
- Collect: preserve post identifiers, UTC timestamps, query version and API access method.
- Clean: remove exact duplicates, identify reposts and separate automated or unusually active accounts.
- Describe: report messages and unique authors per day instead of relying on raw volume alone.
- Analyze: compare keywords, sentiment or topics across predefined time windows.
- Validate: manually review a sample and compare peaks with dated official events.
Metrics that do not overstate the evidence
Track unique authors, repost ratio, language, missing geolocation and account concentration alongside post counts. For sentiment or topic classification, publish the label definitions, model version and a manually annotated validation sample with agreement or error metrics.
Correlation with case counts, searches or news volume does not establish causality. Lagged patterns can generate hypotheses, but they must be interpreted with reporting delays, policy changes and media coverage in mind.
Bias, privacy and dataset preservation
Platform users are not a random population sample. Deleted posts, private accounts, API limits, moderation and ranking systems alter what can be observed. Avoid publishing unnecessary personal data or quoting sensitive messages in a way that makes authors easy to identify.
Store a dataset card with collection dates, filters, missing fields, deduplication rules and known limitations. Platform access has changed since the original project, so preserved metadata and analysis code are essential even when the original query cannot be rerun exactly.
How to read this page today
This article preserves the original context of an early COVID-19 data project, so some public-health facts reflect the moment when the work was written. Its current value is not medical guidance, but a practical example of how a fast-moving event can be framed as a data-analysis problem.
When using social data for this kind of study, the most important limitation is representativeness: tweets do not describe the whole population, API access can change over time and highly active accounts can distort the apparent level of concern. A useful analysis should therefore combine social signals with official sources, dates, geographic context and clear assumptions.
The related implementation page explains the collection step, while this page gives the background needed to interpret the dataset without confusing online conversation with epidemiological reality.
Bibliography
Sources and materials used in this section of the project.