How the Elections 2000 Web Site Was Created with Maptitude for the Web
by By Dan Martin, Peter Van Demark, and Giovanni Flammia
Creating the Elections 2000 web site was a simple task, requiring collecting the data, creating the map and creating the web mapping application. The last two steps took just a morning to complete, using Maptitude for the Web.
Collecting the Data
We got election results by county within each state from the Associated Press data on the abcnews.com web site. We saved these data in a dBASE file that could be joined to the county databases included with Maptitude for the Web, based on the county name and state abbreviation (e.g. COOK IL).
The raw vote tallies were sufficient to show pie charts for each county. To have a color theme to show the margin of victory, we needed to create a new field. To do that, we created several formula fields to get the percentage of the total vote for each of the four major candidates. Formula fields are columns in a dataview that are based on a formula that uses values from table fields, constants, operators, and functions. These formula fields divided a candidate's vote count by the total vote to get the percentage, e.g.
[Bush Percent] = BUSH / (GORE + BUSH + BUCHANAN + NADER)
We then created another formula field of the Bush percentage of the vote minus the Gore percentage of the vote to get the margin of victory. Positive values for this field translated to a Bush victory within a county, and negative values translated to a Gore victory within the county. This field, [Bush-Gore(Margin)], is the field used for the color theme.
These formula fields were then saved into the dBASE file.
Creating the Map
Next we created the map to display the elections data. The map contains several of the standard geographic layers that come with Maptitude for the Web, including both high- and low-resolution county boundaries.
We joined the elections dBASE file to both county layers and created the exact same margin of victory theme (with the same breakdowns and same colors) on both layers. We also added the pie chart theme to the high-resolution county layer. Finally, we used autoscaling to set the low-resolution county layer to show within a range of smaller scales and the high-resolution county layer (with its additional chart theme) to show within a range of larger scales. To illustrate, here is the a maps with the low-resolution county layer:
With autoscaling, when the user zooms in, Maptitude for the Web switches to the high-resolution county layer at a scale of 1:2,000,000, and the pie charts appear on each county along with the more-detailed county boundaries:
Creating the Web Mapping Application
Once the map was created and saved, it was simply a matter of using the GetAreaInfo Mapplication to get a working web mapping application. Mapplications are templates that come with Maptitude for the Web, or can be downloaded from the program's web site, and make it easy to create a web mapping application. By using a Mapplication, we were able to create a working web mapping application in a matter of minutes. First we selected the Mapplication to use with the current map:
Next we set the web application properties, such as the area layer and its fields:
We could now test the web mapping application locally, to see the results of our settings and ASP edits:
Finally, we used Maptitude for the Web to publish the Elections 2000 application to a web server. Then we put a link to it on our home page, and the Elections 2000 site was ready for use over the Internet. To handle the increased usage of the Elections 2000 site, we published it to a second web server using the built-in load balancing feature of Maptitude for the Web, which can be turned on just by setting a run-time web application property.
For more information about Maptitude for the Web, visit
www.caliper.com and click the Maptitude for the Web link. To try other demos of Maptitude for the Web applications, click the Add Interactive Maps to Your Web Site link on the home page. Comments? Send e-mail to