Skip to main content

twarc-hashtags

This module is extends twarc with a hashtags command that will extract and count the hashtags in a tweet dataset.

Install

pip install twarc-hashtags

Collect some Twitter data, for example:

twarc2 search blacklivesmatter tweets.jsonl 

Because you installed the plugin you have a new subcommand hashtags:

twarc2 hashtags tweets.jsonl hashtags.csv

Then open hashtags.csv in your favourite spreadsheet program or DataFrame library.

Behind the scenes twarc-hashtags uses Python's native support for SQLite to create a database and then insert/query it. You can see this database after the program finishes as hashtags.db in your current working directory.

Options

--group: group results by day, week, month, year

--limit: limit to this number of hashtags (per group if --group is used)

--db: if you would like to name the database something other than hashtags.db

--no-insert: use an existing database instead of inserting (useful for large numbers of tweets)

Release files for twarc-hashtags 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for twarc-hashtags 0.0.5
File Size Uploaded
twarc-hashtags-0.0.5.tar.gz 3.7 kB Details

Release files / twarc-hashtags-0.0.5.tar.gz

Download URL twarc-hashtags-0.0.5.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d557840675bb6841a520f2fc49925cdc53977a126f13972a043e4fe3074385cc
BLAKE2b-256 checksum
How to use checksums
e487816e0509726b1431e53fadb4648afcbb0b3069e7835eda1ebdc713d00be5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.0.5 This release

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page