ToxTweet- Tools for Toxicovigliance on Twitter
Project description
Python files for Toxicovigilance on Twitter
What is it?
A collection of Python files, also listed on PyPI, as part of an ongoing effort to use Twitter for toxicology research.
How do I use it?
The easiest thing is to copy all of the files to someplace in your PYTHONPATH, like ~/bin.
RUN PYTHON MAIN.PY
This module creates a twitteryQuery.py object for all drugs listed in the formulary. It can save the results in JSON or XLS.
What other Python Plugins do I need?
-Numpy/SciPy -XLRD XLWT -python-twitter (use pip install twitter not easy_install twitter) -matplotlib -simplejson -networkx
What do the files besides main.py do?
—>twitterQuery.py: main.py creates an instance of twitterQuery for each drug in the “formulary” that you are … querying Twitter for.
- —>parser.py loads the JSON format results from querying twitter and formats them for NLP analysis by:
Writing a reduplicated record of the tweets to an XLS file for human rating. (Change filename, which indicates the location of the JSON dump of the twitter query, as needed.)
Making a stemmed corpus to use for semantic analysis, contextual analysis or as input to a classifier. (Change the savename as needed.)
—>loadTweets.py is a helper function to calculate the Fleisch-Kincaid grade level of a tweet.
—> medgraph.py draws a degree-rank plot with the social graph as an inset. ATTRIBUTION: This is a modified version of a file from the matplotlib examples gallery.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file toxtweet-0.10.tar.gz.
File metadata
- Download URL: toxtweet-0.10.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45e9c6fa356b22a9bc8e4144bab75ca56584b0c94c19aa482c45c5fa608dfa0b
|
|
| MD5 |
098829062e111c970375481b8c838c18
|
|
| BLAKE2b-256 |
44a94ca64ea5c5fbb4972f01844d1dfc37b2ad971ca8f4a593a832a68d3d52ea
|