How to interact with a REST API to generate notifications

Assignment Help Programming Languages
Reference no: EM132285559

Assignment -

Objective: The goal of this problem is to allow engineers to learn how to interact with a REST API to generate alarms /notifications (in this case, the problem will generate an email) to a platform. Also, this exercise also allows you to learn how to include an HTTP URL report within the notification (email or alarm) so the operator can understand the notification and take actions that provides notification. In addition, you will learn how extract/read the data from a postgres databases.

We will continue using the same EPA dataset we used before for our first problem to facilitate focus on the key learnings. This dataset has 332 probes which report Sulfate and Nitrate particulate measurements in the air (the unit of the measurement is not important, thus ignore). The clean data is hosted on a postgres database - read the section "Reading Data from Postgres database using R" to learn how to access the data.

Read before attempting the problem: Assume EPA announced that it had set the limits for sulfate and nitrate in the air as follows:

sulfate_thresh = 30

nitrate_thresh = 40

It has asked the developers to create an application that monitors the measurement files and report an alert to a central location when probes report sulfate and nitrate levels above the EPA specified thresholds.

Your job is to create an application that will generate an email notification through a REST API. The application will use an "Event Router" that will facilitate the creation of the email notification. The event router MUST receive a JSON document from your application using HTTP POST with a particular format shown below.

{

"email_addr":["your_email_address@"],

"event_id":"65",

"lcc_id":"list of probes exceeding EPA limit",

"node_id":"probe ID exceeding sulfate limit: [list of comma delimited probes] probe ID exceeding nitrate limit: [list of comma delimited probes]",

"opt_data":{

"field1":"Report url",

"field2":"insert URL of Shiny report "},

"site_id":"dummy"

}

REST API (Event Router): has developed an Event Router that provides a REST API to generate alarms & events to the operator (or emails) based on HTTP POST interactions. We will use this tool for this exercise.

Reading Data from Postgres database using R

When developing production application most of the time data will be hosted on a database. You should know how to access data from a database. In this exercise you will be retrieving the data from postgres database. You will be using "RPostgreSQL" package to access the database.

Problem - USE Shiny APP

Create the following 2 applications (Note you could write this in a single app if you like)

1. An R application which generates an email notification after processing all specdata files and provides a URL link with full reporting (output of the shiny app; 2nd application) for the operator

2. An R shiny app which provides full reporting for the specdata. This task will require you to create the shiny app which expose a URL on your local computer. This URL is the address to be included in the JSON document posted to the API. Below is a quick example of the Shiny App. Be creative in a way that you want to create the reporting. This is just an example.

a. HTML text at the beginning to show the probe ID which are exceeding EPA limits

b. Slider to select the probe ID

c. Which renders a reactive plot with trend of sulfate and nitrate over time - showing EPA threshold line.

Attachment:- Assignment File.rar

Reference no: EM132285559

Questions Cloud

Decision making are two benefits of effective communication : Stronger business relationships and stronger decision making are two benefits of effective communication.
Justify a change implementation plan for leading the change : Justify a change implementation plan for leading the change initiatives and helping the organization overcome any resistance to the changes.
Compare three common types of production processes : Two former surfers invented a material for surfboards that's lighter and stronger than anything manufacturers now use.
Define role of nurse in healthcare program implementation : What is the role of the nurse in healthcare program implementation? How does this role vary between design and implementation of healthcare programs? Can you.
How to interact with a REST API to generate notifications : The goal of this problem is to allow engineers to learn how to interact with a REST API to generate alarms /notifications to a platform
Important for use in making business decisions : Provide at least three relevant probabilities for the leader that will be important for use in making business decisions.
Politicians to set-up assistance for appalachia : In Chapter 14 of your textbook, Ronald Eller discusses the many initiatives by politicians to set-up assistance for Appalachia at both the state and federal
Decision-making and role of the organizational leader : Discuss the importance of decision-making and the role of the organizational leader.
What are the dimensions of team leadership : What is team leadership? What are and include examples of situations where it is frequently used? What are the dimensions of team leadership?

Reviews

len2285559

4/16/2019 11:36:06 PM

Need help with code for 2 problems; I understand some code will be missing due to privacy. Just use examples when needed. Looking for code structure of both problems. Need explanation of code. Using R studio., The event router MUST receive a JSON document from your application using HTTP POST with a particular format shown below. NOTE: Do not change the value of “event_id” as this is a key field for the event router to identify the JSON structure and generate the email accordingly. When developing production application most of the time data will be hosted on a database. You should know how to access data from a database.

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd