QUADRANT DATA OVERVIEW
Note, before being able to use the queries discussed below, you will need to set-up an AWS Athena database, table and partitions. For this, please refer to our Creating a Database, Table and Partitions in Athena page. Additionally, for an overview of the terms used below, please refer to the data dictionary provided.
Horizontal accuracy is the measure of GPS accuracy, expressed in meters, as reported by the device operation system.
Horizontal Accuracy is a radius around a 2-dimensional point, implying that the true location of the data point is somewhere within the circle formed by the given point as a center and the accuracy as a radius. Therefore, in the example below, the exact location of the device will be anywhere within the orange shaded circle.
GPS accuracy on a mobile device is not solely depends on the GPS sensor itself, there are a lot of factors like network signal, nearby cell towers, nearby Wi-Fi, onboard sensors, inertial navigation from the accelerometer, gyroscope and compass. All of these factors have an impact on the recorded horizontal accuracy.
It is important to understand horizontal accuracy, as different use cases require different levels of accuracy readings. For example, heatmaps and analysis of mobility at city-levels can generally be done accurately with higher levels of horizontal accuracy, while retail analysis on typically small venues such as restaurants and shops, require smaller and more precise levels of horizontal accuracy.
Below, we present the codes to extract the Average Horizontal Accuracy of your data:
/* AVERAGE HORIZONTAL ACCURACY */
SELECT AVG(horizontal_accuracy) as avg_horizontal_accuracy
WHERE (month = 2 AND year = 2020) AND (try_cast(horizontal_accuracy as varchar)<>'');
Below, we present the codes to extract the Number of Events by Brackets of Average Horizontal Accuracy of your data (0 - 10m, 10 - 20m, 20 - 50m, 50 - 100m, and 100 - 200m):
/* NUMBER OF EVENTS BY BRACKETS ON AVERAGE HORIZONTAL ACCURACY */
SELECT kv['0 - 10'] AS lt_10, kv['10 - 20'] AS betw_10_20, kv['20 - 50'] AS betw_20_50, kv['50 - 100'] AS betw_50_100, kv['100 - 200'] AS betw_100_200
(SELECT map_agg(HorRange, cnt) kv
(SELECT case when horizontal_accuracy >= 0 and horizontal_accuracy <= 10 then '0 - 10'
when horizontal_accuracy > 10 and horizontal_accuracy <= 20 then '10 - 20'
when horizontal_accuracy > 20 and horizontal_accuracy <= 50 then '20 - 50'
when horizontal_accuracy > 50 and horizontal_accuracy <= 100 then '50 - 100'
when horizontal_accuracy > 100 and horizontal_accuracy <= 500 then '100 - 200'
else 'over 5k' end HorRange, count(*) as cnt
WHERE (month = 2 AND year = 2020) AND (try_cast(horizontal_accuracy as varchar)<>'')
GROUP BY 1)
We hope the the information on this page equips you with the right tools to conduct a thorough data evaluation. If you are looking for a reliable location data feed, Quadrant has GPS location data derived from location SDKs.