Gina Fang, Author at Perficient Blogs https://blogs.perficient.com/author/gfang/ Expert Digital Insights Thu, 03 May 2018 00:18:39 +0000 en-US hourly 1 https://blogs.perficient.com/files/favicon-194x194-1-150x150.png Gina Fang, Author at Perficient Blogs https://blogs.perficient.com/author/gfang/ 32 32 30508587 Visualize the Weather Data from Hive with PowerBI https://blogs.perficient.com/2017/08/22/visualize-the-weather-data-from-hive-with-powerbi/ https://blogs.perficient.com/2017/08/22/visualize-the-weather-data-from-hive-with-powerbi/#respond Tue, 22 Aug 2017 06:30:34 +0000 http://blogs.perficient.com/delivery/?p=8977

In this blog, I will be describing how to configure the PowerBI Desktop connection to Hive instantly on Hadoop and visualize Hive data using Microsoft Power BI. The Hive ODBC Driver, along with direct SQL and HiveSQL, is used to access the Apache Hadoop/Hive distributions. This enables the Business Intelligence (BI), analytics and reporting functions for the Hadoop/Hive data. The following shows the simple flow chart to show the relationship between Hive, PowerBI and the report.

Visualize the Weather Data from Hive with PowerBI

Configure PowerBI Desktop to Show Data from Hive

Hiveserver2 allows for a connection via standard ODBC. To do this, you will need to download and install the HiveODBC64.msi on the system.

Visualize the Weather Data from Hive with PowerBI

After the driver installs you will need to set up a System DSN. Open up the ODBC Data Source Administrator and click on the System DSN tab.

Visualize the Weather Data from Hive with PowerBI

The following screen shows the settings for my DSN:

Visualize the Weather Data from Hive with PowerBI

Visualize the Weather Data from Hive with PowerBI

Once successful, you can now open up PowerBI to choose the data source name that was configured previously. We can manually add our own SQL in SQL statement to load the weather data from the data source in PowerBI.

Visualize the Weather Data from Hive with PowerBI

Visualize the Weather Data from Hive with PowerBI

Visualize the Weather Data from Hive with PowerBI

Display Airport data in Power BI

Drag the field airport_name to slice and drop it onto the top of the slicer placeholder. Select the Map option in the Visualization pane. Add airport_name to the Location bucket in the Visualizations options to use a map visual. Then drag longitude to Longitude, drag latitude to Latitude. Save the report. Now the report looks like below in PowerBIVisualize the Weather Data from Hive with PowerBI

Display Weather Data in PowerBI

Drag the following objects to Slice:

Year

Month

airport_name

select line_chart in the Visualization pane. Add yearmoda to the Axis then drag wind_speed and wind_index to values.

select table in the Visualization pane and add the required columns to the value.

Save the report. The report looks like below in Power BI.

Visualize the Weather Data from Hive with PowerBI

]]>
https://blogs.perficient.com/2017/08/22/visualize-the-weather-data-from-hive-with-powerbi/feed/ 0 210951
How to Use R Visuals in Power BI https://blogs.perficient.com/2017/07/13/how-to-use-r-visuals-in-the-power-bi/ https://blogs.perficient.com/2017/07/13/how-to-use-r-visuals-in-the-power-bi/#respond Fri, 14 Jul 2017 01:58:30 +0000 http://blogs.perficient.com/delivery/?p=8554

With the evolution of cloud technology, more organizations are planning to move their BI platform to cloud such as Azure or AWS. In Azure, PowerBI is pretty straightforward and popular, and with Power BI Desktop, you can perform analytical and statistical analysis and create compelling visuals by integrating with R. You can host those R visualizations within the Power BI Desktop report.

 

1.What are R Visuals?

The Power BI service supports viewing and interacting with visuals created with R scripts. Visuals created with R scripts, commonly called R visuals, can present advanced data shaping and analytics such as forecasting, using the rich analytics and visualization power of R. The R programming language is among the most widely used programming languages by statisticians, data scientists, and business analysts. The R language has an open source community that offers over 7,000 add-on packages, as well as widely used R User Groups.

2.Two Steps to Create a Report with R Visuals

Step 1. Get Data

Start the Power BI Desktop. In the Get Data window, select Other -> R script.

How to Use R Visuals in Power BI

In the R script dialog that appears, Enter the R code to get the data.

How to Use R Visuals in Power BI

NOTE: You will need to install the R Gui program or Rstudio in PC in advance.

After connecting to R, you can select which table you want to use.

How to Use R Visuals in Power BI

Step 2. Create R Visualizations

After the data has been loaded into Power BI, select the R visual icon from the Visualizations pane. Power BI will create a placeholder on the canvas to host your R visual and then present an R script editor for you to use right on the canvas. As you add fields to the R visual, Power BI Desktop adds them to the R script editor pane.

How to Use R Visuals in Power BI

How to Use R Visuals in Power BI

Now you can write and execute the code freely in the R script editor

First, install ggplot2, ggthemes, corrplot in RGui

install.packages(“ggplot2”)

library(ggplot2)

install.packages(“corrplot “)

library(corrplot)

install.packages(“ggthemes”)

library(ggthemes)

How to Use R Visuals in Power BI

Then you can begin creating your R script to generate the visual. Once your script is complete, select Run and the result appears in the R visual visualization on the canvas.How to Use R Visuals in Power BI

]]>
https://blogs.perficient.com/2017/07/13/how-to-use-r-visuals-in-the-power-bi/feed/ 0 210931