Skip to content

Basic Charting and Mapping

Ryan Brideau edited this page Jul 30, 2016 · 1 revision

Original Source: https://www.reddit.com/r/TheSilphRoad/comments/4v5cwt/pokelyzer_visualizations_tutorial_with_power_bi/

This guide covers how to use Pokelyzer data in Power BI, Microsoft's free data visualization tool. This tutorial assumes you have gotten Pokelyzer and the Pokemon Go Map up and running together.

I will take you through the steps needed to recreate the charts from the Tableau map guide.

  • First download and install Power BI.

  • Open up Power BI, in the greeting screen select Get Data.

  • Find the entry for PostgreSQL Database and select Connect.

You may be prompted to download some things required for PostgreSQL support, just follow the link provided by Power BI and install them.

  • In the server field, enter your PostgreSQL server IP/Port. If your running the PostgreSQL server locally just use:

localhost:[Port Number]

5432 is usually the default port but you can check in the pgAdmin III software.

  • In the Database field enter

pokemon_go

  • Select OK to continue.

  • For username enter:

pokemon_go_role

and enter your PostgreSQL password and select Connect.

  • Click OK when prompted about no encryption support.

  • In the newly opened Navigator interface select the checkboxes next to public.date_dimension, public.spotted_pokemon, and public.time_dimension. Select the Load button to continue.

  • After it loads the data you are now in the main interface of Power BI. You can see your data in the Fields tab and manipulate the visualization in the, you guessed it, Visualization tab.

  • For our first step we will add the Pokemon location data so we can see this stuff on a map! In the Fields tab, expand public spotted_pokemon. Select the checkboxes next to latitude_jittered and longitude_jittered. You should now be greeted with a map full of green circles, representing all the data you have collected.

  • For the next step, we will allow ourselves to sort by Pokemon species. In the Fields tab, expand public spotted_pokemon and drag the name entry into the Page Level Filter section under Filters in the Visualizations tab. You can now use any of the checkboxes to choose individual species for location analysis.

  • Next you will setup a bar graph for pokemon spottings by the hour. First click in any empty space in your work area. Under the visualizations tab, select the icon for the stacked bar chart.

  • With the stacked bar chart highlighted, in the Fields tab, expand public time_dimension and select the checkbox next to label_hh. Then, expand public spotted_pokemon and drag the encounter_id entry into the Value section in the Visualizations tab.

  • Your new chart should read "Count of encounter_id by label_hh" which is fancy for spotted per hour.

  • You can rename your table by selecting the brush icon under Visualizations and expanding the Title section. You can replace label_hh with any other label field in public time_dimension to see the data at smaller time intervals.

To see pokemon sightings by day/week/month number you will need to first change the type of the number type fields in public date_dimension into text type fields. First expand, in the Fields tab, expand public date_dimension and take note of which fields have a Σ symbol next to them. These are the fields you will need to change. In the toolbar, select Edit Queries. Select public.date_dimension and right click on each field you identified as having the Σ symbol and Change Type to Text. This can be used in the bar graph you setup earlier to break up your data by day/week/month as well as the hour of each day.

Hope this guide helps some fellow travelers out!