Mental health and well-being is often overlooked within society as individual cases are shut down and rejected. Younger people are becoming more vocal about their feelings on social media and as such we see an opportunity to bring these voices to light.
What it does
MoodMap grabs tweets in a given area, where the content is to be analysed to determine the sentiment of the message. Using the sentiment and geo-location, we can represent this data on a map to help visualise this crisis to others.
How we built it
1) begin by sanitising user input of postcode(s) using a custom script to send a curl request to the postcodes.api. 2) format the JSON file received using another script and query it for latitude and longitude of postcode to send another curl request to Twitter API. 3) repeat above step to format the twitter JSON file and extract tweets from individuals in a radius from the previous latitude and longitude. 4) send the shortened JSON file to Google Cloud to analyse the texts using Natural Language Processing (NLP) where we could gauge if a tweet is positive or negative. 5) using the latitude, longitude and intent, we generate a geojson file to send to our website where the data is represented on a map using a colour that grows with density of data.
Challenges we ran into
1) Our original plan was to extract the use of emojis from tweets to gauge happiness but discovered that requires a paid plan to implement. 2) To work with Twitter data, you require a Twitter Developer account which takes time to be approved, meaning a lot of time was spent creating scripts to try and simulate real data until approval. 3) After getting the Twitter Developer account, we discovered that we could not get geo-location from individual tweets and as such had to instead search for tweets in a radius and extract data from that. 4) With the lack of time and experience, we were unable to get the Google Cloud platform working to enable the use of NLP for the deadline. 5) We had two members that did not study a computing course and as such felt like we would be at a disadvantage. One of the members taught themselves HTML/CSS to take on some of the workload, while the helped with research and development. 6) It was a struggle to get all of the different languages, frameworks and software working together.
Accomplishments that we're proud of
All members involved have pushed themselves during the event to learn what's needed and contribute to the overall goal where needed. Although we had many set-backs throughout the project, we stuck through with our idea as it is something we are passionate about and want to try and make a difference.
What we learned
One non-technical member learned a lot about web technologies and frameworks, while two others experienced their first hackathon. We learned a lot about teamwork, communication and putting all skills you have to good use while being willing to learn what's needed.
What's next for MoodMap
Improve upon all aspects of the code, including front-end website, back-end code, implementing the NLP and migrating custom scripts onto the cloud. Enrich the current data with more relevant analysis to cut out errors such as false-positives. Implement ways to try detect what is causing these pools of bad emotions over the country to try and visualise it better for those who can make a difference.