HoD Detector, a System to Create Indicators about the Happiness of Citizens in a Smart City: Case of Study—GDL Smart City ()
1. Introduction
In smart city metrics, the measure of happiness is a subjective indicator and a complex task to perform due to the many involved elements that impact to achieve this condition. However, the opposite of happiness could be depression which there is many concrete tests to detect this disorder in the subject of study. Hence we propose the HoD detector.
The amount of tasks that a smartphone can perform is steadily increasing on a daily basis, being financial, consulting the weather or news or even maintaining contact with loved ones from afar. HoD Detector is an application that explores these capabilities, considering that it can be used to perform a presumptive diagnosis of depression, a psychological disorder with serious consequences, which may encourage people to commit suicide, see Figure 1 for a window of suicides in Mexico. Having that in mind, it is only logical that developers take advantage this growing technological trend to create applications of considerable aid in the wellbeing of the population, bettering the living conditions of a Smart City’s inhabitants. The latter’s rapid diagnosis coupled with its user-friendly interface ensures a considerable impact on the concept of a Smart City and its smart living-health metric.
2. Depressive Effect of Cities on Inhabitants
2.1. Importance of Smart City Metrics
Due the multidimensionality of cities, which are indeed complex systems, because of the many variables interrelated, is important for city inhabitants and city decision makers [1] to identify and measure the status of those main key areas that impact on the city ecosystem, which may reflect the actual situation or “smartness” of the city.
The smartness of a city is a topic that may arise debate among actors [2] , although is important for any city to establish a framework that states the main topics to promote and follow to progress in the smartness and evolve as a Smart City. To have a reference of the main key areas to keep focus on, we may consider the Boyd’s Cohen wheel [3] .
2.2. City Indicators
Cities need to work on a complex set of areas to evolve as a community and pose the best ecosystem for the inhabitants to evolve as a society and transcend. Some city indicators are explained in Table 1.
Happiness condition can be achieved on the presence of several situations that may “activate it”. Nevertheless, happiness is quite complex to measure but the depression is the most measured. In fact there are more efforts to tackle depression, an important medical topic with specialized research.
Depression is a condition that significantly affects the mood of any person who suffers from it. A way to better understand this disease is by dividing it into 3 levels. The first being-symptomatic, the second level-syndromic, and the nosological level, which indicates the existence of a disorder in which the symptoms are not caused by another disease or condition, and therefore permitting us to diagnose a depressive disorder [5] . There are currently various types of questionnaires that help us define the level of depression (symptom, syndrome, clinical conditions) that a person may suffer from [6] , we take as base the PHQ-9 validated questionnaire in order to elicit user’s mood using a
a. Smart cities frame indicators.
mobile app and then perform an analysis of their condition related to depression.
People’s mood in a Smart city shall provide the level of “motivation” of people which also impacts on productivity, relationship between citizens, perception of environment, acceptance of public policies, etc. The results gathered from the HoD app may be useful to reinforce or take actions in those hot spots of the city. That is to say, if people that take the test obtain results of depressive disorder then, if they are joined in a public space then the city should provide an action to alleviate the situation. Also, having historical data about people evolution on the disorder can be determined the possible actions to take in the forthcoming events during the next days [7] .
3. Measuring Depression
A study realized by Nelson Shen shows us an analysis of different applications (apps) for mobile devices pertaining to depression. This analysis portrays 243 applications approved by the study incorporating 5 principle topics such as: psychoeducation, symptom management, helpful resources, professional assistance (psychologists) and multipurpose. It is also divided in different categories: monitoring, auditory therapy, behavioral training, eBooks, among others (advice, lessons, spirituality, motivational) [8] .
There are some measurement standards to help identify depression of people, the focus is aimed on symptomatology but not all of the approaches have the versatility to be adjusted to any methodology used or tools, as the used in this proposal. Some interesting ways to measure depression are: those of the ICHOM standard set for Depression & Anxiety1, the criteria included in the DSM-IV-V1 as we used from [9] [10] .
HoD Detector it’s a user-friendly mobile application which gives an accurate depressive symptoms interpretation. This development can be used as a happiness metric tool on smart cities. The software was tested on young population between 18 - 25 years at Guadalajara smart city.
The development of HoD Detector complies with the majority of the characteristics mentioned in aforementioned study because of the “helpful links” section that can be found on the main menu. This section of the application enables the user to find professional help, directs user to self-help websites, download auditory therapy apps, motivational links and help in general. The results section is where the answered questions are stored along with the user’s diagnosis to allow the user to monitor his/her progress. We also included a photo gallery with many features that can distress the user and directly impact biogenic amine activity, specifically serotonin, modifying the behavior of the user and bettering his mood.
After the user completes the PHQ-9 test, information is uploaded to the cloud storage service thru the programed mechanism (see Figure 2).
3.1. Algorithm and Flow Diagram
Figure 1 represents the test menu algorithm, the questions are answered by dichotomy technique (yes or no answers), this was supported by the PHQ-9 (Patient Health Questionnaire 9) gold validated psychology tool. The diagnosis is saved into a real time MySQL Server database, all data will be available in the results menu to give a continuous monitoring mechanism to take advantage on disease progression.
3.2. Our Specific Approach
In order to obtain the level of depression, we have had assigned values to every diagnosis (see Table 2), process said values to obtain a numeric form of an otherwise intangi- ble diagnosis, these values are mapped into one of a set of depression labels which de-
![]()
Figure 2. Data uploading mechanism inside HoD Detector app.
![]()
Table 2. HoD Detector diagnosis impact level.
a. Data obtained by DSM-VI criteria.
notes a level of this disorder, also some previous testing is performed to aware in the level of short term memory, retention, capacities that increase according several conditions associated to healthy people, that may be happy [11] [12] .
The Happiness is relative and defined, as the overall appreciation of one’s life-as-a- whole, in short term, how much one likes the own life including daily tasks and also recreational activities, is a constant in different cultural contexts [13] .
Equation 1: Obtains the average level, where “n” is the number of user diagnosis per month and the “level” contains the values (0 - 5) depending on the diagnosis value.
(1)
When using the app, we can estimate the type if the user has or not any type of depression; hence, it is possible to know the quantity of people that does not have depression by calculating the number of users that applied the test with depression over the total number of people that applied the test.
4. Results
4.1. Application Interface
HoD Detector was carefully designed to be simple to use and aesthetically pleasing, ensuring full motivation of the users. Figure 3 shows a screenshot of the application’s interface.
The application supports the ability to input and view user history, depressive levels, and contact certificated institutes. This application also allows the viewing of past evaluations. All entries are logged with timestamps to ensure data consistency.
The design of the user interface allows the user to receive a diagnosis and his/her respective results in the time lapse of 2 - 5 minutes.
It was used a graph structure to model the logic steps available through the application. The used structure is based on true or false conditions that advance from the base (root) to the highest level (leaves) depending on the input conditions [14] . The associated graph-like algorithm employed in the HoD Detector’s main sensing, where the root contains basic user information (age and gender) and depends on the Boolean Values that the user assigns to the symptoms in order to track nodes until a proper presumptive diagnosis is reached.
4.2. Experiment Results
The experiment was carried out on two important universities of Guadalajara, Universidad de Guadalajara and CETI, on a sample of 55 students, 60% of them were men. After applying the test to a group of scholars, we have found some interesting results, as shown in Figure 4, it can be identified the several depression disorders and the percentage of people with any of them, but the granularity of depression is not present in
![]()
Figure 4. Results after users perform the HoD application test.
happy population due the fact that happiness is the rest of people that does not have any level of depression. Thus, this way we may estimate a percentage of public that is happy according to the results obtained under this approach.
5. Conclusion
The elements which compose a Smart City do not necessarily have to consist of environmental, infrastructural or economic factors, but also factors that pose a threat to the overall health of a Smart City’s environment, which in regards to depression can be at risk, considering the fact that many people are unaware of its existence or refuse to accept that they may have fallen victim to it. As mentioned throughout this paper, making use of emerging application technology is paramount to the evolution of the living conditions encountered in the city.
Acknowledgements
Authors would like to thank the Science and Technology Council (CONACyT), the Information Technologies PhD at the University of Guadalajara and the Smart Cities Innovation Centre, Centro de Enseñanza Técnica Industrial (CETI), CETI student Espinoza López Javier, the PRODEP project for the funding received and the IEEE for their support in achieving this research.
NOTES

1HoD Detector it’s a user-friendly mobile application which gives an accurate depressive symptoms interpretation. This development can be used as a happiness metric tool on smart cities. The software was tested on young population between 18 - 25 years at Guadalajara smart city.