## Inspiration

As post secondary students, our mental health is directly affected. Constantly being overwhelmed with large amounts of work causes us to stress over these large loads, in turn resulting in our efforts and productivity to also decrease. A common occurrence we as students continuously endure is this notion that there is a relationship and cycle between mental health and productivity; when we are unproductive, it results in us stressing, which further results in unproductivity.

## What it does

Moodivity is a web application that improves productivity for users while guiding users to be more in tune with their mental health, as well as aware of their own mental well-being.

Users can create a profile, setting daily goals for themselves, and different activities linked to the work they will be doing. They can then start their daily work, timing themselves as they do so. Once they are finished for the day, they are prompted to record an audio log to reflect on the work done in the day.

These logs are transcribed and analyzed using powerful Machine Learning models, and saved to the database so that users can reflect later on days they did better, or worse, and how their sentiment reflected that.

## How we built it

***Backend and Frontend connected through REST API***

**Frontend**

* React
	+ UI framework the application was written in
* JavaScript
	+ Language the frontend was written in
* Redux
	+ Library used for state management in React
* Redux-Sagas
	+ Library used for asynchronous requests and complex state management

**Backend**

* Django
	+ Backend framework the application was written in
* Python
	+ Language the backend was written in
* Django Rest Framework
	+ built in library to connect backend to frontend
* Google Cloud API
	+ Speech To Text API for audio transcription
	+ NLP Sentiment Analysis for mood analysis of transcription
	+ Google Cloud Storage to store audio files recorded by users

**Database**

* PostgreSQL
	+ used for data storage of Users, Logs, Profiles, etc.

## Challenges we ran into

Creating a full-stack application from the ground up was a huge challenge. In fact, we were almost unable to accomplish this. Luckily, with lots of motivation and some mentorship, we are comfortable with naming our application *full-stack*.

Additionally, many of our issues were niche and didn't have much documentation. For example, we spent a lot of time on figuring out how to send audio through HTTP requests and manipulating the request to be interpreted by Google-Cloud's APIs.

## Accomplishments that we're proud of

Many of our team members are unfamiliar with Django let alone Python. Being able to interact with the Google-Cloud APIs is an amazing accomplishment considering where we started from.

## What we learned

* How to integrate Google-Cloud's API into a full-stack application.
* Sending audio files over HTTP and interpreting them in Python.
* Using NLP to analyze text
* Transcribing audio through powerful Machine Learning Models

## What's next for Moodivity

The Moodivity team really wanted to implement visual statistics like graphs and calendars to really drive home visual trends between productivity and mental health. In a distant future, we would love to add a mobile app to make our tool more easily accessible for day to day use. Furthermore, the idea of email push notifications can make being productive and tracking mental health even easier.
## Inspiration

The other day when we were taking the train to get from New Jersey to New York City we started to talk about how much energy we are saving by taking the train rather than driving, and slowly we realized that a lot of people always default to driving as their only mode of transit. We realized that because of this there is a significant amount of CO2 emissions entering our atmosphere. We already have many map apps and websites out there, but none of them take eco-friendliness into account, EcoMaps on the other hand does.

## What it does

EcoMaps allows users to input an origin and destination and then gives them the most eco-friendly way to get from their origin to destination. It uses Google Maps API in order to get the directions for the 4 different ways of travel (walking, biking, public transportation, and driving). From those 4 ways of travel it then chooses what would be the most convenient and most eco friendly way to get from point A to point B. Additionally it tells users how to get to their destination. If the best form of transportation is not driving, EcoMaps tells the user how much carbon emissions they are saving, but if driving is the best form of transportation it will tell them approximately how much carbon emissions they are putting out into our atmosphere. Our website also gives users a random fun fact about going green!

## How we built it

We started this project by importing the Google Maps API into javascript and learning the basics of how the basics worked such as getting a map on screen and going to certain positions. After this, Dan was able to encode the API’s direction function by converting the text strings entered by users into latitude and longitude coordinates through a built-in function. Once the directions started working, Dan built another function which extracted the time it takes to go from one place to another based on all 4 of our different transportation options: walking, biking, driving, and using public transit. Dan then used all of the times and availability of certain methods to determine the optimal method which users should use to help reduce emissions. Obviously, walking or biking is always the optimal option for this, however, the algorithm took into account that many trips are far too long to walk or bike. In other words, it combines both logic and sustainability of our environment. While Dan worked on the backend Rumi created the user interface using Figma and then used HTML and CSS to create a website design based off of the Figma design. Once this was all done, Dan worked on ensuring that the integration of his code and Rumi’s front end display integrated properly.

## Challenges we ran into

One problem we ran into during our project was the fact that Javascript is a single-threaded language. This means that it can only process one thing at a time, which especially came into play when getting data on 4 different trips varying by travel method. This caused the problem of the code skipping certain functions as opposed to waiting and then proceeding. In order to solve this, we learned about the asynchronous option which Javascript allows for in order to await for certain functions to finish before progressing forward in the code. This process of learning included both a quick Stack Overflow question as well as some quick google scans.

Another problem that we faced was dealing with different screen sizes for our website. Throughout our testing, we were solely using devices of the same monitor size, so once we switched to testing on a larger screen all of the proportions were off. At first, we were very confused as to why this was the case, but we soon realized that it was due to our CSS being specific to only our initial screen size. We then had to go through all of our HTML and CSS and adjust the properties so that it was based on percentages of whichever screen size the user had. Although it was a painstaking process, it was worth it in our end product!

## Accomplishments that we're proud of

We are proud of coming up with a website that gives users the most eco-friendly way to travel. This will push individuals to be more conscious of their travel and what form of transportation they end up taking. This is also our second ever hackathon and we are happily surprised by the fact that we were able to make a functioning product in such a short time. EcoMaps also functions in real time meaning that it updates according to variables such as traffic, stations closing, and transit lines closing. This makes EcoMaps more useful in the real world as we all function in real time as well.

## What we learned

Throughout the creation of EcoMaps we learned a host of new skills and information. We learned just how much traveling via car actually pollutes the environment around us, and just how convenient other forms of transportation can be. On the more technical side, we learned how to use Figma to create a website design and then how to create a website with HTML, CSS, and JavaScript based on this framework. We also learned how to implement Google Maps API in our software, and just how useful it can be. Most importantly we learned how to effectively combine our expertise in frontend and backend to create our now functional website, EcoMaps!

## What's next for EcoMaps

In the future we hope to make the app take weather into account and how that may impact the different travel options that are available. Turning EcoMaps into an app that is supported by mobile devices is a major future goal of ours, as most people primarily use their phones to navigate.
## Inspiration

Mental health has become an increasingly vital issue on our campus. The facade of the perfect Stanford student (Stanford Duck Syndrome) means that real emotions and struggles are often suppressed. It is heartwarming to be able to connect with people on campus and see how they feel, in a familiar, yet anonymous way. Having the moment to connect with another person's experience of struggling with a Mid-Term or the Happiness after Stanford beats Cal can be amazingly uplifting.

## What it does

Our cross-platform app allows users to share how they feel in words. Their feelings are geolocated onto a map with a circle and with a timestamp anonymously. Our NLP sentiment analyzer creates a color for the feeling based on the sentiment of the feeling expressed. This provides a cool visualization to see how people feel across different geographic levels. For example, you can zoom into a building to observe that people are generally happy in the Huang Engineering Center because of TreeHacks currently and Zoom Out to see people in Stanford are generally stressed during midterm season. The ability to zoom in and even tap on a specific circle to see how a person feels in words allows you to go local while zooming out allows you to go global and gauge the general sentiment of an area or building as transparent colors overlap into generalized shades. It is a fascinating way to connect with people's deepest feelings and find the humanity in our everyday life.

## How we built it

Our front end was built in React Native through Google Maps and uses Node.js. Our backend consisted of a Flask server written in Python, on which our NLP sentiment analysis is done (Artificial Intelligence), determining colors for the circle based on the feeling estimated by the language model. Our database of feelings entries is stored in Firebase on the Cloud, with data being written to and from, to overlay feelings entries on the map. We also have a script running on Firebase to remove entries from a map after a certain time period (example 6 hours, so only the most recent entries are displayed on the map to the user). Our Flask Server is deployed on Heroku through the Cloud.

## Challenges we ran into

Getting Flask to communicate with our React Native app to produce the NLP sentiment analysis. Setting up our backend through Firebase to create markers on the map and persist user's responses in the long run.

## Accomplishments that we're proud of

Integrating all the different components was fascinating from Firebase to ReactNative to the NLP Sentiment Analysis through Flask.

## What we learned

We had no prior experience with React Native and Node.JS, so we learned this from scratch. Integrating all the different aspects of the solution from the frontend to backend to cloud storage was a thrilling experience.

## What's next for CampusFeels

We hope to add features to track the emotional wellbeing of areas in the long run as well as encourage users to develop the skills to track their own emotional well-being in the long run. We hope to apply data analytics to do this and track people's emotions related to different events/criteria e.g. Housing Choices, Weather, Big Game etc.