Read our blogs, tips and tutorials
Try our exercises or test your skills
Watch our tutorial videos or shorts
Take a self-paced course
Read our recent newsletters
License our courseware
Book expert consultancy
Buy our publications
Get help in using our site
546 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owl trainers only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
Software ==> | Power BI (160 exercises) |
Topic ==> | APIs (3 exercises) |
Level ==> | Average difficulty |
Subject ==> | Power BI training |
This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.
The aim of this exercise is to show a chart of street crime by category and status for your latitude and longitude:
Crime data for Leicester Square in London for February 2022
At the time of writing the figures are only accurate for England, Wales and Northern Ireland, and are only available up to and including February 2022. You can get more information on the API at the link included in the text file in the above folder.
Start by getting data from the API whose URL is included in the text file in the above folder. Apply transforms to tidy up the data to get something like this:
The first few of 29 crimes at the time of writing (the data may be updated, so your list may look different).
Create four parameters as follows:
Parameter | What it should hold |
---|---|
Latitude | The latitude of the location (set to 51.51081 as a default). |
Longitude | The longitude of the location (set to -0.13067 as a default). |
Year | The year of interest (set to 2022 as a default). |
Month | The month of interest as a two-digit number (02 as a default). |
Although these are all numerical values, you'll find it much easier to plug them into the data source formula if you make them text parameters.
Change the source of your query so that it refers to these parameters, and check it still returns the same data.
You should now have 4 parameters and a query (it may be best to add the parameters one by one to the expression for the query Source, since it's easy to get the syntax wrong).
If you right-click on any point in Google Maps you can see the latitude and longitude. Use this fact to change the location for your search to where you live (or work):
There are far less crimes (it turns out) near our office than in Leicester Square in London!
Apply your changes and load the data into Power BI Desktop. You can now create a chart to illustrate your data:
Theft crimes with no suspect dominated for this month and location, it seems.
Save your report as Taking the you-know-what, and close it down.
You can find other training resources for the subject of this exercise here:
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2024. All Rights Reserved.