MapQuest Developer Blog

Archives for Brian Knapp

  • MapQuest Data Manager 101: Step 2 - Table Maintenance

    Welcome back! In the first article of this series, I walked you through the basics of creating and populating a custom table of location data using MapQuest Data Manager. In this article I will take you through the remaining functions that Data Manager offers, and make you a Data Manager expert extraordinaire!

    A Multi-Step Process

    As you might recall from the first article, to populate your custom table you perform the following steps:

    1. Create the custom table.
    2. Generate a text file that contains location information.
    3. Upload the text file.

    Although I showed you how to push data from staging to production, you will normally go through several iterations of data maintenance before doing this push (unless you are one of the few software developers who never make a mistake). These maintenance steps will likely include adding new records, removing existing records, and changing records that are already in the database--basic database maintenance type stuff.

    By the way, as I walk you through this article I am going to further refine my own personal collection of locations. I encourage you to come up with your own list of locations, even if you randomly pick them off a map. My locations are pretty standard fare in the D.C. area, but you might choose instead to come up with locations that are closer in proximity to where you live.

    With that said, let's look at the database maintenance functions that Data Manager provides for those of us prone to make mistakes. The first is the Clone Table function.

    Cloning a Table

    The majority of table maintenance functions are accessed on the Tables page. Remember that you need to log in at http://developer.mapquest.com before you can use any of these functions.

    Figure 1. The Tables page

    The Clone Table option, as the name implies, is very useful if you want to make a duplicate of an existing table. You can use it to copy the entire table, including its contents, or just the table schema. In this case, I have decided I no longer like the name of the table I created in the last article, so I am going to use Clone Table to make a copy of the table with a new name, and I will do this without losing any data!

    To begin, click Clone in the menu of options on the right of the page to load the Clone Table page.

    Figure 2. Clone Table page

    Two options specify how the table will be cloned: Clone Structure Only and Clone Data and Structure. Click the latter, type a new table name--I am using PhotoTrekLocs--in the New Table Suffix field, and then click Clone Table. Data Manager creates a copy of the PhotoTrekPOIs table named PhotoTrekLocs.

    It should be no surprise by now that while Data Manager is cloning your table, both the source and target tables will be locked, just as they are when Data Manager is in the midst of any operation. When the clone operation is complete, you will receive a notification e-mail.

    If you haven't guessed it yet, what you are actually accomplishing here is a rename of the PhotoTrekPOIs table. Cloning a table in this manner is the first step, and the second--after verifying the copy completed, of course--is deleting the original PhotoTrekPOIs table.

    After receiving an e-mail that indicates the table has been cloned, click Tables on the main Data Manager page. The first thing you will notice is that there are now two tables: the original PhotoTrekPOIs table, and the newly cloned PhotoTrekLocs table.

    Figure 3. Table list

    Change the "active" table by selecting PhotoTrekLocs in the Change Active Table drop-down list. You are making this selection to verify that the data was copied to the newly cloned table as expected. It really isn't a big deal at this point, because there are only two records in the table, but it is a good habit to get into. To verify the data is in the new table, click Edit Locations on the menu at left.

    Figure 4. Edit locations

    Next, click Find Locations. This will display a list of all of the records in the staging area--only two at this point.

    Figure 5. Listing the locations

    I cannot recommend highly enough that you take the time to go through this extra step of verifying your data, especially if your location table has a significant amount of records in it.

    Now that you have verified that the location data was copied correctly, you can go ahead and delete the PhotoTrekPOIs table.

    Deleting a Table

    To delete a table, begin by clicking the Tables menu option. This returns you to the Tables page, where both tables show up (see Figure 3). Go ahead and click the Delete icon that is in the same row as the PhotoTrekPOIs table. Data Manager politely asks if you really want to delete this table. Click YES-DELETE, and Data Manager will permanently remove this table.

    Figure 6. Verify table deletion

    Deleting a table is a synchronous "blocking" process, unlike most of the other Data Manager operations. When the table is deleted you will be returned to the Tables page, where you will now see only one table listed: PhotoTrekLocs. Deleting a table is just that easy, so be careful and make sure you have a backup copy of your data!

    Adding a New Location

    In the first article of this series, I showed you how easy it is to add a group of location records all at once. In fact, at the end of this article I will show how easy it is to add even more location records, using something called "incremental batch files."

    But what if you want to very quickly add a new location without going through the process of generating an import file? What if you don't know the entire address for the location, but know just enough to get close? The answer is on the Add Location page.

    Let me show you just how cool this feature is. To start, click Add Locations on the menu.

    Figure 7. Adding a new location, step 1

    On the first Add Location page, type as much information as you know about your location. What the form doesn't provide is fields to enter custom information; these will appear on the next page, so don't be concerned.

    For my example, I have typed "International Spy Museum" as my next location, using a record ID of "0000000050." I have added as much of the location information as I know. You should do the same with whatever location you choose to enter. When you are ready to move on, click CONTINUE-ENTER LOCATION, which tells Data Manager to proceed to the next page.

    Note that if you click DONE-ADD LOCATION, you will not have the option of adding any custom information, and the record will immediately be added to your staging database, as is.

    On the next page, your custom-defined fields are ready and waiting for you to populate them.

    Figure 8. Adding a new location, step 2

    Here I have entered the URL of the Spy Museum, as well as the appropriate location type. If you don't recall the location types I am using in this series, refer to the first article. You can, of course, use any location type you want, because this is a custom field. Now comes the fun part!

    After you click ADD LOCATION, Data Manager automatically geocodes the location and then takes you to an interactive page that displays a map of the location. On this page you have a variety of options to further refine your location.

    Figure 9. Adding a new location, step 3

    In addition to displaying the location information you have already entered, before adding custom fields, this page also displays the geocode quality of the location. Most importantly, however, are the options you have to customize and refine your location data on this page.

    Move - Clicking this will take you to an interactive map in which you can refine your location by simply clicking the map itself. I will cover the details shortly (see the section "Moving an Existing Location" later in this article).

    Edit - Clicking this will take you to the Edit Location page, which I also will cover shortly (see the section "Editing an Existing Location" later in this article).

    Add Another Location - Clicking this will, as you have no doubt guessed, display a blank form for entering your next location.

    Push to Production - Clicking this will push the entire contents of your staging database to production, overwriting any data you currently have stored there.

    Editing an Existing Location

    My second most favorite function for maintaining my data in Data Manager is Edit Locations. Edit Locations is a powerful feature that lets you filter your collection of locations to a manageable size, and then make changes to the locations one at a time.

    Start by clicking Edit Locations on the menu.

    Figure 10. Editing locations

    You use the first page to find locations; more specifically, you use it to find and display only the locations that match the search criteria you specify. So, not only can you use it to locate a specific record, you can also use it to locate a number of locations that share common information among them.

    In my case, two of the three locations I have specified share the same ZIP Code. So, if I type 20224 in the Zip or Postal Code field, and then click Find Locations, only locations I added where the ZIP was 20224 are displayed. In this case, there are only two. Depending on what you choose to use for search criteria, you might see more, or less. The important thing to realize is that this is an extremely powerful way to filter your location data down to a reasonable size. In addition, you can display a single record very easily if you simply enter that record's ID, or any other information that is unique to that record.

    Figure 11. A filtered location list

    Now, here is the real power of the Edit Locations function. Simply click the Edit icon that corresponds to the location you want to edit, and Data Manager displays a form for editing the existing record data--essentially the same form you would use for adding a new location.

    I am going to update the second record. After I click Edit next to record number 2, I notice that I previously misspelled "District of Columbia" as "Distric of Columbia," and I definitely want to change this.

    Figure 12. Editing a record

    After correcting my misspelling, I simply click DONE-UPDATE LOCATION, and my location data is saved in my staging area. It's that simple.

    Did you notice the Move Location link below the thumbnail map of your location? This is yet another way to access the interactive movement feature I mentioned earlier, a feature that I will cover very soon.

    Deleting an Existing Location

    On occasion, you might find that you want to remove a location from your MapQuest-hosted location table. The simplest way to do this is to locate the record, and then simply delete it using the Delete option in Data Manager.

    To delete a location you must first find it using the same method explained earlier, in the "Editing an Existing Location" section. First, click Edit Locations to display the Find Locations page. Enter enough information to find the location record you want to delete, and then click Find Locations. In my case, I am going to delete a record I added earlier in this article, the "International Spy Museum."

    Because there are only three records in my staging table, I am simply going to click Find Locations without typing any search criteria. The result is that all of my locations are displayed.

    Figure 13. Displaying all locations

    Now all I have to do is click the Delete icon in the row corresponding to record number 3, the "International Spy Museum" record I added earlier. When I do this, Data Manager displays a warning page, asking me to verify that I really want to delete the record.

    Figure 14. Verifying record deletion

    Because I really do want to delete this record, I click YES, which immediately removes it from my staging database. When the record is deleted, Data Manager confirms the deletion and then asks whether I want to return to my list of locations or push my changes to production. Although I have now deleted the record I added earlier, I am going to go ahead and push my staging database to production, because I also corrected a misspelling in another record.

    Moving an Existing Location

    Now let me show you the coolest feature that Data Manager offers for data maintenance. No matter how you get here, the Move Location page is a great way to visually refine an already geocoded location. In my example, below, I click Edit Locations on the menu, click Find Locations to display all my locations (all two of them!), and then click the Move icon beside my record with the ID "0000000020," which happens to be the Civil War statue.

    Figure 15. Moving a location

    The page that Data Manager displays includes a map of the location based on the current geocoding, along with two options: Enter a latitude and longitude or Re-geocode with MapQuest. Before I explain these two options, however, I want to show you just how cool this page really is.

    In many cases the location you want to enter does not lie at a specific house number on a street, or at a street intersection. In these cases you might think you either need to know the exact latitude and longitude (Lat/Lng) of the location, or need to settle for a street address that is only close to the real destination. This is not the case at all.

    Data Manager's Move Location provides an interactive means of more accurately identifying where your location really lies on the map. In the case of the Civil War statue that I selected earlier, the street address does not quite accurately represent where the statue is physically located, so I will use the map itself to better locate it.

    The first thing I do is zoom in as closely as possible using the zoom control on the right of the map; this will give me the best chance to identify the true location of the statue. The next thing I do is click the map in the general area of where I know the statue to be. Realize that the best you can hope to do here is improve the placement of your location on the map--you probably won't get it exactly perfect. You would need to know the Lat/Lng for the location to get it perfect.

    My updated location is displayed in Figure 16.

    Figure 16. Updated location

    Now it is your turn! Click one of the locations that you entered and then click the map to move around the icon.

    It might take you a few iterations of clicking the map and seeing where the little blue star moves before you get it just the way you want it. When you have the star in the correct location, simply click UPDATE LOCATION. Note that even though an updated Lat/Lng has now been stored for your location, your street address information will not be updated because you have effectively circumvented this information by directly placing your location on the map.

    What happens if you mess up the location really badly and want to move that little blue star back to where you started? Simply click Re-geocode with MapQuest. This geocodes the location according to the street address information currently stored for this location. In other words, it takes you back to where you started--no harm done.

    The other option on the Move Location page is specifically for those of you who happen to know the exact Lat/Lng of your location. If you click this option, a dialog box is displayed, in which you can enter the Lat/Lng of your location.

    Figure 17. Entering latitude and longitude

    Incremental Batch Files

    Before leaving Data Manager I want to cover one last topic--incremental batch files.

    Not only does Data Manager provide the means for uploading a batch of multiple locations at once, as I demonstrated in the first article in this series, it also allows you to use essentially the same mechanism to add new records, and to change and delete existing records. (If you need to, refer to the first article in this series for a review of how to create a batch file that contains location data for uploading.)

    The only difference between a regular batch file and an "incremental" batch file is that uploading an incremental file does not, in and of itself, remove any locations in the currently selected table. An incremental batch file is very close in format to a normal batch file. The main difference is that an additional field appears on each row of an incremental batch file. For example, consider the following incremental file:

    c,"0000000020","Statue of Dudes on Horses","100 Maryland Ave SW","Washington","District of Columbia","DC","20224","US","","","","","","","2"
    a,"0000000030","Space Shuttle US Enterprise","14390 Air and Space Museum Parkway","Chantilly","Fairfax","VA","20151","US","","","","","","http://www.nasm.si.edu/udvarhazy/","1"
    a,"0000000040","The White House","1600 Pennsylvania Ave","Washington","District of Columbia","DC","20500","US","","","","","","http://www.whitehouse.gov","2"
    

    You'll notice that this file looks very similar to the batch file I used in my first article, except for the additional field at the beginning of each row. Note there are two rows that start with a, and one that starts with c. This additional field at the start of each row is how you tell Data Manager that you want to either (a)dd a new record, or (c)hange an existing record. In addition to adding two new records in this batch file, I have changed the description of the statue to the more playful "Statue of Dudes on Horses"--everything else remains the same.

    CAUTION: An incremental batch file is loaded into Data Manager the same way a regular batch file is loaded, with one important distinction: be sure that the file extension on your incremental file is .acd instead of .txt, because this gives Data Manager a heads-up about the type of file you are about to upload. Other than that, use the Upload File option to upload your incremental file, just as you did when loading a regular batch file in the first article.

    After pushing this incremental file to my table using the Upload File option, and waiting patiently for an e-mail that indicates my upload has been processed, the following results are displayed:

    Figure 18. Updated locations

    Not only are there two new locations, but the description of the second record has been changed based on the new description I added to the incremental file. Quite nifty, isn't it?

    In addition to using an incremental batch file to add new records and change existing records, you can also use the file to delete existing records. To accomplish this you simply create a batch file that contains records with only two fields: d followed by the record ID of the record you want to delete. For instance, if I want to remove the first and third records displayed above, the contents of my incremental batch file will be as follows:

    d,"0000000010"
    d,"0000000030"
    

    Notice that there is no need to include any other information besides d and the record ID.

    I am not going to actually upload this incremental batch file, because I only have four locations in my table as it is, but you should feel free to experiment by uploading an incremental file that deletes records in your table.

    One final note: all of the changes we have made, both interactively and using the incremental batch file, are changes to the staging table only. Be certain to push any changes to production that you want to use in your application; I have done the same.

    Ready to Trek!

    Hopefully you now have a much greater appreciation for Data Manager, and the host of options it provides for getting your custom location data loaded on the MapQuest servers. In the next article we will (finally) dive right in and start work on the PhotoTrek application that will use this location data.

    See you then!

  • MapQuest Data Manager 101: Step 1 - Creating and Populating a Custom Database

    MapQuest Data Manager is a powerful web application you can use to upload and maintain your own custom location data in a MapQuest-hosted database. By providing you with a facility to store your data on MapQuest servers, Data Manager frees you from having to maintain your own server to support whatever location-aware applications you are developing.

    In this series of articles, I will introduce you to the basics of Data Manager by taking you through the development of a simple application called PhotoTrek.

    What Is PhotoTrek?

    As an avid photographer, I am always looking for ways to improve: improve the photos I take, improve the processing that inevitably follows, and--most recently--better calculate optimal routes from one "photo opportunity" to another. OK, so I hadn't really thought much about optimizing my route between locations until I started work on this article. But hey, it does provide a "real-world" scenario you can use to learn about Data Manager! Combine this with the fact that where I live (just outside of Washington D.C.), there is no shortage of really great locations to take pictures, and you have a cool new app--PhotoTrek--in the making!

    In this article, you will use Data Manager to upload some custom locations to your own MapQuest-hosted database. In future articles, I will cover how to modify this data after it has been uploaded and show how to retrieve the data and use it as the basis for proximity searches and routing.

    What You Need to Know

    So, what do you need to know to upload data using Data Manager? Nothing more than how to create a text file and get around a web site--it's that simple! So let's get started by taking an initial look at Data Manager.

    To get started, open your favorite web browser and go to http://developer.mapquest.com. To use Data Manager, you first need to register with the MapQuest Developer Network. After registering, you can find Data Manager on the Developer Network web site, after logging in. (Look in the upper-right corner of the web site for the Log In icon.) Then, click the Data Manager button on the blue menu bar stretched across the top of your browser window. This will take you to the Data Manager home page, shown in Figure 1.

    Figure 1. Data Manager home page

    Click Getting Started and take a minute or two to read through this section. It provides a great overview, and a link to the MapQuest Data Manager User Guide, which you'll likely find to be a valuable source of information as you proceed.

    Getting Started with Data Manager

    The first thing you should do before working with Data Manager is to ensure that you have set your working preferences. To do this, click the Preferences link on the left side of the Data Manager page to display the Preferences page:

    Figure 2. Data Manager Preferences page

    There are three fields you need to be concerned with on the Preferences page: Default Push Location Data to Production Setting, Push Ambiguities, and Email Notification Setting.

    Default Push Location Data to Production Setting

    This setting determines whether your location data is automatically "pushed"--that is, moved--from the staging database to the production database. You can choose not to push the data, to push the data if there are no errors, or to push the data regardless of whether there are any errors. Click the first (default) option, which is to leave the data in the staging database after uploading it. After you get comfortable using Data Manager (especially creating upload files) you might want to change this setting to have Data Manager push your location data to production, as long as there are no errors (the second option). Pushing uploaded data to production regardless of errors is typically not a wise thing to do.

    Push Ambiguities

    This setting determines what Data Manager does when it is unable to resolve a location in your upload file to a unique latitude and longitude (Lat/Long); that is, when more than one match was found for the data you specified. Because ambiguities typically indicate insufficient information in your location file, it is best to choose the first option, which is to not push these records to the production database.

    E-mail Notification Setting

    Uploading your file can take a bit of time depending on how many records you have included, in addition to other factors. Because of this, Data Manager allows you to specify an e-mail address where you will receive notification when your upload is complete.

    Default Table Selection

    You do not need to make any changes to this field. In fact, you can't change it if this is the first time you are using Data Manager, because there are no tables to choose from until you create them! You can always return to the Preferences page later and make a selection here to specify which table is made "current" each time you start up a new session.

    After verifying your settings, click Save to save your preferences.

    Creating a Custom Table

    Now that you have established your working preferences, you need to create a table on the MapQuest server that will hold your custom location data. Table creation is an interactive process in which you add, delete, and rearrange fields. To access it, click the Tables link on the Data Manager home page. Note that the first time you click Tables, Data Manager takes you directly to the Add Table page, shown in the following image.

    Figure 3. Adding a new table

    Before creating a table to hold the PhotoTrek location data, you need to identify the information you want to store. In addition to the standard fields that are automatically part of any table you create using Data Manager, in this case, you'll add two custom fields:

    	-	AssociatedURL		String
    	-	LocationType		Numeric
    

    AssociatedURL contains the URL (if applicable) of the location of your "photo opportunity." LocationType identifies the type of location specified--for example, historic landmark, museum, or statue. You'll use this field in future articles; for now you will simply populate it according to the following data table:

    01 - Museum
    02 - Statue
    03 - Historic Landmark
    04 - Sports Arena/Stadium
    05 - Church/Cathedral/Temple/etc.

    You can (and probably will) add more location types in the future, but this will suffice for now.

    Although table creation can be done all at once, you'll break it down into a two-step process here. First, create the table with the standard Data Manager-provided fields. Second, you'll add the two custom fields identified above.

    To create the PhotoTrek table, type PhotoTrekPOIs in the Table Name Suffix box, and then click Submit.

    Figure 4. Creating a table

    If you click Submit at this point, you instruct Data Manager to create a new table for you, using the table name suffix as part of the table name. In practice, you can think of the table name suffix as the table name itself; use whatever name is meaningful to you. When Data Manager creates the table, it appends the suffix you specified to the constant "MQ_" and the client ID you were assigned when you registered on the site. For instance, if you were assigned client ID "9999," then the newly created table would be called "MQ_9999_PhotoTrekPOIs."

    After creating the table, Data Manager takes you back to the Tables page, only this time your newly created table shows up in a list, along with a number of icons you can use to print a schema, or to edit, delete, or clone your table.

    Note: I have hidden my client ID for the purpose of this article. Your assigned client ID will show up as part of the table name.

    Figure 5. Table created and ready to edit

    Now that you have created your custom "PhotoTrekPOIs" table, you can go in and add the two additional fields that you will use to store the location's URL, and its type. To edit a table's schema, click Edit Table on the Tables page. (Note that if you have more than one table, you can click the table you want to edit in the Change Active Table drop-down list.)

    Before you click Edit Table, I want to emphasize the importance of keeping a local copy of data to upload on your own computer. Editing the schema of a table in Data Manager will erase all the data that is currently in the table, requiring you to upload the data again. Obviously, if you rely upon MapQuest to keep the only copy of your data, you will have no recourse if you edit the table's schema!

    With that said, go ahead and click Edit Table, and then click OK when you see the warning about losing data currently in the table.

    The first thing you will notice is that there are already a number of fields in your schema. These are fields that Data Manager automatically places in your table for you, some of which are required; I will cover these in more detail in the following section.

    Then, in the Field Name box, click AssociatedURL; in the Field Type box, click String, and then click Add. Note that this does not actually add the field to the table--this doesn't happen until you click the Submit button, after adding all of your fields.

    Figure 6. Adding the AssociatedURL field

    Next, in the Field Name box, click LocationType; in the Field Type box, click Integer, and then click Add.

    It is a good idea to make sure that the fields have been added, before you submit your changes. You can do this by dragging the scroll bar down on the right side of the field list. After verifying your new fields are there, click Submit.

    Figure 7. Verifying added fields

    Preparing Data for Upload

    Now that you have created a custom table on the MapQuest server to hold your location data, your next step is to prepare a batch text file that contains the data you want to upload. The batch file is a comma-delimited file that contains each field in quotes. I used a simple text editor to create mine. Whatever you choose to use, make sure it creates a simple text file with no embedded control characters.

    Before you create your file, take a moment and look at the predefined fields Data Manager automatically placed in your table because these affect the layout of your batch file. Recall that the data you are about to upload is location data; that is, it specifies a physical location here on planet Earth, ultimately represented by a unique latitude and longitude. Lucky for you, you don't need to know in advance the Lat/Long of any of the locations you plan to upload. Why? Well, because Data Manager will "geocode" your locations! Geocoding is the process of assigning a unique Lat/Long to a location, and is explained in chapter 2 of the Data Manager User Guide, if you want to know all the details.

    What this means here is that you only need to provide sufficient location information--for example, a street address--in your batch file, and Data Manager will do the rest. That said, following is a table of the required fields that must appear in your import file. A detailed explanation of each is in chapter 5 of the Data Manager User Guide (hint, hint!).

    Notice that the fields in the table generally correspond to the standard fields that are part of the table layout provided by Data Manager (shown in Figure 3) when you add a new table.

    Table 1. Import File Format

    Record ID This contains a unique ID for each location record
    Location Name A description of the location
    Street Address Street number and name
    City The location's city
    County The location's county
    State 2-character state/province code (blank if outside the U.S. or Canada)
    Postal Code The ZIP Code/postal code of the location
    Country 2-character ISO Country Code
    Icon ID - optional -
    Display Type - optional -
    Latitude - optional -
    Longitude - optional -
    Geocode Quality - optional -
    User Fields (1-10) - unused -
    Search Fields (1-20) - unused -
    Text Fields (1-100) - unused -
    Addt'l Fields (1-100) Custom fields

    In this exercise you will create an extremely basic file of only two location records. (I will cover the "how to" of adding more records in a future article.) The two locations I'm using are excellent spots that I have personally photographed, which is why they are going in the file; feel free to substitute your own!

    Given the table of fields, in conjunction with the custom fields (AssociatedURL and LocationType) you added to your table, your import file ends up looking like this:

    "0000000010","United States Botanic Garden - National Garden (Regional Garden)",
    "Maryland Ave SW & 3rd St SW","Washington","District of Columbia","DC","20224",
    "US","","","","","","www.usbg.gov","1"

    "0000000020","Civil War Statue","100 Maryland Ave SW","Washington", "District of Columbia","DC","20224","US","","","","","","","2"

    Notice a few important things about this import file:

    1. I have arbitrarily assigned Record IDs (the first field) for these two records of "0000000010" and "0000000020." These can be anything you want, as long as they are unique.
    2. I have specified a complete street address for these two locations to increase the odds that geocoding will be successful.
    3. I have provided empty quotes for optional "standard" fields (fields 9-13).
    4. The "unused" fields (14-16) are not included in the import file at all.
    5. You are using the first two out of a possible 100 "Additional Fields" to provide the two custom fields "AssociatedURL" and "LocationType" (remember that you added these earlier when you created your table?).

    Uploading Data

    Now that you have created your import file, the next step is to instruct Data Manager to upload it. Click Upload File on the Data Manager home page to go to the Upload File page.

    Figure 8. Uploading a file

    The Upload File page is fairly straightforward. Type the name of the upload file you created (or browse to it by clicking the Browse button), leave the Delimiter box set at Auto, and leave Push to Production set to the first option. Click the Upload button, and Data Manager will upload your file to a temporary staging area, and will send you an e-mail when it is finished.

    Note that you will not be able to do any maintenance on this particular table while Data Manager is processing your upload in the background.

    Verifying Your Upload

    After you receive an e-mail indicating that processing is complete, you can view a summary of the uploaded file on the Data Summary page, which you can access from the Data Manager home page.

    Figure 9. Data upload summary

    The Data Summary page is an excellent way to quickly determine the disposition of each location processed in your uploaded file. Because you are considering data in the "staging" area, don't click the Production link at the top of the page at this point; this would display data in the production area, in which you don't yet have any data.

    The first block of statistics displays the "quality" of the geocode match that was made for each location. In this case, one record was geocoded at the level of a street address, and the other at the level of an intersection, which exactly matches the location data specified (one was a street address, the other was an intersection.) The second block of statistics displays the number of ambiguous matches--ones that have found multiple geocodes--for each location processed; there are none in this instance. Not Geocoded identifies the number of records that were tagged with a valid Lat/Long in the input file, and therefore Data Manager did not geocode. Invalid (Processed) identifies the number of matches that contained invalid records yet were still processed, and Not Processed (Errors) identifies records that could not be processed due to invalid location information.

    One nifty feature you can access from this page are other pages on which you can view and edit data that has been uploaded. Simply click one of the links in the Geocode Quality column, and you will be presented with a list of all the uploaded records that fit that particular disposition category--for example, Address Quality. When the list is displayed, you can change the sort order of the records, edit them, move them around, or even delete them.

    Figure 10. Editing uploaded data

    Because all of your records (all two of them!) processed successfully, go ahead and push them to production so that you can start using them.

    Pushing Data to Production

    You can push data to production directly from a link on the Data Summary page, or from the Production link on the Data Manager home page. Data Manager will ask you to verify that you are ready to push your data to production, and will indicate that any data currently in production will be overwritten with the data currently in staging.

    Figure 11. Push data to production

    Click Yes to proceed with the data push. When it is complete, you will receive a notification e-mail. As with your initial upload of data, the current table is inaccessible until the push is complete.

    After you receive the e-mail indicating your push to production is complete, it is a good idea to view the statistics, to verify the data push. You can view this information on the Data Summary page; click the Production link at the top to view the results.

    What's Next?

    In my next article, continuing the development of PhotoTrek, I'll show you how to use Data Manager to make changes to already-uploaded data using incremental batch files, in addition to adding and editing locations directly using forms on the Data Manager web site. I will also cover some of the basic table maintenance options in Data Manager, and review the options Data Manager provides for downloading data.

    See you then!