Inspiration

According to the World Health Organization, the COVID-19 pandemic resulted in a 25% increase in "anxiety and depression worldwide." The mental health crisis has reached an all-time high in recent years, affecting millions of children and adults in the US alone. We wanted to create a project that helps identify mental health issues and offers the resources necessary to illuminate the path to stability.

What it does

We created a website that accepts anyone's Facebook profile URL. It uses web scraping to look through the person's public friends list and checks the tone of their recent posts with sentiment analysis. If alarming posts are found (that exhibit signs of depression or other mental health issues), we provide the appropriate level of resources. For instance, anything of light concern might result in a recommendation to take a break or discuss the issue with friends & family, while a series of suicidal-sounding messages will prompt a more urgent request to call a lifeline and seek professional counseling.

How we built it

Our website's frontend was created with HTML & CSS, while the underlying code was written in Python and connected via Flask. We used Selenium to scrape data off each user profile, parsed post text with NLTK, and performed semantic analysis with TextBlob. Then, to classify the degree of mental health risk on different levels, we used SKLearn to train a decision tree with a labeled, 20,000-post dataset. Now, instead of an inflexible binary result ("depressed" or "not depressed"), users are assessed on a scale from 1-10 (with 1 indicating "no concern," and 10 the opposite). If the program determines that the user's post history is seriously alarming, we will redirect them to a list of supportive resources.

Challenges we ran into

Originally, we intended to use Twitter as our primary platform for testing. However, limitations with Twitter's free API prevented us from obtaining the data necessary for sentiment analysis. As a result, we had to swap to Facebook, but a lack of readily accessible data made it more challenging than expected.

Accomplishments that we're proud of

We were able to replicate a professional UI on our website from scratch within 24 hours and get around the limitations of Facebook API. We also augmented our training dataset and improved the decision tree's classification accuracy.

What we learned

From this project, we learned how to apply machine learning to real-world problems and obtained firsthand experience with sentiment analysis algorithms. Additionally, we learned how to scrape the web with Selenium and make a website with more advanced HTML, CSS, and Flask.

What's next for Illuminary

Eventually, we hope to expand this tool to a wide range of social media platforms, such as Twitter, Instagram, and more. Any posts made to these platforms are already analyzed on some level (since social media algorithms need to determine how to recommend them to others), so we hope platforms will adopt our product internally to search for mental health indicators in _ every post _, not just the recent ones in a friends list.

+ 16 more
Share this project:

Updates