Current Weather Dashboard App using R.

Hello, everybody. In this post, I created a city-based weather monitoring application. This is a simple application for monitoring the weather in an area / city which is very easy for people to understand. I got this data from the Open Weather API. The library that I use to build this application is as follows.

flexdashboard, tidyverse, glue, httr, jsonlite, leaflet, shiny

Photo by Osman Rana on Unsplash


Some of the features on this dashboard are as follows.

  • Value Box, displays the important values that are the main highlights.
  • Map, displays the position (coordinate) of the area / city that is the main highlight.
  • Key Statistic, displays parameters about conditions of temperature, humidity, and so on.
  • Text Input, an interactive feature if you want to display different regions / cities, just change it in the text input section.
Screenshot of Main Page.

Stages to Build.

  • Yaml flexdasboar parameter and layout. Before preparing the data, I need to create a Yaml Header and Dashboard Layout.
  • Data preparation. Previously you had to register to get an api key and understand the documentation of the api. In this context I am using current weather. Here I can get current weather for any location on Earth including over 200,000 cities and collect data in JSON. After getting the JSON file then parsing it into frame data in R.
Example for Surabaya Curent Weather in JSON.
  • Create maps, value boxes and so on. After the data is ready, it’s time to create a map, value box, text input, table and render it.

Full view RMarkdown (Flexdashboar file).

Full view file RMarkdown (Flexdashboard).

Thank You.

Amri Rohman.
Sidoarjo, East Java, ID.