0% found this document useful (0 votes)
16 views46 pages

Progress Report

Uploaded by

Dholon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views46 pages

Progress Report

Uploaded by

Dholon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

Fontys University of Applied Sciences

ICT and Software Engineering

Feeler project
Progress Report

Dholon Akter

Version 1

Eindhoven, Friday 8th July, 2022


Contents

Contents ii

List of Figures 1

1 Introduction 2

2 Week 1 3
2.1 Knowledge enhancement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3 Week 2 4
3.1 Knowledge enhancement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

4 Week 3 5
4.1 Knowledge enhancement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

5 Week 4 6
5.1 Knowledge enhancement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
5.2 Evidence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

6 Week 5 7
6.1 Knowledge enhancement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
6.2 Evidence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

7 Week 6 8
7.1 Knowledge enhancement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
7.2 Evidence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
7.2.1 Machine Learning on embedded devices . . . . . . . . . . . . . . . . . . . . 8
7.2.2 Data collection on Edge Impulse . . . . . . . . . . . . . . . . . . . . . . . . 9
7.2.3 Feature extraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
7.2.4 Neural network classifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
7.2.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

8 Week 7 11
8.1 Knowledge enhancement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
8.2 Evidence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
8.2.1 Re-adjust software functional requirements . . . . . . . . . . . . . . . . . . 11
8.2.2 Analyzing the software requirements . . . . . . . . . . . . . . . . . . . . . . 12
8.2.3 Python practice of remote server . . . . . . . . . . . . . . . . . . . . . . . . 12

9 Week 8 13
9.1 Knowledge enhancement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
9.2 Evidence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
9.2.1 Adding new software functional requirements of user requirements . . . . . 13

ii Feeler project
CONTENTS CONTENTS

9.2.2 Agile framework in trello . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14


9.2.3 Github-Merge conflicts lesson . . . . . . . . . . . . . . . . . . . . . . . . . . 14

10 Week 9 15
10.1 Knowledge enhancement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
10.2 Evidence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
10.2.1 Meet and Match to get feedback of our project . . . . . . . . . . . . . . . . 15
10.2.2 SDD document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
10.2.3 Database design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

11 Week 10 17
11.1 Knowledge enhancement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
11.2 Evidence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
11.2.1 Research about technologies that is required to develop web application . . 17
11.2.2 Prepare for mid-term presentation of software part . . . . . . . . . . . . . . 17
11.2.3 Python programming course . . . . . . . . . . . . . . . . . . . . . . . . . . 17
11.2.4 python functionalities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
11.3 Research how line chart work in Flask . . . . . . . . . . . . . . . . . . . . . . . . . 18

12 Week 11 19
12.1 Knowledge enhancement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
12.2 Evidence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
12.2.1 Designed software architecture in SDD documents . . . . . . . . . . . . . . 19
12.2.2 Update concept selection about software part in SDD document . . . . . . 19
12.2.3 Research on SQLite tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
12.2.4 Flask practice in web application . . . . . . . . . . . . . . . . . . . . . . . 20

13 Week 12 21
13.1 Knowledge enhancement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
13.2 Evidence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
13.2.1 Research about emotion and mood data . . . . . . . . . . . . . . . . . . . . 21
13.2.2 Add a class of mood and emotion in python programming . . . . . . . . . . 22
13.3 Research how line chart works in Flask . . . . . . . . . . . . . . . . . . . . . . . . . 22

14 Week 13 23
14.1 Knowledge enhancement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
14.2 Evidence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
14.2.1 Adding test plan in SDD . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
14.2.2 Research about how Flask works in web server . . . . . . . . . . . . . . . . 24
14.2.3 MVC pattern added . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
14.2.4 Introducing MDD documents . . . . . . . . . . . . . . . . . . . . . . . . . . 24

15 Week 14 25
15.1 Knowledge enhancement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
15.2 Evidence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
15.2.1 Finalized SDD document . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
15.2.2 Adding javascript to the flask framework . . . . . . . . . . . . . . . . . . . 25
15.2.3 Research more about how to convert mood from emotion . . . . . . . . . . 26

16 Week 15 27
16.1 Knowledge enhancement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
16.2 Evidence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
16.2.1 Able to display dummy line,bar and pie chart to the webserver . . . . . . . 27
16.2.2 Read the emotion and timestamp from database . . . . . . . . . . . . . . . 28
16.2.3 Make a flowchart how to collect emotion and mood data . . . . . . . . . . . 29

Feeler project iii


CONTENTS CONTENTS

16.2.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

17 Week 16 30
17.1 Knowledge enhancement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
17.1.1 Improved the flow chart from previous weeks . . . . . . . . . . . . . . . . . 30
17.2 Research about how to get emotion vi MQTT over the network . . . . . . . . . . . 30

18 Week 17 31
18.1 Knowledge enhancement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
18.2 Evidence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
18.2.1 Improved Database design and class diagram . . . . . . . . . . . . . . . . . 31
18.2.2 Added new functionalities to convert emotion string to numeric value . . . 31

19 Week 18 33
19.1 Knowledge enhancement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
19.2 Evidence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
19.2.1 Draw the line chart with the functionalities . . . . . . . . . . . . . . . . . . 33
19.2.2 Sending the data to the HTML to run the application . . . . . . . . . . . . 33
19.2.3 Display the line chart in Web server . . . . . . . . . . . . . . . . . . . . . . 34

20 Week 19 35
20.1 Knowledge enhancement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
20.2 Evidence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
20.2.1 Added functionalities with avg mood . . . . . . . . . . . . . . . . . . . . . . 35
20.2.2 Re design the interface of Line chart . . . . . . . . . . . . . . . . . . . . . . 36

21 Conclusions 37

22 Appendix 38
22.1 Approved the file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

References 42

iv Feeler project
List of Figures

7.1 Data collection by using smart phone . . . . . . . . . . . . . . . . . . . . . . . . . . 9


7.2 Feature extraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
7.3 Neural network classifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
7.4 Course completion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

8.1 AI and visualization client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12


8.2 Communication between client and server . . . . . . . . . . . . . . . . . . . . . . . 12

9.1 Agile framework brainstorming in our project . . . . . . . . . . . . . . . . . . . . . 14


9.2 Github merge conflicts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

10.1 C4 model-container diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16


10.2 Entity relationship model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

12.1 Software Architecture to collect the mood data in web app . . . . . . . . . . . . . 19

13.1 Chart inspiration from internet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

14.1 Trello plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

15.1 Brainstroming: Collect emotion and mood in graph . . . . . . . . . . . . . . . . . . 26

16.1 Dummy bar and pie chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28


16.2 Printing time and emotion from graph.py file . . . . . . . . . . . . . . . . . . . . . 28
16.3 Flow chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

17.1 Improved flow chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

18.1 Database design and class diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

19.1 Line chart first test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

20.1 Final interface of Line chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

22.1 Client Approved file in Github . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38


22.2 Test projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
22.3 Test projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
22.4 Final project structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Feeler project 1
Chapter 1

Introduction

I am Dholon Akter and I am a student of ICT and Software Engineering.Currently, I have started
a minor called Be-creative.The project I have chosen is called Feel, introduced by IKIGAI. It is
a software company located in Eindhoven providing services in Edge IoT, Cloud services, APIs,
Apps and more. The company introduced the project called Feel brings people who live at a
distance closer together on an emotional level by detecting feelings and moods in a room and
sharing with someone you care about. The project team member consists of multi-discipline fields
Electrical, Mechatronics and Software. To complete the project successfully, this multi-discipline
is required. It is challenging and exciting to work with different background team members with
mix up project. In this document, I am going to write a weekly blog of my progress where I will
explain what I have learned overall and how I overcome the problems of a task.

2 Feeler project
Chapter 2

Week 1

The first week of the project was exciting and challenging for me. After introducing myself to
my team member, I started to read through the project description from IKIGAI. There are
some mechanical and electrical parts is involved, and I am from ICT and Software Engineering
background, which made me intimidated by the project. However, I searched for software parts
that could enhance my knowledge. For example, AI visualization, communication between client
and server and other features. After that, the most interesting part was to learn Latex, Github
Actions, and Github Wiki was introduced by our team leader Loek. I never knew about these
tools and technologies and how it is used. I installed Latex and its all dependencies and started to
read the documentation on how to use it. I wrote a blog of primary Trello usage in Github Wiki,
where using of Trello for our project was introduced by me.

2.1 Knowledge enhancement


• Familiar with project concept
• Latex Basic
• Github Wiki

• Trello basic
• GitHub Actions

Feeler project 3
Chapter 3

Week 2

In this week, I have become more familiar with my team member. I am so excited to work with
different background team members. We have made some questionaries for the client, and I took
notes for the meeting. After the client meeting, we have done brainstorming about our prototype,
where I have learned how to think creatively to get the actual prototype. Next, I had to write a
readme.md file to create a summary of our feel project in Github. To write readme.md file was
new for me, and I did not know how to write it. Secondly, I just started to learn the basic syntax
of Latex to make POA documentation. Finally, I wrote a blog on Agile and V-model in Github
Wiki

3.1 Knowledge enhancement


• Github Wiki (Agile and V-Model)


• Latex Basic(Project structure)
• Write Github readme.md
• POA documentation project structure

4 Feeler project
Chapter 4

Week 3

In week3, I just started diving into GitHub activities, creating brach, pull/push, pull request
reviews. After that, I learned how to generate the table in Latex to complete risk analysis in POA.
Second I have learned some basics of Python languages and built client and server applications,
and tested how it works. Finally, I will be continuing to do brainstorming what would be the
software requirements of our project.

4.1 Knowledge enhancement



• Github basic command lines
• Python Research

• Latex(Table Generate)
• POA documentation first version
• Software Requirements

Feeler project 5
Chapter 5

Week 4

After completing the Plan of Approach(POA), I have started working with the System Require-
ments Document(SRD). As a software engineer, I was not familiar with SRD documents, therefor
I got templates to understand the documents. After that, I wrote the introduction to this doc-
ument. Later, I have joined the client meeting to get feedback on the POA and be clear about
the requirements of the project. After the client discussion, I was responsible to contribute the
software parts, therefore I started to re-read the project description, POA, and client meeting
summary to get more clear about the software parts.

5.1 Knowledge enhancement


• Started working on SRD parts
• Gathering requirements from client

• Understanding the software parts

5.2 Evidence
Github Link
SRD introduction : Click here

6 Feeler project
Chapter 6

Week 5

After Understanding the software parts, it was time for me to brainstorm software components.
The end product is expected to the software part of the project is to train the Artificial Intelligent
to determine the mood of a group of the model. To make this possible, the MQTT broker, AI
client, and visualization client will be implemented from one device to another device. After that,
I have started Writing a software test plan.

6.1 Knowledge enhancement


• Brainstorming the software requirements
• Writing software requirements
• Writing software testing plan

• Started with embedded machine learning course


• Github Action
• Github pull request

6.2 Evidence
Github Link Below
Software Requirements: Click here
Software Testing Plan: Click here

Feeler project 7
Chapter 7

Week 6

In week 6, I have enrolled embedded machine learning course in Coursera where I have covered
several topics which will be discussed in below.I have learned what is machine learning, how it can
be used on embedded devices with software and hardware framework.In addition, Edge Impulse
tool can be used tool collect data, feature extraction and selection,train the model and deploy the
model.

7.1 Knowledge enhancement


• Machine learning on embedded devices
• Ethics of ML and its limitation
• Data collection and feature extraction on Edge Impulse

• Neural training
• Conclusion

7.2 Evidence
7.2.1 Machine Learning on embedded devices
An embedded system is any computer system that is contained on embedded inside of another
larger mechanical or electrical system.This is opposed to things like desktops,laptops, phones and
servers.Single board computers like this Raspberry Pi can be considered embedded system if they
are implemented into some other device like a robot.Similarly, micro-controllers like the one one
this Arduino board, are generally considered embedded system as well as they are often used to
control physical or electrical devices with little or no human interactions.Initially I was not clear
what is embedded machine and how it can be used in Machine learning. However it is now more
clear how to use embedded devices on ML.

8 Feeler project
CHAPTER 7. WEEK 6 7.2. EVIDENCE

7.2.2 Data collection on Edge Impulse


Here I have used my smart phone to connect with Edge Impulse for collecting data. I have collected
some motion data such as ups-downs, left-right, circle and idle. This data will be used for the
training purpose.Edge impulse is the platform for developing intelligent devices using embedded
machine learning.

Figure 7.1: Data collection by using smart phone

7.2.3 Feature extraction


Feature extraction refers to the process of transforming raw data into numerical features that can
processed while preserving the information in the original data set.In the below the example, there
are three axis x,y,z. It means this feature has three dimensions.Therefor our model will look for
three features as inputs, and use those three features to try to predict the class they belong to.

Figure 7.2: Feature extraction

7.2.4 Neural network classifier


Neural networks are a series of algorithms that mimic the operations of an animal brain to recognize
relationships between vast amount of data. It is very effective in categorizing data into identifiable
group for features. In below example, it shows that the accuracy is 100where it proves that there
is no anomaly detection on the training data.

Figure 7.3: Neural network classifier

Feeler project 9
7.2. EVIDENCE CHAPTER 7. WEEK 6

7.2.5 Conclusion
Overall, I have learned how to use the EDGE impulse tool to develop machine learning on edge
devices. I have covered some basic ideas of every area. Here I have worked on data visualization
and upcoming weeks I want to continue to improve this skills.In below I have provided the evidence
of finishing the course.

Figure 7.4: Course completion

10 Feeler project
Chapter 8

Week 7

During this week, We had a client discussion to discuss our project. We have received feedback
of SRD documents of every requirement. As I am responsible to software requirements, client
wanted to re-adjust the functional requirements and adding user requirements to it.

8.1 Knowledge enhancement


• Re-adjusted software functional requirements based on client feedback
• Analyzing the software requirements
• Python practice of remote server

8.2 Evidence
8.2.1 Re-adjust software functional requirements
Github link below:
SRD Software Requirements-1: Click here
SRD Software Requirements-2 : Click here

Feeler project 11
8.2. EVIDENCE CHAPTER 8. WEEK 7

8.2.2 Analyzing the software requirements


Here I have analyzed the software requirements which is described in below:

Figure 8.1: AI and visualization client

8.2.3 Python practice of remote server


In this assignment, I have done practice with python how to communicate between client and
server. And it is possible to communicate with multiple client which is shown in below. In our
project, there will be Communication between server and one client.AI client which is feeler device
will send the data through MQTT server and mood detector device will be subscribed the publisher
to receive the data to display the moods. In next week, I will be focusing on installing MQTT on
Rasberry Pi and continue to do further research.

Figure 8.2: Communication between client and server

12 Feeler project
Chapter 9

Week 8

This week, I have focused on to add new software requirements based on user requirements. In
addition, I came up with solution to follow agile framework in design and development phase. In
addition, I have researched of new requirements to define the functional requirements.Also I was
struggling with merge conflicts of Github where I have learned how to avoid merge conflicts best
way possible.

9.1 Knowledge enhancement


• Adding new software functional requirements and testing plan of user requirements
• Agile framework and V model in trello
• Github-Merge conflicts lesson

• Research Raspberry Pi and MQTT

9.2 Evidence
9.2.1 Adding new software functional requirements of user require-
ments
I have added software requirements and testing plan in Github can be found in below link:
Software Requirements-3: Click here

Feeler project 13
9.2. EVIDENCE CHAPTER 9. WEEK 8

9.2.2 Agile framework in trello


I have proposed team member to follow Agile framework in design phase.As a ICT student, it
is very confused to work with V model. However my team member concluded to follow this
methodology in the implementation phase. The proposing plan is given in below:

Figure 9.1: Agile framework brainstorming in our project

9.2.3 Github-Merge conflicts lesson


I have completed the lesson on Github merge conflicts, I understood that overwritten code or text
in same line make merge conflicts which should be avoided, therefor one of the developer should
re-arrange the work manually to resolve the conflicts which is shown in below:

Figure 9.2: Github merge conflicts

14 Feeler project
Chapter 10

Week 9

10.1 Knowledge enhancement


• Meet and Match to get feedback of our project
• Introduction of SDD documents and C4 model
• Database design

10.2 Evidence
10.2.1 Meet and Match to get feedback of our project
It was a new experience to visit at Evoluon building to get the feedback of project. We made
poster of our final project. Unfortunately, we did not get any student to get feedback of our
project. However,I have gather expereinced to ask for other company of their project and chance
for possible graduation internship.

10.2.2 SDD document


To get the concept, I have looked through the SDD documents and how it is structured. As this
documents was new for me. For the software part, there are some requirements updated in SRD
documents which is shown in github linked below:

Github Link : SRD user requirements finalization: Click here


I started research about C4 model of our software architecture and made diagram according the
requirements.

Feeler project 15
10.2. EVIDENCE CHAPTER 10. WEEK 9

C4 model
The C4 model for software architecture describes a procedure for documenting and designing
software architecture through diagrams.There are four levels of diagram but System context and
Container diagrams are sufficient for many software development teams. The 10.1 shows the high-

Figure 10.1: C4 model-container diagram

level shape of the software architecture and how responsibilities are distributed across it.A feel
user represents the client who will use our software system.Web server container retrieve the all
resource from database and database container collects the data from MQTT client.

10.2.3 Database design


The Entity-relationship(ER) model defines the conceptual view of a database. Therefore, the ER
model is considered a good option for designing a Database at the view level. ER model consists
of entities, attributes, keys, relationships and cardinalities. An Entity can be an easily identifiable
real-world object, also called a table in a Database. The design in below diagram shows that
Mood entity can have one to many emotions to the Emotions entity.The cardinality of both table
shows the relationship between two entities.

Figure 10.2: Entity relationship model

16 Feeler project
Chapter 11

Week 10

11.1 Knowledge enhancement


• Research about technologies that is required to develop web application

• Prepare for final presentation of software part

• Started taking course of python programming

11.2 Evidence
11.2.1 Research about technologies that is required to develop web ap-
plication
I started to do research online that which technologies would be best fit to run the application
on web browser.There are some important things should be considered to choose the technologies.
First,the application will be used on Rasberry pi and web application is about to show the visual-
ization of mood and emotion data. After doing the all research online, there are some technologies
listed to design and implement the web application which is shown in below:

• Python is used to create data-model, class and mostly app logic.

• Flask, is a python web framework, which is lightweight to build simple web application.It is
used of both frontend and backend in development

• SQlite is a database engine to build relation database between entities.It is lightweight and
serverless which can easily run on simple Rasberry based projects.

11.2.2 Prepare for mid-term presentation of software part


There are some preparation I did to add my software part in the presentation. I added the concept
of software part how the both device will send the mood to each other via MQTT broker. Database
engine will collect the data from MQTT to send the data to the web server. The presentation
went well and I have learned the feedback from teacher and other students. This is expereinced
that how to sell or convince your products to the customer.

11.2.3 Python programming course


I started learn from Click here where it teaches the basic programming of python. I created project
where I started programming in python which is shown in below:

Feeler project 17
11.3. RESEARCH HOW LINE CHART WORK IN FLASK CHAPTER 11. WEEK 10

im po rt d a t e t i m e
c l a s s Emotion :
def init ( s e l f , id , emotion name ) :
s e l f . i d=i d
s e l f . emotion name=emotion name
## l i s t o f data , emotion ,

## c r e a t i n g t h e o b j e c t
e m o t i o n 1 =Emotion ( 1 , ’ sad ’ )

e m o t i o n 1 . i d =1
e m o t i o n 1 . emotion name= ’ sad ’
c u r r e n t t i m e=d a t e t i m e . d a t e t i m e . now ( )

p r i n t ( e m o t i o n 1 . emotion name )

Listing 11.1: (test) main.py

The 11.1 displays the result of sad where I created class of emotion entity and its attributes.

11.2.4 python functionalities

11.3 Research how line chart work in Flask


adding chart js explain how it works

18 Feeler project
Chapter 12

Week 11

12.1 Knowledge enhancement


• Designed software architecture in SDD document

• Update concept selection about software part in SDD document

• Started Research of SQLite tools and Flask

• Started Flask tutorial to develop the application

12.2 Evidence
12.2.1 Designed software architecture in SDD documents
I have created software architecture to visualize the mood data in web server in which can be found
in SDD documents-chapter:5 where it is explained how the architecture full works which shown
in below:

Figure 12.1: Software Architecture to collect the mood data in web app

This 12.1 explained the technologies that used in the application and how they communicate to
each other.

12.2.2 Update concept selection about software part in SDD document


I have added database engine in concept selection which can be found in SDD document:Chapter
3,Section 3.8 which is described about database engine choice which is SQLite and explained
why it chosen compare to other database design.

Feeler project 19
12.2. EVIDENCE CHAPTER 12. WEEK 11

12.2.3 Research on SQLite tools


I have installed SQLite database engine and SQLite DB browser tools to build communica-
tion system between database and web server which is more depth explained in MDD docu-
ment:Chapter 6, Backend Implementation,section 6.3.1. There are some proof has been
shown in below:
im po rt s q l i t e 3
conn=s q l i t e 3 . c o n n e c t ( ’D: / F e e l / emotion . db ’ )
p r i n t ( ” Data has been c r e a t e d ” )

QUERY=( ’ ’ ’CREATE TABLE IF NOT EXISTS EmotionType (


Emotion ID INTEGER PRIMARY KEY,
Emotion Name TEXT NOT NULL,
Strength INTEGER NOT NULL) ; ’ ’ ’ )
conn . e x e c u t e (QUERY)

QUERY=( ’ ’ ’CREATE TABLE IF NOT EXISTS EmotionData (


Unique ID INTEGER PRIMARY KEY,
timestamp DATE DEFAULT ( d a t e t i m e ( ’ now ’ , ’ l o c a l t i m e ’ ) ) NOT NULL,
EmotionID INTEGER NOT NULL,
FOREIGN KEY( EmotionID ) REFERENCES EmotionType ( Emotion ID )
); ’’’)

Listing 12.1: (test) main.py

12.1 I have connected the to the Sqlite database engine by using SQL programming to communicate
between database and web server.

12.2.4 Flask practice in web application


I have installed Flask in my IDE and created test project where I started to test flask application.
from e m a i l . p o l i c y i mpo rt d e f a u l t
im po rt s q l i t e 3
from f l a s k imp or t Flask , r e n d e r t e m p l a t e

app = F l a s k ( name )

@app . r o u t e ( ’ / ’ )
def test () :

r e t u r n r e n d e r t e m p l a t e ( ” graph . html ” )

if name == ’ m a i n ’:
app . run ( d e f a u l t==True )

Listing 12.2: (test) app.py

In figure 12.2, Flask is imported to run the web application in browser and rendered graph.html
file from template engine. The more explaination and code can be found in MDD docu-
ment:Chapter 6 Frontend implementation,section 6.3.8.

20 Feeler project
Chapter 13

Week 12

13.1 Knowledge enhancement


• Research about emotion and mood
• Research how Line chart works in Flask
• Add a class of mood and emotion in python programming

13.2 Evidence
13.2.1 Research about emotion and mood data
Based on client requirements,feel should be able to plot the mood and emotion on graph. According
to the requirements, I went through several articles to research about mood and emotion data
and how they corelate to each other. In addition, how to display the graph in web browser.In
addition,what kind of graph need to draw in order to plot the data. It was getting difficult to
understand how to display emotion time in graph and plot the data. There are one example I
found one graph online which give me some inspiration to draw the chart. which is shown in below:
In13.1, I have gathered the chart from click here to get overview idea to display the emotion and

Figure 13.1: Chart inspiration from internet

mood.From this graph, I have seen that y-axis display mood data and x-axis display timestamp

Feeler project 21
13.3. RESEARCH HOW LINE CHART WORKS IN FLASK CHAPTER 13. WEEK 12

and value shows the emotional state with activities. However, I was struggling how I can add plot
the data based on our value.As we are getting emotions from the sound of single person.

13.2.2 Add a class of mood and emotion in python programming


c l a s s Emotion :
def init ( s e l f , e m o t i o n i d : i n t , emotion : s t r , timestamp : s t r ) :
s e l f . emotion id = emotion id ,
s e l f . emotion name = emotion ,
s e l f . timestamp=timestamp

c l a s s Mood :
def init ( s e l f , mood id : i n t , e m o t i o n i d : i n t ) :
s e l f . mood id = mood id
s e l f . emotion id = emotion id

Listing 13.1: (Model) model.py

13.3 Research how line chart works in Flask

22 Feeler project
Chapter 14

Week 13

14.1 Knowledge enhancement


• Adding testplan in SDD
• Introducing with MDD documents
• Research about how python and flask works

• Started with MVC pattern

14.2 Evidence
14.2.1 Adding test plan in SDD
I have added software test plan in System Design Document(SDD) which can be found in SDD
document-Chapter 8-Test plan-section:8.1-T6,T7,T8. Also the evidence in available in
Github and Trello.

Figure 14.1: Trello plan

Feeler project 23
14.2. EVIDENCE CHAPTER 14. WEEK 13

14.2.2 Research about how Flask works in web server


As Flask is python framework, therefor, it is important to know how python and flask combined
and how they communicate.

14.2.3 MVC pattern added


14.2.4 Introducing MDD documents
After finalizing the SDD document, I was introduced with Module design document where every
module from software part will be described. In module design document MDD, I have added
software framework which is divided into two sections(Backend and Frontend) and maade several
section of this part which can be found in MDD document-chapter:7-software detailed
design.Evidence can be found in Github

24 Feeler project
Chapter 15

Week 14

15.1 Knowledge enhancement


• Finalized SDD document
• Adding javascript library to the flask framework
• Research about more how to convert to mood from emotion

15.2 Evidence
15.2.1 Finalized SDD document
In this week, I have finalized software part in SDD document which can be found in Github where
we send to the client for the final review of our document and get feedback.

15.2.2 Adding javascript to the flask framework

Feeler project 25
15.2. EVIDENCE CHAPTER 15. WEEK 14

15.2.3 Research more about how to convert mood from emotion


Brainstroming-on paper

(a) step 1 (b) step 2

(c) step 2 (d) step 2

Figure 15.1: Brainstroming: Collect emotion and mood in graph

26 Feeler project
Chapter 16

Week 15

16.1 Knowledge enhancement


• Able to display dummy line chart to the webserver
• Read emotion and timestamp from database
• Make a flowchart how to collect emotion and mood datae

16.2 Evidence
16.2.1 Able to display dummy line,bar and pie chart to the webserver
values = [
967.67 , 1190.89 , 1079.75 , 1349.19 ,
2328.91 , 2504.28 , 2873.83 , 4764.87 ,
4 3 4 9 . 2 9 , 6 4 5 8 . 3 0 , 9 9 0 7 , 16297
]

colors = [
”#F7464A” , ”#46BFBD” , ”#FDB45C” , ”#FEDCBA” ,
”#ABCDEF” , ”#DDDDDD” , ”#ABCABC” , ”#4169E1” ,
”#C71585 ” , ”#FF4500” , ”#FEDCBA” , ”#46BFBD” ]

@app . r o u t e ( ’ / t e s t 3 ’ )
d e f bar ( ) :
b a r l a b e l s=l a b e l s
b a r v a l u e s=v a l u e s
r e t u r n r e n d e r t e m p l a t e ( ’ b a r c h a r t . html ’ , t i t l e = ’ B i t c o i n Monthly P r i c e i n USD ’ ,
max=17000 , l a b e l s=b a r l a b e l s , v a l u e s=b a r v a l u e s )

@app . r o u t e ( ’ / l i n e ’ )
def l i n e () :
b a r l a b e l s=l a b e l s
b a r v a l u e s=v a l u e s
r e t u r n r e n d e r t e m p l a t e ( ’ l i n e c h a r t . html ’ , t i t l e = ’ B i t c o i n Monthly P r i c e i n USD ’ ,
max=17000 , l a b e l s=b a r l a b e l s , v a l u e s=b a r v a l u e s )

Listing 16.1: (test) list.py

Feeler project 27
16.2. EVIDENCE CHAPTER 16. WEEK 15

(a) Bar chart (b) Pie chart

Figure 16.1: Dummy bar and pie chart

16.2.2 Read the emotion and timestamp from database


d e f getTimeRange ( ) :
conn=s q l i t e 3 . c o n n e c t ( ’D: / t e s t 3 / emotion . db ’ )
c o n n e c t s q l= conn . c u r s o r ( )
t i m e l i s t=c o n n e c t s q l . e x e c u t e ( ” s e l e c t s t r f t i m e ( ’%H:%M: S ’ , timestamp ) from mood” )
. fetchall ()
r e s u l t =[x [ 0 ] f o r x i n t i m e l i s t ]
return r e s u l t

p r i n t ( getTimeRange ( ) )

def get emotion () :


conn=s q l i t e 3 . c o n n e c t ( ’D: / t e s t 3 / emotion . db ’ )
c= conn . c u r s o r ( )
t i m e l i s t=c . e x e c u t e ( ” s e l e c t name from mood” ) . f e t c h a l l ( )
r e s u l t =[x [ 0 ] f o r x i n t i m e l i s t ]
return r e s u l t

print ( get emotion () )

Listing 16.2: (test) graph.py

Figure 16.2: Printing time and emotion from graph.py file

28 Feeler project
CHAPTER 16. WEEK 15 16.2. EVIDENCE

16.2.3 Make a flowchart how to collect emotion and mood data

Figure 16.3: Flow chart

16.2.4 Summary
In summary from the fig 16.1 I was able to make dummy functionalities to draw bar and pie chart
in webserver by using Flask framework. I have send the values to the HTML file to read the data
from flask which is able send the data to client.In addition, I have build two functionalities where
it can read list of timestamp and emotion from database shown in fig 16.2. I made flowchart how
to convert emotion and mood from database to be able to display in line chart.

Feeler project 29
Chapter 17

Week 16

17.1 Knowledge enhancement


• Improved the flow chart from previous weeks
• Put the logic in C sharp programming to work.
• Research about how to get emotion via MQTT over the network

17.1.1 Improved the flow chart from previous weeks

Figure 17.1: Improved flow chart

In fig 17.1,I have improved the flow chart from the previous flow chart. More explanitation
can be found in MDD documents:chapter 7-section 7.2.3 and 7.2.4 where it explained how
to plot the line chart and what is the requirements for plotting chart.

17.2 Research about how to get emotion vi MQTT over the


network
I went through several research how can I log emotion data into my database. There are two ways
to get the emotion into the webserver:
• Connect database in MQTT client

• Adding HTTP request methods to collect emotion


I was familiar with first step how to log into data in database, however I was not familiar with
last step how to set up api to collect data from database.

30 Feeler project
Chapter 18

Week 17

18.1 Knowledge enhancement


• Improved Database design and class diagram

• Added new functionality to convert emotion string to numeric value

18.2 Evidence
18.2.1 Improved Database design and class diagram

(a) Database design (b) Section view from side

Figure 18.1: Database design and class diagram

In ??, I have improved database design and class diagram that I have to deal with two entities
to draw line chart. The more explained can be found in MDD document:Chapter 7, section
7.2.2

18.2.2 Added new functionalities to convert emotion string to numeric


value
def convert emotion int () :
my list =[]
emotion array = get emotion ()
print ( emotion array )
for x in emotion array:
i f x==” angry ” :
m y l i s t . append ( 1 )
e l i f x==” sad ” :
m y l i s t . append ( 3 )

Feeler project 31
18.2. EVIDENCE CHAPTER 18. WEEK 17

e l i f x==” n e u t r a l ” :
m y l i s t . append ( 2 )
e l i f x==” happy ” :
m y l i s t . append ( 1 )
return my list
print ( convert emotion int () )

In my previous weeks I am able to display X-axis, to display Y-axis it was difficult to work
only string value(’sad’,’angry’), where in line chart, it only expects numeric value such as (x,y)
(10:10,’2’). Therefor, I converted every emotion string value to int which is able to plot the data
in line chart.

32 Feeler project
Chapter 19

Week 18

19.1 Knowledge enhancement


• Draw the line chart with the functionalities
• Sending the data to the HTML to run the application
• Display the line chart on web server with X-axis timestamp.

19.2 Evidence
19.2.1 Draw the line chart with the functionalities
@app . r o u t e ( ’ / ’ )
d e f home ( ) :
”””
F u n c t i o n t h a t r e t u r n s a s t r i n g v a l u e d i s p l a y e d i n t h e page
Returns:
template
”””
t i m e r a n g e=g e t t i m e r a n g e ( )
e m o t i o n v a l u e=c o n v e r t e m o t i o n i n t ( )
average mood=avg mood ( )

r e t u r n r e n d e r t e m p l a t e ( ” i n d e x . html ” , x l a b e l s=t i m e r a n g e , y l a b e l s=e m o t i o n v a l u e


, avg mood=average mood )

Here, in flask framework, I have added functionalities to send the data to the HTML file to display
line chart in web server. More explanation can be found in MDD documents, section-7.3.8.

19.2.2 Sending the data to the HTML to run the application


< s c r i p t>
l e t myData = [ 1 , 2 , 3 , 4 ] ;
l e t lineChart ;
l e t data = {
l a b e l s : {{ x l a b e l s | t o j s o n } } ,
datasets: [
{
l a b e l : ”Mood o v e r time ” ,
d a t a : myData ,
// l a b e l s : {{ y l a b e l s | t o j s o n } } ,
b a c k g r o u n d C o l o r : [ ” rgba ( 0 , 0 , 0 , 0 . 2 ) ” ] ,
b o r d e r C o l o r : [ ” rgba ( 0 , 0 , 0 , 1 ) ” ] ,
tension: 0.4 ,

Feeler project 33
19.2. EVIDENCE CHAPTER 19. WEEK 18

},

From this figure,I have added x-labels and y-labels variables with javascript and in HTML file.

19.2.3 Display the line chart in Web server

Figure 19.1: Line chart first test

Here in Line chart, I am able to plot the data with X-axis and Y-axis, corresponding with (x,y)
values (14:10,2). More explanation can be found in MDD documents: chapter 7: frontend
interface

34 Feeler project
Chapter 20

Week 19

20.1 Knowledge enhancement


• Added functionalities with avg mood
• Re-design the interface of Line chart and added frontend implementation

20.2 Evidence
20.2.1 Added functionalities with avg mood
d e f avg mood ( ) :
”””
F u n c t i o n t o g e t a v e r a g e mood from g a t h e r e d e m o t i o n s i n t v a l u e
Returns:
my list:list
”””
t o t a l a r r a y=c o n v e r t e m o t i o n i n t ( )
g e t t o t a l =0
f o r i in range ( len ( t o t a l a r r a y ) ) :
g e t t o t a l=g e t t o t a l+t o t a l a r r a y [ i ]
avg = g e t t o t a l / ( l e n ( t o t a l a r r a y ) )
r e t u r n round ( avg )

p r i n t ( ” Average mood” , avg mood ( ) )

I have added functionalities where it is able to get the avg mood with calculated emotion through-
out the day.

Feeler project 35
20.2. EVIDENCE CHAPTER 20. WEEK 19

20.2.2 Re design the interface of Line chart

Figure 20.1: Final interface of Line chart

36 Feeler project
Chapter 21

Conclusions

In conclusions, I have worked in minor as a fullstack developer in software engineer. I was more
busy throughout the minor research,documents and development, while I got little time to write
personal blogs. It was a challenging project where I had to adjust with Mechanical and Electrical
Engineer, where it took me a lot of time to understand each other requirements. However, finally
I have developed my frontend and backend skills as a software engineer. In future I will expand
this knowledge of the next project. I have improved the following skills in this minor

• LaTeX
• Python
• Flask, HTML, javascript
• Data visualization

• Agile and Github


• Communication skills

Feeler project 37
Chapter 22

Appendix

22.1 Approved the file

Figure 22.1: Client Approved file in Github

38 Feeler project
CHAPTER 22. APPENDIX 22.1. APPROVED THE FILE

Figure 22.2: Test projects

Feeler project 39
22.1. APPROVED THE FILE CHAPTER 22. APPENDIX

Figure 22.3: Test projects

40 Feeler project
CHAPTER 22. APPENDIX 22.1. APPROVED THE FILE

Figure 22.4: Final project structure


Feeler project 41
References

42 Feeler project

You might also like