Hold-Krykke / PythonExam

4. Semester Python Eksamens Projekt
1 stars 1 forks source link

CLI & Argparse #20

Closed Runi-VN closed 4 years ago

Runi-VN commented 4 years ago

Changes

Errors

This error occurs in some cases when plotting. I guess some of the data can't be transformed to certain plot types?

UserWarning: 'set_params()' not defined for locator of type <class 'pandas.plotting._matplotlib.converter.PandasAutoDateLocator'>
  ax.locator_params(integer=True)

Current output

See comments

Runi-VN commented 4 years ago

Current output by 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
Runi-VN commented 4 years ago

Okay very good

image