Search by Address Proximity

805
3
06-28-2022 12:52 AM
Llewellyn
New Contributor II

We would like the ability for a user to enter a freeform address, and have the geocoded coordinate act as a filter for surrounding lat/long data points, wither within a fixed radius or top x closest points. 

This is currently achievable by steps:

  1. Searching for a street address
  2. Use the selection or drive time tool
  3. Manually select the center point

Given that we have a layer of lat/long points, and you have geocoded the address search input to a single lat/long, you should be able to use great-circle calculation to find the distance between those points. This should then make a selection/highlight those points.

Why this would be useful:

  • There is no out-the-box means in Power BI to geocode an address on the fly, so proximity workarounds require a predefined list of addresses
  • The map would automatically zoom to the most appropriate level so that nearby points are visible
  • Closest points are calculated instead of eyeballing
  • Power BI visuals on the page will respond via cross-visual filtering
3 Comments
by Anonymous User

This is an interesting idea and thank you for posting!

The address that someone enters in the free form search, are they ad hoc or are they usually the same locations? Eg the address is always a store and the XY you are filtering are customers.

Llewellyn

The address would be something ad-hoc - something like a new prospective location and the user is looking for data points of interest in that neighborhood (the data they do have). I think they would typically search for an address on the fly rather than loading it into a system first and then selecting it from a layer.

Llewellyn

I've started building this one using a Power BI custom visual. It's a simple React UI with drop downs powered by the ArcGIS geocoding REST APIs. I used the suggest API to get address completion as you type and the findAddressCandidate API to resolve that to coordinates. The visual would then read a table from the data view, apply a haversine function and set a selection to a list of matching values.

Llewellyn_0-1665492540280.png

Challenge is there's no data point representing the search location, so no way to "pin" this on the map