Skip to content

SimbaQuartz/twitter_sentimental_analysis

Repository files navigation

Note

Click the link below to see the dynamic view of the report:
https://nbviewer.jupyter.org/github/gujral1997/twitter_sentimental_analysis/blob/master/tsa.ipynb

Csv files of all the analysis are present inside the root directory of the repository

Python script performing analysis is present inside main_script.py

Documentation

Prerequisites

  1. Anaconda
  2. python2 and python3
  3. json2csv
  4. model.pkl (pre-trained model)

Installing the dependencies

Anaconda

Click here to install anaconda

json2csv

Click here to install json2csv

model.pkl

Click here to download model.pkl

Running the project

Mining the tweets

  1. Create you twitter api from here
  2. After that open mining_script.py and add consumer_key, consumer_secret, access_token and access_secret.
  3. You can edit geographic location. date, phrases you want to search in the same file.
  4. Tweets mined by the script will be in JSON format


Note: Use python3 to run the above script.

Converting JSON into csv

Run json2csv -i input_file.json -f text -o output_file.csv in your teminal to conver input json file into csv.

Running the Model

  1. Rename non_tech_pred.csv in model.py to your own csv filename.
  2. Copy model.pkl in root directory of the project.
  3. Run model.py
    Note: Use python2 to run the above script and your working directory should be root directory of the project.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published