/ece143project

Myers-Briggs Personality Analysis in Python

Primary LanguageJupyter Notebook

ECE143 Project Group 21

Myers-Briggs Personality Analysis in Python

Personality Type

image

File Structure

image

Running the Project

Link Processing

link_information_parser.py

get_link_ratio

Creates a dictionary of link ratios for each personality type

Dependencies: None

make_avg_link_chart

Visualizes link data

Dependencies: get_link_ratio

make_video_data_files

Creates csvs with output data for links from Youtube's API

Extremely long runtime/unneeded if all {Type}.csv exists

Dependencies: get_link_ratio

get_avg_view

Creates a dictionary of average views of youtube videos by personality

Dependecies: get_link_ratio, make_video_data_files

make_avg_view_chart

Visualizes view data

Dependencies: get_avg_view

spotify_search.py

make_genre_files

Creates csvs with output data for Youtube music videos from Spotify's API

Extremely long runtime/unneeded if all spotify-{Type}.csv exists

Dependencies: make_video_data_files

make_genre_charts

Visualizes genre data for each personality

Dependencies: make_genre_files

make_youtube_categories_chart

Visualizes the distribution of youtube categoies for all types

Dependencies: make_video_data_files

make_genre_charts_per_indicator

Visualizes genre data by indicator

Dependecies: make_genre_files

Pronoun Anaylsis

pronouns_analysis.py

main

Visualizes the usages for pronouns in the 1st/2nd/3rd person

Dependencies: none

Word and Sentiment Analysis

word_cloud.py

pre_process_data

Preprocesses and cleans the text by removing links, punctuation and lower case

Dependencies: none

generate_wordcloud_tfidf

Visualizes most commons words across all personality types

Dependencies: pre_process_data

sentiment_visualization.py

run_vader

Generates a dictionary of sentiment scores

Dependencies: none

get_sentiment_of_sentence

Returns sentiment for a particular sentence

Dependencies: run_vader

get_sentiments

Creates result_dict that contains number of positive, negative and neutral sentiments for each personality type

Dependencies: get_sentiments_of_sentence

dump_result_dict

Dumps the dictionary into a pickle file

Dependencies: get_sentiments

load_result_dict

Load the dictionary from a pickle file

Dependencies: dump_result_dict

plot_sentiment_pies_charts

Plots pie charts, showing percentage of each sentiment type for each personality type

Dependencies: load_result_dict

User Count analysis

mbti_visual_basic.py

Script

Visualizes the number of users per personality type and their average words per comment

Dependencies: none

Libraries Used

  • numpy
  • pandas
  • re
  • nltk
  • sklearn
  • wordcloud
  • spacy
  • matplotlib
  • pickle
  • seaborn
  • vader
  • pafy
  • spotipy