0% found this document useful (0 votes)
21 views

ApproachtoRapidDevelopmentofData-DrivenApplicationsforSmartCitiesusingAppSheetandAppsScript

Uploaded by

Aishah Aman
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

ApproachtoRapidDevelopmentofData-DrivenApplicationsforSmartCitiesusingAppSheetandAppsScript

Uploaded by

Aishah Aman
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/344572555

Approach to Rapid Development of Data-Driven Applications for Smart Cities


using AppSheet and Apps Script

Conference Paper · October 2020

CITATIONS READS

15 4,560

4 authors, including:

Nenad Petrovic Valentina Nejkovic


University of Niš University of Niš
180 PUBLICATIONS 1,047 CITATIONS 57 PUBLICATIONS 254 CITATIONS

SEE PROFILE SEE PROFILE

All content following this page was uploaded by Nenad Petrovic on 16 October 2020.

The user has requested enhancement of the downloaded file.


Approach to Rapid Development of Data-Driven
Applications for Smart Cities using AppSheet and
Apps Script

Nenad Petrović*, Vasja Roblek**, Maša Radenković* and Valentina Nejković*


*University
of Nis, Faculty of Electronic Engineering, Aleksandra Medvedeva 14, 18000 Nis, Serbia
**Faculty
of Organisation Studies in Novo mesto, Ulica Talcev 3, 8000 Novo mesto, Slovenia
[email protected], [email protected], [email protected], [email protected]

Abstract - In this paper, we propose an approach to rapid The digital components enable the development of
development and delivery of smart city mobile applications smart data platforms, which represent an intelligent urban
based on synergy of AppSheet and Google Apps Script. Two brain and also affect the emergence of a city as a cyber-
case studies are presented: smart home energy management physical social system [8]. The smart data platform
application and COVID-19 patient risk assessment. (various European cities such as Amsterdam,
According to the achieved results, this approach enables Copenhagen, Munich and Vienna implement a smart data
many possibilities and significantly reduces required time. platform) is defined as an open, secure and city-wide
platform. The platform is organized as a system for
I. INTRODUCTION collecting, processing, analyzing, interpreting, storing and
distributing the collected urban data on mobility, energy,
Lately, everything is intelligent: house, appliances, urban life and masses. The task of the platform is to
cars and even cities. Well, cities are supposed to be that convert the raw data into value-added information. In this
way. If not before, then soon. However, what is a smart way, it ensures better urban planning and quality of life in
city? Officially, no definition of the term can be found urban areas. It is expected that the development will soon
when a city is involved. The smart city is a buzzword that have an impact on the establishment of an autonomous
emerged in the early 1990s and the early years of the 21st administration, and data analysis will be based on artificial
century and was considered a phenomenon of "urban intelligence. The key goal, of course, is to inform citizens
labelling" [1]. According to McNeill [2] and Yigitcanlar [9,10].
[3], theory and practice about intelligent cities are still in
development. The theory of intelligent cities is divided Data-driven mobile applications play an essential role
into two directions. The first focuses on the development in the information and exchange of different types of data
of environmental technologies (e.g. energy efficiency and and the quality of the urban population. The development
lower carbon emissions). The second direction focuses on of mobile devices applications (app) in 2010, when the
the emergence of a digital urban infrastructure that enables first provider's Apple (Apple App Store) and Google
the transformation of the classical city into the ecosystem (Google Play) came onto the market, led to the emergence
of the smart city, which is composed of complex systems of the so-called app or platform economy, which
with various interactions and dependencies [4]. represents the sum of all economic activities, products and
services such as car-sharing, automated driving, public on-
Moustaka, Maitis, Vakali and Anthopoulos [5] offer a call transportation, co-travel, energy, eHealth, mobility,
sophisticated mechanism that allows us to become waste, public safety, water management and others
familiar with the D.N.A. of the smart city. A smart city through applications to users of mobile phones and other
can be imagined as a molecular conglomerate in which smart devices [11-13].
human, environmental and socio-economic factors, often
unintentionally, interact with each other to produce Different organizations have needs for development of
technological solutions. In this context, smart cities corresponding mobile applications in order to cover
development strategies focus on introducing innovative aspects of their interests within the targeted domain.
technological solutions, such as the Internet of Things However, the development of native mobile applications,
(IoT), Internet of Services (IoS), artificial intelligence due to variability of mobile hardware and operating
technologies, blockchain technologies, new sustainable systems can be quite expensive and time-consuming, as it
materials, introducing new economic models (sharing requires high programming skill and expertise. Despite the
economy, cyclical economies), as well as the development emerging popularity and adoption of cross-platform
of smart processes (e-mobility, e-health, e-government, e- mobile application development tools and environments
education, e-social inclusion) that lead to the continuous (such as Xamarin and Flutter), they still require significant
development and semantic characteristics of the smart city amount of time.
[6,7]. In this paper, we present an approach to rapid data-
driven development of smart city mobile applications
relying on AppSheet and Apps Script technologies, based Google Sheets for generation of light vehicle diagnostic
on data stored within spreadsheets. The goal is to speed- reports sent to the owner’s email. A similar approach was
up the development and delivery of smart city mobile used in [20] for real-time environmental data logging
applications, even by other domain experts, apart from using Apps Script with Google Sheets.
software developers. Unlike state-of-the-art cross platform
frameworks, it requires almost no coding, while it In this paper, we leverage Apps Script capabilities
provides more advanced user interfaces, data visualization related to Google Sheets that are further used by AppSheet
and AI-enabled capabilities without knowledge of for smart city mobile application development. More
additional frameworks or software packages at the same accurately, the triggers for Google Sheets are written,
time. which are activated when certain types of events occur –
such as data insertion or update, as shown in Fig. 1.
II. BACKGROUND AND RELATED WORK
1 AppSheet 2 4 Apps Script
A. AppSheet
Google Sheets
AppSheet [14] is an online platform acquired by Smartphone3
Google in 2020, which enables easy creation and
distribution of mobile, tablet and web applications starting Users
from cloud data sources, such as spreadsheets and 5

databases without any coding. It mainly targets business


use cases, such as CRM, project management and
personalized reports. AppSheet analyzes the structure of Figure 1. AppSheet and Apps Script synergy for data-driven mobile
provided data sources and automatically generates the applications: 1-Spreadsheet data 2-Generated mobile app based on
spreadsheet data 3-User input 4-Trigger activation 5-Spreadsheet
views that can be shown within the application. The users updates on triggers
are able to customize the generated views by showing or
hiding particular columns or write formulas for data
processing and aggregation. AppSheet is free for III. CASE STUDIES
prototyping and personal use, while monthly fee has to be
paid for commercial applications. Moreover, AppSheet A. Smart Home Energy Management
offers advanced machine learning and AI features such as The aim of this mobile application is to enable easy
value prediction, optical character recognition (OCR), and convenient household consumer device monitoring
sentiment analysis and anomaly detection. However, and energy management, targeting the so-called smart grid
active internet connection and client app are required in prosumers (which both produce and consume energy).
order to access AppSheet applications and their features, This case study builds upon the works presented in [21-
as they are deployed in cloud. 23], denoted as energy management framework (E-M). In
AppSheet-based mobile applications have been Fig. 2, overview of the smart home energy management
approved as effective solution across many fields. For application is given.
example, in [15], it was used for health facility survey
mobile application, while [16] presents waste monitoring
Energy 10
and management use case. Apps Script 9 management Energy trading
framework 11

B. Google Apps Script


Smart meters 1 7 Consumer control
Google Apps Script [17] is a cloud platform for rapid
4
application development that enables easy integration with 3
2
G Suite (Gmail, Google Docs, Google Forms, Google AppSheet
Weather service Google Sheet6 5
Sheets, Google Drive and others). Apps Script relies on
Energy
JavaScript language with built-in libraries for G Suite. management app
Google provides editor run in web browser, while the
scripts themselves are run on Google’s servers. Apps Figure 2. Smart home energy management mobile app: 1-Apps Script
trigger for data acquisition 2-Weather and consumption data 3-Collected
Script can be used for adding custom menus, dialogs, and
data 4-Visualization 5-User input 6-Deal propositions and turn on/off
sidebars to Google Docs, Sheets and Forms. Apart from commands 7-Apps Script trigger activation 8-Calling energy
that, the extensions and add-ons for these services can be management framework on the backend 9-Smart contract 10-Household
also developed. Moreover, it is possible to perform device control
interaction and coordination of various services (such as
AdSense and Maps). Apps Script makes it easy to develop First, the energy consumption values are collected by
and deliver add-ons for G Suite to large numbers of users, IoT devices which act as smart meters [21] and inserted
whether publicly, worldwide or group of private users. into spreadsheet. The collected measurements are further
forwarded to the AppSheet’s prediction module in order to
There are many interesting existing Apps Script use make load forecast within the household, based on energy
cases presented in the existing scientific publications. In consumption history.
[18], Apps Script was used for digital literacy student
assessment tasks implemented inside Google Docs. Both the collected measurements and prediction
Furthermore, in [19], it was used with Android app and results are used to render views shown to the users of the
mobile application, providing them overview of current
consumption monitoring and future predictions. Apart B. COVID-19 Patient Risk Assessment
from collected electric measurements, weather data This application enables quick COVID-19 (potential)
(temperature and rainfall) is retrieved from online service patient risk assessment based on user-provided health state
in order to provide more accurate predictions [21]. information (such as body temperature, symptoms,
Moreover, there is also an option within monitoring screen chronic diseases). The application relies on semantic
to turn off the consumer device remotely. For that task, fuzzy reasoning framework (S-F) from [24] for patient
Arduino Uno equipped with actuator devices (such as risk assessment which collects textual data about COVID-
relay) are used, as described in [23]. In Fig. 3, the 19 from publicly available online scientific publications
screenshots of AppSheet mobile application taken on iOS and transforms them into facts stored within the semantic
devices are given. knowledge base. In Fig. 4, an overview of the second case
study application is given.

Apps Script 4 5

COVID-19
Semantic fuzzy publications
7 3 reasoning framework
9
8
AppSheet
Google Sheet2 1

COVID-19
assessment app
Figure 3. Consumer device monitoring and management: (a) device
list (b) consumption prediction (c) trading offers Figure 4. COVID-19 patient assessment app: 1-Health state,
symptoms and medication information 2-Spreadsheet update 3-Apps
Script trigger 4-Calling assessment framework 5-Retrieveing
Periodically, the script is sending the consumption coronavirus-related literature 6-Assessment results 7-Spreasheet update
data and predictions to the energy management framework as trigger 8-AppSheet application update 9-Result visualization
backend. In the background, it performs linear
optimization process with respect to program from [21] In Fig. 5, the two screenshots of the application taken
and generates recommendations – either to perform on iOS devices are given.
energy buying and selling. Following the
recommendations, the app users can make deal
propositions in order to buy or sell energy at a given price
range. For energy trading, the blockchain-based
transactions are executed relying on [21] and verified
using [22]. In this step, the App Script code is responsible
for passing the parameters necessary for smart contract
generation, to the energy management framework, using
the deal propositions parameters stored within
spreadsheets. In Listing 1, the described energy trading
process is given as pseudocode.
Input: energy needed, user id
Output: energy transaction
Steps:
1. AppSheet: consumption:=PredictConsumption(user id);
2. Apps Script Trigger: energy needed=consumption-available;
3. Apps Script Trigger: Send(energy needed, user id, to: E-M);
4. E-M: trader_list:=Optimization(energy needed, user id);
5. Apps Script Trigger: Receive(trader_list, from: E-M); Figure 5. Consumer device monitoring and management: (a) device
6. Apps Script Trigger: UpdateGoogleSheet(trader_list, user id); list (b) consumption prediction (c) trading offers
7. AppSheet: UpdateView();
8. User: trader:=Take trader from list; In what follows, the patient assessment procedure is
9. Apps Script Trigger: SendOffer(trader);
10. Trader: Accept or reject deal offer;
described. First, the patient enters the information about
11. Apps Script Trigger: if(accept) then symptoms (such as fever, cough) and general health
12. E-M: ExecuteTransaction(trader, energy needed); information (chronic diseases, age). Once the information
13. Endif; is provided, the Apps Script Trigger is activated upon data
14. End. insertion into Google Sheet table. It forwards the symptom
list and health state data to the semantic-fuzzy (S-F)
Listing 1. Energy trading leveraging mobile app and Apps Script
trigger for coordination with energy trading framework module, which then constructs semantic knowledge base
containing the facts about the patient’s symptoms and
health state leveraging public online literature. After that, significantly faster than native and cross-platform apps.
the reasoning is performed by matching the health state Moreover, smart home management occupies more RAM
and symptoms with assessment, such as “high risk”, “the than the COVID-19 assessment application, as it includes
patient should visit doctor” or “request a COVID-19 test”. more advanced data visualization capabilities and
Once the results become available, they are sent back to leverages value prediction. Furthermore, the consumption
the Apps Script Trigger which updates the Google Sheet prediction model in the first case study achieved accuracy
shown to the user after rendering by AppSheet. In Table 3, around 89% for day-ahead forecast, which is just slightly
the pseudocode of the underlying patient assessment worse than [21]. However, setting up the prediction
mechanism is given. module in this paper relied on easy-to-use AppSheet’s
user interface taking just several minutes, while in [21], a
In Listing 2, the pseudocode of the underlying patient custom deep learning module based on TensorFlow in
assessment mechanism is given. Python was developed, which required much more effort
and time.
Input: symptom list
Output: state assessment
Steps: TABLE I. EVALUATION RESULTS
1. User: Provide health state input;
2. Apps Script Trigger: Send(symptom list, to: S-F)
3. S-F: Aspect Value
publications:=GetPublicationsForKeyword(symptom_list); Case A Case B
4. S-F: knowledge_base:=ExtractKnowledge(publications);
5. S-F: assessment:=Reasoning(symptom list, knowledge_base); Development 12 times 8 times
6. Apps Script Trigger: Receive(assessment, from: S-F); speed-up [times]
7. Apps Script Trigger: UpdateGoogleSheet(assessment); Device type iPhone 6s Honor 9
8. App Sheet: UpdateView();
9. End.
Plus Lite
Delivery time [s] 4.36 3.59
Listing 2. Automated patient assessment algorithm leveraging Apps Client app size [MB] iOS Android
Script and semantic knowledge base
.ipa:59 .apk:13
total:96 total:77
IV. EVALUATION AND RESULTS
RAM utilization 258 163
For purpose of evaluation the following devices were [MB]
used: a laptop equipped with Intel i7 7700-HQ quad-core Prediction 89% Not
CPU running at 2.80GHz with 16GB of DDR4 RAM and accuracy [%] applied
1TB HDD acting as Edge server deploying the external
services (energy management and semantic-fuzzy), Service response [s] 2.51 4.91
iPhone 6s Plus (dual-core, 2GB of RAM) as representative (cold
of iOS smartphones and Honor 9 Lite (octa-core, 3GB of start: 414)
RAM) which belongs to Android smartphones. As active
internet connection was required to run the apps, 4G V. CONCLUSION AND FUTURE WORK
network with 50Mbps download/upload speed was used. The proposed approach of data-driven smart city
Several aspects of evaluation were taken into account: mobile applications seems promising, as it enables domain
application development time speed-up (compared to experts to create mobile applications for their needs,
equivalent cross-platform application development time), without advanced programming knowledge. In our case
application delivery time (how much time is needed to studies, it accelerates the development and delivery of
deliver the modified application without re-installing), mobile applications significantly - around 12 times for the
storage required for AppSheet client (installation package first case study, while it was around 8 for the second
and installed app), RAM memory utilization and average (compared to Xamarin cross-platform framework, which
prediction accuracy of AppSheet’s predictor in case of still requires solid programing skill). Furthermore, the
energy demand prediction. When it comes to capabilities consumption prediction model in the first case study
relying on Apps Script and external services, the overall achieved satisfiable accuracy. The applications were run
response time for energy trading (Case study A) and successfully on both Android (Redmi Note 7, Honor 9
semantic knowledge base construction (Case study B). In Lite) and iOS devices (iPhone 6s Plus and SE).
Table I, the results achieved during the evaluation are In future, it is planned to adopt the same approach on
given. mobile applications for energy-aware fog, cloud and
According to the achieved results, the proposed hybrid cloud computing infrastructure management
approach of mobile application generation using scenarios, building upon the work from [25].
AppSheet taking Google Sheet as an input significantly
speeds up the mobile application development compared ACKNOWLEDGMENT
to cross-platform solutions. For comparison, equivalent This work has been supported by the Ministry of
Xamarin apps were developed. Considering the delivery Education, Science and Technological Development of the
time, it was shorter in case of Android device, as it is Republic of Serbia.
equipped with more powerful CPU and larger RAM, but
AppSheet client is larger in case of iOS, but still
REFERENCES [14] Google Apps Script [online]. Available on:
https://developers.google.com/apps-script, last accessed:
[1] N. Komninos, "Intelligent cities: Variable geometries of spatial 23/09/2020.
intelligence," Int. Build. Inter., vol.3, no. 3, pp. 172-188, 2011.
[15] P. Sylim, C. C. Santos-Acuin, "Development of a Low-Cost
[2] D. McNeill, "Global firms and smart technologies: I.B.M. and the Electronic Data Collection Tool for a Health Facility Survey:
reduction of cities," Trans. of the Inst. of Brit. Geograph., vol 40, Lessons Learned in the Field", Journal of the International Society
no. 4, pp. 562-574, 2015. for Telemedicine and EHealth, 4, e27, pp. 1-8, 2016.
[3] T. Yigitcanlar, "Smart cities: an effective urban development and [16] S. K. Arumugam, R. Muhamad, K. Yahya, "Mapping of
management model?", Aust. Plan., vol. 52, no. 1, pp. 27-34, 2015. construction waste for eco-costs per value ratio (EVR) index using
[4] V. Roblek, "The smart city of Vienna", in Smart City Emergence: Google My Maps in Shah Alam, Malaysia", ICONBUILD &
Cases from Around the World, Amsterdam, NL: Elsevier, 2019, 5, RCCE 2019, pp. 1-9, 2019. https://doi.org/10.1088/1757-
pp. 105-127. 899X/849/1/012046
[5] V. Moustaka, A. Maitis, A. Vakaland, & G. L. Anthopoulos, L. G. [17] AppSheet [online]. Available on: https://www.appsheet.com/, last
"CityDNA Dynamics: A Model for Smart City Maturity and accessed: 23/09/2020.
Performance Benchmarking," Companion Proceedings of the Web [18] L. Siiman, M. Mäeots, "Assessing Students’ Digital Literacy with
Conference 2020, Taipei, Taiwan, pp. 829-833, April, 2020. Interactive Computer-Based Tasks Created in Google Apps
[6] H. Han, & S. Hawken, "Introduction: Innovation and identity in Script", EDULEARN ’19, pp. 10265-10271, 2019.
next-generation smart cities," City, Cult. and Soc., vol. 12, pp.1-4, https://doi.org/10.21125/edulearn.2019.2578
2018. [19] P. Rajput, R. Parkeh, "On-Board Diagnostics based remote
[7] M.S., Sepasgozar, S. Hawken, S. Sargolzaei, & M. Foroozanfa, emission test for Light Motor Vehicles", CONECCT 2020, pp. 1-
"Implementing citizen centric technology in developing smart 6, 2020.
cities: A model for predicting the acceptance of urban [20] T. DeBell et al., "OPEnS Hub: Real-Time Data Logging,
technologies", Tech. For. and Soc. Ch., vol. 142, pp.105-116, Connecting Field Sensors to Google Sheets", Frontiers in Earth
2019. Science, May 2019 volume 7, pp. 1-6, 2019.
[8] G.C. Cassandras, "Smart cities as cyber-physical social systems," [21] N. Petrović, Đ. Kocić, "Data-driven Framework for Energy-
Eng., vol. 2, no. 2, pp. 156-158, 2016. Efficient Smart Cities", Serbian Journal of Electrical Engineering,
[9] I. Cordón, J. Luengo, S. García, F. Herrera, & F. Charte, Vol. 17, No. 1, Feb. 2020, pp. 41-63.
“Smartdata: Data preprocessing to achieve smart data in r,” https://doi.org/10.2298/SJEE2001041P
Neurocomp., Vol. 360, pp. 1-13, 2019. [22] N. Petrović, M. Tošić, "Semantic Approach to Smart Contract
[10] V. Roblek, & M. Meško, "Smart city knowledge management: Verification", Facta Universitatis Series Automatic Control and
Holistic review and the analysis of the urban knowledge Robotics 19(1), pp. 21-37, 2020.
management," The 21st Annual International Conference on https://doi.org/10.22190/FUACR2001021P
Digital Government Research, Seoul, South Korea, pp. 52-60, [23] N. Petrović, Đ. Kocić, "Sistem za relejnu zaštitu zasnovan na
June, 2020. Arduino Uno u okviru podacima-vođene arhitekture pametne
[11] M. Kenney, & J. Zysman, "The platform economy: restructuring mreže", IEEESTEC – 12th Student Projects Conference, pp. 331-
the space of capitalist accumulation," Camb. J. of Reg., Econ. and 334, 2019.
Soc., vol. 13, no. 1, March, 2020. [24] N. Petrović, "Tackling the COVID-19 Conspiracies: The Data-
[12] C. Troise, E. Ferrara, M. Tani, & O. Papaluca, "Perspectives of the Driven Approach", ICEST 2020, pp. 1-4, 2020.
App Economy: Tenets of the Innovative Phenomenon," Int. Bus. [25] N. Petrovic, M. Tosic, "SMADA-Fog: Semantic model driven
Res., vol. 13, no. 3, pp. 1-14, 2020. approach to deployment and adaptivity in Fog Computing",
[13] V. Roblek, V. Dimovski, & M. Meško, "The complexity of the Simulation Modelling Practice and Theory, 102033, pp. 1-25,
Age Management in the Framework of Smart Urban 2019. https://doi.org/10.1016/j.simpat.2019.102033
Environment," 3rd American University in the Emirates
International Research Confer-ence, Dubai, U.A.E., pp.1-9,
August, 2020.

View publication stats

You might also like