This algorithm converts place names or addresses into Latitude, Longitude co-ordinates. It accepts international addresses, countries, States of United States of America and ZIP codes of United States of America. All co-ordinates are obtained by querying Yahoo! PlaceFinder service. Internet access must be available during geocoding.
Pros & Cons
- The performance is slower than the Geocoder and may vary due to the network latency since the queries are requested through internet service. The benchmark test geocoded 470 unique locations per minute
- Yahoo! Geocoder supports address geocoding with international coverage which is not supported by Geocoder.
- To use Yahoo! Geocoder, user has to obtain an application id through Yahoo! registration. Save your application id and provide it when requested by the Yahoo! Geocoder. Since each application id is allowed to geocode 50,000 locations per 24 hours, the user is encouraged to test on a small set of data first.
The plugin is useful for scientists who would like to visualize their data on a geographical map (see Geospatial Visualization). User can obtain the geographical coordinates (Latitude and Longitude values) and feed them to the visualization plugin.
The algorithm receives a list of input data (locations) and queries their locations one by one through Yahoo! PlaceFinder geocoding service. The results will temporarily be cached in memory so that the same query for duplicated locations can be avoided. The cache is deleted after each user request is completed. This plugin is included with the Sci2 application. Performance of this algorithm is O(n).
The detail of the algorithm is shown as following,
- Yahoo! Gecoder is favored by MVCs (Model-View-Controller)
- YahooGeocoderFactory is extending AbstractGeocoderFactory. It defines all the display options and user input wrapping.. The detail of the implementation can be accessed through here.
- GeocoderAlgorithm is the shared geocoder controller which is documented with AbstarctGeocoderFactory. It invoked YahooFamilyOfGeocoder's methods to retrieve the geocoder based on the selected type and performs the geocoding operation.
- YahooFamilyOfGeocoder contains four geocoders: YahooCountryCoder, YahooStateCoder, YahooZipCodeCoder, YahooAddressCoder. Each coder will only be created when it is invoked
- Geocoder contains the geocodingFullForm and geocodingAbbreviation methods which will invoked PlaceFinderClient to request Yahoo! PlaceFinder service.
- PlaceFinderClient will performs the service query to Yahoo! PlaceFinder. Every request has three times retry for network failure. The result will be returned as ResultSet which is defined in the model
- The model classes were generated by using placeFinder.xsd and located in edu.iu.scipolicy.preprocessing.geocoder.coders.yahoo.placefinder.beans.
- The JAXB technology is chosen as the un-marshaller since Yahoo! PlaceFinder have a simple and standard service response definition at here. JAXP is more suitable for complicated data model which provides more control in data preprocessing.
- Dependency: javax.xml.*
Here is a 7 steps guide to using the plugin:
- Make sure you are connected to the internet.
- Load an input data table that contains locations to be geocoded.
- Select Analysis > Geospatial > Yahoo! Geocoder from the menu bar. A window will pop up.
- Enter your application id. You can obtain one from here.
- Choose place type that represents your input location data. The place type can be address, country, U.S. state or U.S. ZIP code.
- Choose place name column that represents the location field in your data file.
- Select Include address details if you want Yahoo! to return the parsed address information.
- Press Ok to start geocoding.
All rows of the data will be geocoded one by one using Yahoo! PlaceFinder. Emtpy entries and invalid locations that failed to be geocoded are listed in the console.
The output of this algorithm is the original input table with two additional for latitude and longitude. Locations that failed to be geocoded will have blank entries.
Performance varies by machine and network latency. Our benchmark is 470 unique locations per minutes.
- Source Code: Link
- Root Source: Link
- External Package: Link
- Yahoo! PlaceFinder: Link
The geocoding algorithm was authored, implemented, integrated and documented by Chin Hua Kong. Many thanks to Micah Linnemeier for providing guidance of the plugin integration. I would also like to acknowledge the usage of Yahoo! PlaceFinder's geocoding service.