Mapbox macros for Alteryx
Drag and drop the entire world
What does this solution do?
Alteryx is an end-to-end data analytics platform that enables users to discover, prep, and analyze data of any scale. Location intelligence is a core capability of the Alteryx platform, however getting live location data at a global scale is a challenge. Users are required to install heavy data packages that quickly go out of date and often fall short of truly global coverage.
The Mapbox macros for Alteryx allow any user with a Mapbox account to access highly accurate location data with global coverage and scale, through the same drag-and-drop interface that Alteryx users expect — no data download or complicated setup required.
The following macros are currently available:
- Spatial Lookup
- Boundary Lookup
Each macro provides full access to a Mapbox API and the data behind it. All Alteryx users can get started with recommended defaults or customize results using Mapbox API parameters.
The Search macro takes in a location, like an address or a city (forward geocoding), or latitude/longitude coordinates (reverse geocoding) to geocode at a specified level of granularity:
- Country: Generally recognized countries.
- Region: States, provinces, and prefectures.
- Postcode: A geographic area of the address component used for sorting mail.
- District: An administrative unit that is larger than a place but smaller than a region.
- Place: Cities, towns, and villages.
- Locality: An administrative unit that is smaller than a place.
- Neighborhood: A colloquial name for a smaller area within a place.
- Address: A specific mailing address.
More details on each of these location types can be found in our Geocoding API documentation.
You can further refine your search with options such as fuzzy matching and bounding box or proximity bias. In the case where data is ambiguous, you can also select how many additional results should be returned. This will enable you to apply your own transformation and filtering logic downstream.
Once defined, all data is passed to the Mapbox Geocoding API, which will return detailed metadata about each result as well as Alteryx Spatial objects for immediate visualization and downstream processing.
For more details on Geocoding API options and metadata definitions, consult our Geocoding API documentation.
The Isochrone macro generates isochrone shapes from a combination of coordinates, travel time, and mode of transportation. Isochrones are geographic areas reachable within a defined period of time. These answer the question How far can I get in X minutes? You’re probably familiar with these as Drivetime Trade Areas in Alteryx.
The standard Alteryx Trade Area macro is limited to driving profiles only. The Isochrone macro is powered by the Mapbox Isochrone API, which gives you the ability to create isochrones for driving, walking, and cycling. A complete selection includes your chosen travel method, the number of rings (up to 4), and the unit of time (60 minutes maximum).
Rings are shorthand for the isochrone contour (time-based boundaries) you want to create, based on travel method and unit of time. The full definition can be found in our API documentation.
Isochrone generation can happen statically by applying the same time constraints to all records. Alternatively, you can specify a variable distance in your data (subject to the 60 minute maximum).
The macro will return the input point and the isochrone for the given distance as an Alteryx Spatial Object. It will also return a Minutes column to distinguish the travel time of the given isochrone.
The Spatial Lookup macro extracts data stored in Mapbox tilesets at a specific coordinate or area, powered by the Mapbox Tilequery API. Users can use this macro for point-in-polygon queries as well as a general nearest neighbor search. Behind the scenes, this macro functions like a reverse geocode but instead of address information, it returns data about features close to the query point.
Users will always get the following information:
- The nearest feature or features to each query point
- The coordinates and type of the closest features
- The tileset layer of the closest feature
- Distance to the nearest feature (if the distance is zero, then the query point is within a polygon)
- All properties of the closest/containing feature
This is a very powerful tool for enriching the data in your workflow with external location information.
The Boundary Lookup macro is similar to Spatial Lookup macro, except that it only searches the Mapbox Boundary tilesets. This allows you to enrich your individual points with detailed administrative, postal, and statistical hierarchies.
Mapbox Boundaries is a worldwide tileset of cartographically-matched and georeferenced data that cover Administrative, Statistical, and Postal hierarchies. You can select from any of the available hierarchies and return detailed information about the boundary in which their data exists as well as the entire geographic hierarchy. To see these hierarchies, visit our coverage map.
With this data in hand, you are able to create detailed geographic analyses with the confidence that your data has been correctly placed in the world. Here’s a few of the many questions you can answer:
- What is my average sale per US Census Block?
- How many 999 calls were made in each British postcode?
- Do population differ across multiple worldviews?
In addition to this type of analysis, the data provided by Boundary Lookup allows you to join your data to Mapbox Boundary vector tiles to create detailed drill-down visualizations that look like this:
All macros can be downloaded from the Alteryx Public Gallery.
What you’ll need:
To use these macros you will need the following:
- Alteryx Designer with active license: If you do not have an active license, you can start a 14-day free trial.
When building with these macros, you will be making API calls to Mapbox and will be responsible for any usage that exceeds our developer free tier.
- Mapbox usage
Search - Measured by calls to the Permanent Geocoding API. All calls to the Permanent Geocoding API are billable.
Isochrones - Uses our Isochrone API and is available to all developers. The first 100,000 API calls, per month, are free of charge.
Spatial Lookup - Uses our Tilequery API and is available to all users. The first 100,000 API calls, per month, are free of charge.
Boundary Lookup - Uses our Mapbox Tilequery API and Mapbox Boundaries metadata. The first 100,000 API calls, per month, are free of charge. Mapbox Boundaries is an Enterprise product. Please contact Sales for more information.
- Rate limits: All macros are set to the default rate limits. To inquire about increasing your rate limits, please contact Sales.
Search: 600 requests/minute
Isochrones: 300 requests/minute
Tilequery (Spatial + Boundary Lookup): 300 requests/minute
For more pricing details, consult our pricing documentation.