## Inspiration

Mental illness is a major issue that has been facing our society for millennia, yet only recently have we started taking it seriously. There needs to be more research in the subject to do better diagnosing and create better treatments - but unlike physical diseases, the surface area to probe for symptoms is mainly limited to people’s own thoughts, emotions, and interpretations.
We can now add an extra layer of insight with Soteria.
We were inspired by the idea of Soteria because we all are close with someone who is constantly dealing with mental illness but isn’t able to vocalize it.

## What it does

Soteria is a mental wellness tracker that allows a health professional to track their patient's emotional health over a period of time. The patient documents their thoughts and feelings in a personal Tumblr blog, which the program will parse through using a Tumblr API. Using sentiment analysis with the Watson Tone Analyzer and 2D plotting with Matplotlib, Soteria returns a graph of the patient's emotional status in a web app created in Flask using Python without needing the health professional to read through the blog, allowing the patient to feel more comfortable and be more honest about their personal journals.

## How we built it

Soteria is built mainly in Python, using Flask as the server and a set of python scripts to process data; pytumblr was used to retrieve data-sets from a selected account. This data-set is then used in conjunction with IBM's Watson to perform a sentiment analysis, which is processed into a graph using the Matplotlib library for better comprehension.

## Why Soteria?

As suicide rate is alarmingly high for teens between 15 to 24, we need an inexpensive, yet efficient way to keep track of at-risk youths. Soteria provides this by allowing the health professional to parse through any blog for an analysis of their emotional well-being over a period of time. Should there be a sign that the patient or client is experiencing more negative emotions over time, the health professional can check in and make sure that the person is alright without needing them to reach out first. This web app is useful for medical practices as well, as Pres Gainy, a nation leading provider of patient satisfaction, is very important and impactful in many hospitals and clinics.

## Challenges we ran into

One of the challenges we ran into was the front end of html/css, as all of us were back-end developers. Namely, the css files were an issue, as we were unaware that Flask serves css as static files.

## Accomplishments that we're proud of

We are proud of our achievement of our initial goal as well as the unity we showed as a team in seeking that end. We believe our teamwork was a great part of this and we look forward to continuing on this project with each other.

## What we learned

We learned how to select the best methods for the visualization of data in an effective manner. We also learned to use a lot of unfamiliar technologies, such as Watson and Flask.

## What's next for Soteria

In the future, we will continue to expand the functionalities of Soteria, including adding personal journals for users and making user accounts, so that it may be used in practice as a platform to help not only health professional, but patients as well, or a randomly sampled study on introducing new therapeutic practices.
In addition, we may move to Django/Postgres rather than Flask, and (tentatively) pewe, as a platform for our web app to increase its stability.
## Inspiration

Mental health is a serious issue but also one hard to diagnose and address. In these times of our virtual environments and uncertainties, people tend to face more difficulty and strain on their mental health. We aim to help individuals become more aware and hopefully, identify signs of mental health issues.

We realized that not too many people look after their mental health until it's far too late. As such, we decided to implement a solution that motivated people to write down their thoughts so that they could track their mood over time. Other mental health tracking apps exist on the market right now, but none utilize NLP to take advantage of the actual writing part of journalling. That is how our idea of Mood was born!

## What it does

Mood is a journaling app. It allows the user to make quick daily entries about how they feel and what significant events occurred. Using this text entry, the app performs sentiment analysis to rate the current mood of the user and tracks it over time. This enables the app to identify trends in the user's mental health daily, weekly, monthly, and overall. It also calculates the most frequently occurring emotional keywords and general keywords throughout a period, on top of the top positive and negative keywords that make the user smile and cry the most.

## How we built it

We built the interface of Mood using Flutter. Our team decided that for a journaling application, it would be more accessible if it was available on mobile. The sentiment analysis is done using Python and its NLP libraries like textblob, spacy, nltk, and transformers. Since the backend is written in Python, we decided to use Flask to manage our back-end server. These are connected with a REST API.

## Challenges we ran into

We all had to learn a new technology for this project and was definitely one of the biggest challenges that we faced. Another big challenge that we ran into is creating APIs to connect our front-end to the back-end.

## Accomplishments that we're proud of

Our team has a lot to be proud of. We all learned something new and got something to take away from this Hackathon. Even though we stayed up really late, we are happy that we have something to show to the judges.

## What we learned

One of the biggest lessons that we learned from this experience is how important the initial development plan is. Running into problems later on caused our team to spend more time to find a workaround to problems that in hindsight could have been better planned for.

## What's next for Mood

Mood has lots of room for future improvement. Features such as user authentication and cloud storage would be great additions to improve the security and protect the privacy of our users. Also, notification systems on long-term and short-term abnormal trends (bipolar, depression,...) of mood would be meaningful for users to understand their emotional behaviour. Other improvements would include a more accurate and advanced model of sentimental analysis and improving accessibility of the interface (i.e. voice or image input).
An online system that learns the users’ mood patterns and responds better to changes.
## Story

Mental health is a major issue especially on college campuses. The two main challenges are diagnosis and treatment.

### Diagnosis

Existing mental health apps require the use to proactively input their mood, their thoughts, and concerns. With these apps, it's easy to hide their true feelings.

We wanted to find a better solution using machine learning. Mira uses visual emotion detection and sentiment analysis to determine how they're really feeling.

At the same time, we wanted to use an everyday household object to make it accessible to everyone.

### Treatment

Mira focuses on being engaging and keeping track of their emotional state. She allows them to see their emotional state and history, and then analyze why they're feeling that way using the journal.

## Technical Details

### Alexa

The user's speech is being heard by the Amazon Alexa, which parses the speech and passes it to a backend server. Alexa listens to the user's descriptions of their day, or if they have anything on their mind, and responds with encouraging responses matching the user's speech.

### IBM Watson/Bluemix

The speech from Alexa is being read to IBM Watson which performs sentiment analysis on the speech to see how the user is actively feeling from their text.

### Google App Engine

The backend server is being hosted entirely on Google App Engine. This facilitates the connections with the Google Cloud Vision API and makes deployment easier. We also used Google Datastore to store all of the user's journal messages so they can see their past thoughts.

### Google Vision Machine Learning

We take photos using a camera built into the mirror. The photos are then sent to the Vision ML API, which finds the user's face and gets the user's emotions from each photo. They're then stored directly into Google Datastore which integrates well with Google App Engine

### Data Visualization

Each user can visualize their mental history through a series of graphs. The graphs are each color-coded to certain emotional states (Ex. Red - Anger, Yellow - Joy). They can then follow their emotional states through those time periods and reflect on their actions, or thoughts in the mood journal.