Closed Runi-VN closed 4 years ago
app.py -h
$ python app.py -h
usage: TweetScraper9000
A program that scrapes Twitter for hashtags and performs a sentiment analysis on the results.
Presents results in a chosen chart format.
positional arguments:
hashtags The hashtags to scrape.
EXAMPLE: 'trump biden'
-REQUIRED-
optional arguments:
-h, --help show this help message and exit
-p PLOT_TYPE, --plot PLOT_TYPE
Plot chart type, choose one. VALUES=[bar, line, pie]
(default: pie)
-l, --local Pass to attempt scraping from local files.
(default: False)
-s, --save Pass to save plots locally
(if omitted will show plots instead)
(default: False)
-c TWEET_COUNT, --count TWEET_COUNT
The amount of tweets to search for.
(default: 300)
-d DATE DATE, --date DATE DATE
The date range (yyyy-mm-dd) to search for.
EXAMPLE: '2020-05-01 2020-05-05'.
(default: [datetime.date(2020, 5, 18), datetime.date(2020, 5, 23)])
-se REMOVE_SENTIMENT, --sentiment REMOVE_SENTIMENT
Ignore specific sentiment.
VALUES=[Positive, Negative, Uncertain]
(default: None)
-sh SEARCH_HASHTAGS [SEARCH_HASHTAGS ...]
Filter result data by specific hashtags.
EXAMPLE: '#Trump #Biden'
(default: None)
-sm SEARCH_MENTIONS [SEARCH_MENTIONS ...]
Filter result data by specific mentions.
EXAMPLE: '@JoeBiden @folketinget'
(default: None)
-su SEARCH_URLS [SEARCH_URLS ...]
Filter result data by specific URLs.
EXAMPLE: 'https://pic.twitter.com/'
(default: None)
-cl ADVANCED: certainty low
The lower float value for determining if a sentiment is deemed uncertain.
EXAMPLE: 0.15.
VALUES: [0.00-1.00] (default: 0.25)
-ch ADVANCED: certainty high
The higher float value for determining if a sentiment is deemed uncertain.
EXAMPLE: 0.65.
VALUES: [0.00-1.00] (default: 0.75)
Source: https://github.com/Hold-Krykke/PythonExam
Created by: Camilla, Malte, Asger, Rúni
Okay very good
Changes
get_tweet_data
has been changed tohandle_tweet_data
-> https://github.com/Hold-Krykke/PythonExam/pull/20/commits/7be50c6e5506887f3327e253b429e3cb43fabcb1 Best I could come up with, I swear.Errors
This error occurs in some cases when plotting. I guess some of the data can't be transformed to certain plot types?
Current output
See comments