Lesson 1 of 0
In Progress

Lab 2 – Visualize Your Data

After the data sets have been prepared for analytical consumption, the next logical step is to visualize the data leveraging any commonly available data visualization tool like PowerBI. This lab will help the student understand the power of data visualizations and teach them techniques to enable it.

The students will start this lab by importing the data as prepared in the previous lab into PowerBI They will then work through the steps to visualize these data sets in various charts and graph widgets available in PowerBI They can also perform some pivoting and other quick analytical functions available in PowerBI The students will have a PowerBI dashboard that will help them visualize the data in its full glory. An introduction to PowerBI would also be provided (for those unfamiliar with Microsoft PowerBI)

Table of Content

Frequently Asked Questions

a. Copy and open below link in a new tab. https://www.microsoft.com/en-us/download/details.aspx?id=58494

b. Click on Download.

c. Select the appropriate EXE file as per your system and Click on Next.

d. Once the .exe file is downloaded successfully then open it and complete the installation by opening it.

On Get Data under Home Tab and there you can connect to multiple data source.

Selecting a visual you can see there is resize option on the border of visual, you can use that. Also for moving Visual from one place to another, you will see 3 dots after selection of visual, Click on that and drag your mouse by holding click continuously.

Select the visual. Then In Visualization pane 2nd Option is Format Your Visual Button. If you are not selected the visual then you will not able to see this button.

Like other tools you can use CTRL+Z for Undo

Make Sure to enable that option.

Settings> Options > Security> turn on Map and Filled Map Visuals Options. Please make sure data is loaded into map visual then you will able to see that Heat Map option under Format your Visual.

Objectives

This lab will introduce you to Power BI, a widely-used data visualization tool. We will be designing visuals that utilize the output dataset which we stored in the Azure SQL database in Lab-1.

We have Successfully Completed Lab1 with transformation of Data. In Lab2 We are going to create Power BI Report and Visuals.

Task-1:- Login to Power BI

  1. Open Power BI in your browser in incognito mode (Google Chrome preferred)

2. Enter Username which is provided to you and Click on Submit.

3. Enter Password and Click on Sign in.

4. You might see a prompt like the one pictured below, Click on Ask Later (Note- Whenever you find this prompt click on the Ask Later option)

Now you have successfully logged in to the Power BI service and have completed Task-1 for this lab.

Task 2- Creating Power BI Visuals & Report

Section A – Connecting to Dataset.

Once you logged in to Power BI service, click om My Workspace.

You will find one report,dataset and a pbix file for reference that we have created already.

Click on Safera Report.

A Report will open, let’s talk about that.

  1. We have added Year as a filter. Use this filter to see data according to Year.
  2. We have added a visual to show Incidents by Type. Click on each bar and see data according to selected type.

3. In this Visual We have added Date in Bewtween Filter. Use this Filter to see data according to selected date range.

4. This visual shows Count Of Incidents as KPI

5. Here we are showing number of Arrests among all Incidents. Click on any value and see data according to that.

  1. In this Visual We are showing Number of incidents by their location in Heat Map.
  1. Here we are talking about anomalies. look at the sudden spike in visual with some points, that point indicated the anomaly. Click on any point it will explain the anomalies.
  1. This is a Matrix Visual. Here we are showing the number of incidents by their location in a hierarchical manner. At the top level, there is Community Area, by expanding Community Area you will see Beat and under that, there is Block. If you will select any individual Block or beat the Heat Map is automatically drilled to that location.

There is another page in this report Block Level Summary. On this page, we are providing all information about incidents on the block level.

So Now Let’s create this report.

  1. Click on My Workspcae button in bottom left.
  2. Click on more options (three dots(…))

3. Click on Create Report.

A new page will load to create reports.

  1. Click on >> icon in the Filters pane to hide it; this will give us more space to create reports for better visual experience.
  2. Expand the Table CrimeWeatherMerged on the right of the screen to see all fields.

Section B – Report / Visual Creation

Data is loaded we are going to create a report.

  1. First we’ll add a title to the report.

    1. Click on Text box ( third option in Menu Bar)

    2. Add a title by typing into the text box Summary of incidents

  1. Select Title.
  2. Format Title and increase size of it and make the font Bold.

5. Adjust the position of text box, so Click and Hold three dots and move the visuals or resize visual at appropriate position.

6. Click Outside of text box to deselect visual.(Note : We will follow step 6 everytime before creating a new visual otherwise after selecting a visual, previous selected visual will converted to new selected visual type and may give error).

We have successfully added a title to the report.

  1. Our Next task is to create a Year Filter.

    1. Select Slicer from Visualization Pane.
    2. Drag Year Column into Field Section.
  1. Click on Format Your Visual
  2. Click Slicer Settings.
  3. Select Style as Tile from dropdown under Options.
  4. Resize and rearrange the Year Filter.

2. We have successfully created Year Slicer as a filter. Our Next step is to create a KPI to show the count of incidents.

  1. Select Card from Visualization Pane.
  2. Drag ID column into Field Section
  1. Click on Dropdown Of First Id in Field Section.
  2. Select Count instead of First.
  3. Rearrange this KPI at proper place on the page.

3. Create a treemap to show number of Arrest.

  1. Select Treemap from Visualization Pane.
  2. Drag Arrest Column into category Section.
  3. Drag Id column into Values Section

4. Click Format Your Visual.

5. Turn On Data Labels

4. Since we are creating a summary of incidents, we can rename this page to Summary.

  1. Double Click on Page name(Page1) to rename this.
  2. Rename Page1 to Summary

5. We are going to show the number of incidents by type.

  1. Select Stacked Bar Chart from Visualization Pane.
  2. Drag Primary Type into Y-Axis.
  3. Drag Id into X-Axis

4. Click Format Your Visual.

5. Turn On Data Labels

6. Let’s create a visual to show Count of Incidents in a map visual.

  1. Select Map from Visualization Pane.
  2. Drag Latitude Column into Latitude Field Section.
  3. Drag Longitude Column into Longitude Field Section
  4. Drag Id Column into Bubble Size Section

5. Click Format Your Visual.

6. Turn On Heat Map option at bottom.

7. Lets create a new visual which will show a count of incident according to date.

  1. Select Line chart visual option from the Visualization Pane.
  2. Drag Date Column into X-Axis.
  3. Drag Id Column into Y-Axis

4. Click on DropDown of Date Hierarchy in X-Axis.

5. Select Date instead of Date Hierarchy.

Note : In this visual you will see there is sudden spike that shows there could be some anomaly into data. Let’s investigate that.

  1. Click on Add Further Analysis To Your Visual.
  2. Scroll down and Turn On Find Anomalies

Note: You will see some highlighted points into the visual; those are potential anomalies. Click those points and see additional information. After analysing the data Click on the Close Button In the Anomaly Pane

8. We will create a Matrix to analyze data hierarchically.

  1. Select matrix visual from the Visualization Pane.
  2. Drag these fields (Community Area, Beat, Block, Primary Type) into the Rows Data field.
  3. Drag Id Column as Count in Values Data Field.
  1. Click on the down arrow of First ID in the Values Field Section.
  2. Select Count instead of First

Note: In the Matrix visual there is a + button that is visible under Comunity Area; Expand that Community Area, under that Beat is there and by expanding Beat there is Block.
We will add sparklines into matrix visual to understand data in better way.

  1. Click on Dropdown of Count of Id.
  2. Select Add a sparkline, a new pop up will open.
  1. Select ID in Y –Axis
  2. Select Count in Summarization
  3. Click on X-Axis Dropdown, Expand table and Select Date from list of fields.
  4. Click on Create.

    Note: Wait for load the spikes as visual into matrix.
  1. Click on Format your Visual.
  2. Scroll to the bottom and expand the Sparklines option.
  3. Under Sparkline scroll down and expand the Marker Option.
  4. Select Highest in that marker option.

9. We have successfully created Summary Report. Our next tak is to create Block Level Details report.

  1. Click on + icon beside of Summary Page at bottom left side of the page.
  2. Double click on page name (Page1) to rename it and type Block Level Details as the new page name

10. Create a filter on the basis of Arrest.

  1. Select Slicer from the Visualization Pane.
  2. Drag Arrest column into the Field section.

11. Let’s Create a date filter.

  1. Select Slicer from Visualization Pane.
  2. Drag Date Column into the field section.

12. Now create a table to show block level details.

  1. Select the Table option from the visualization pane.
  2. Add all required fields(Case Number,Primary Type, Description, Location Description, Arrest, Domestic) into that by dragging fields into the column option.
  3. Resize the table visual

13. Create a Card to show the Block Name.

  1. Select Card visual from the Visualization Pane.
  2. Drag the Block Field into the Fields section.
  3. Also drag the Block field into the Drill Through Option.
    Note: We are adding Step 3 because we will select a block from the Summary page and we’ll see the information about that block in this page by drilling into the Matrix visual.

14. We will add a bar chart visual to show Count of Incidents By Type.

  1. Select the Stacked Column Chart visual from the Visualization Pane.
  2. Drag the Primary Type into X-Axis.
  3. Drag the Id in Y-Axis
  1. Click on Format Your Visual
  2. Turn On Data Labels.
  3. Resize the visual and arrange it in a way that looks good

15. Let’s Create a KPI to show the count of incidents.

  1. Select Card from the Visualization Pane
  2. Drag the ID column into Fields, again it will show first ID
  1. Click on the dropdown of ID in the Field Section.
  2. Select Count from the list, it will show Count of incidents instead of First ID.

16. We will add one more visual to see count of incident by date.

  1. Select the Line Chart option from the Visualization Pane.
  2. Drag Date into the X-Axis.
  3. Drag ID into the Y-Axis
  1. Click on the DropDown of Date in the Field Section
  2. Select Date instead of Date Hierarchy.

17. Now Save this Report.

  1. Click on File.
  2. Click Save.
  1. Add the report name as incident Summary.
  2. Click on Save

We have completed our report creation. This is a reference page that shows what we have created.

Summary

Block Level Details

Let’s analyse the report.

  1. Go to the Summary Page
  2. Analyse incident by Location, Count, Area, Date.
  3. Expand the Matrix Visual by clicking on the + sign.
  4. Right Click on any block, Select the Drill Through option, and under that Click on Block level details.
  5. It will redirect to the Block Level Details page with only details of that block which you have drilled into as a parameter.

We have completed all steps for Lab2.

END OF LAB 2 - Visualize Your Data

Get In Touch