Description Usage Arguments Value Examples
View source: R/geo_utilities.R
Returns visits and dwell time in each polygon. Note that the name of the IDFA column must be 'aid'
1 2 3 4 5 6 7 8 9 10 11 | create_sql_visits_query(
places_table_name,
ds_from,
ds_to,
location_table_name = "emr.dataset_accumulo",
places_id_column_name = "id",
places_wkt_column_name = "wkt",
destination_table = NULL,
places_options = "",
aid_options = ""
)
|
places_table_name |
the table with the polygons |
ds_from |
the day date for which we are retrieving the visits (for 1 day can be the same as ds_to) |
ds_to |
the day date for which we are retrieving the visits (for 1 day can be the same as ds_from) |
location_table_name |
the table that stores the ping (defaults emr.dataset_accumulo) (hardcoded columns lon, lat) |
places_id_column_name |
the name of the column containing the ID of the place (defaults to id) |
places_wkt_column_name |
the column containing the polygon in WKT format (defaults to wkt) |
destination_table |
a destination table for the INSERT, leave default NULL if you want to fetch the rows |
places_options |
can be a clause like WHERE places.bt_level4 = 'Q8' |
aid_options |
can be a clause like 'AND aid in = (SELECT aid from test.audience_table)'. Should contain AND because it's placed after the select |
the SQL query for the visits
1 | create_sql_visits_query("R.mcdonalds_eevm_places", '2019-10-04', '2019-10-27')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.