The world has become a large scale work from home experiment in the past 2 years. While many people are enjoying quality time with their family there are many who are feeling difficult to handle their mental health in this situation. Without a common workplace, Employers are unable to get a check on feelings due to large number of employees being scattered across cities. This can negatively impact the cohesion between teams and reduce overall throughput. If employers can get insights on employee feelings over time then they can work towards positive reinforcement to improve productivity and emotional health.
What it does
This application connects with social media (twitter) handle of employees in an organization and collects posts daily. From this, sentiment is generated using sentiment analysis api and stored for providing insights using a dashboard to HR. Application also sends a notification email to HR on a daily basis (Frequency can be adjusted). Also application provides deeper insight using RCSA api for the prominent words in the post.
How we built it
Our project is set as an open source project under the umberella of tech shuttle. We decided to use twitter as our primary social media platform to get posts of a user for this proof of concept.
Here's the flow for project:
- A PostgreSQL database table with employee information is created along with twitter url.
- Cronjob runs daily using a scheduler to get sentiment for each employee.
- Sentiment values are stored inside a table and also past 15 days history is maintained.
- Web Dashboard is updated for HR view.
- Also a notification email is sent to HR (email id) using Gmail client containing insights.
- Programming Languages: Python
- Framework: Flask
- Scheduler: CronJob
- Database: PostgreSQL
- External API: Twitter api
- Expert AI API: Sentiment Analysis api
- Email Client: Gmail
- Deployment Server: Heroku
Challenges we ran into
Here are the challenges we ran into:
- Scrapping posts from social media platform is difficult. For example, Linkedin restricts scrapping of data, twitter does not allow bulk scrapping etc.
- Sending notification email using gmail can be challenging due to security policy of gmail.
- Expert.ai api for sentiment analysis can provide wrong sentiment if tweet text is small.
Accomplishments that we're proud of
The application provides insights on employee health in a scalable manner. On this, HRs can take actions to cater to employee emotional health and take preemptive actions for better work environment. We are proud to create an application which can be easily used by HRs and is easy to integrated with existing HR systems. Also, it can work synchronously for multiple social media platforms due to it's plug and play nature.
What we learned
Following points reflect what we learned during this project:
- We understood how powerfull natural language processing can be while improving human life as whole. For example: Written text reflects sentiment of a person, which in turn associated with empathy and compassion will help keep in touch with human emotions.
- Designing a system which works on text processing insights becomes easier, if processing part is already taken care of. For example: We didn't have to worry about creating a model for sentiment analysis as it was already available from Expert.ai. Which in turn reduced our time for developing this system.
- We learnt how a project runs and power of open source system for critical assessment.
What's next for SocialCare
This is what future of SocialCare looks like:
- Plug and Play application which can be integrated with existing HR systems. (For now FreshTeam integration works.)
- Develop SocialCare as a PaaS application as well as Cloud native application to be used by HRs inside their organization.
- Add granular information for insights and improve dashaboard.
- Provide actionable templates for different threshold of negative sentiments/positive sentiments.
- Work towards getting recognized by organizations like FreshWorks, Expert AI etc.