5.07.2013

Web GIS


Web GIS

To create an initial implementation of the Web GIS for the project, I used the free, non-subscription version of ArcGIS Online, not only because my institution does not have a subscription to ArcGIS Online but because I want to make this project as useful as possible to people with limited resources. Anyone with a broadband connection and a computer can now use the Web GIS published in the second post to this blog as the basis for their own Web GIS by modifying it, adding to it, deleting parts of it and saving their creation to their own free account on ArcGIS Online.

The first step in publishing the GIS on ArcGIS Online involved converting the feature class files, both line and point, to a format that the free version of that software accepts. In order to reduce the work involved in what was a test, being my first experience with web mapping, I copied the GIS and renamed it Slave_Voyages_WebGIS. Since I had used relative paths, the copy worked perfectly. I then used a select by attribute query to find all the voyages that carried enslaved Africans and deleted all the layers for other voyages as well as the hurricane layer because the slave trade had ended by the time the hurricane record begins in 1851. Then, to reduce the size of the files in the Web GIS and ensure it ran smoothly, I used the Delete Field tool (in Data Management Tools, then Fields) to delete all fields except VesselID, Flag, DayOfWeek, Latitude, Longitude, TSTDURL, Cargo, and DATE from the attribute tables of the point Feature Class files. Then I used the Feature Class to Shapefile tool (in Conversion Tools, then To Shape file) to export all the point and line Feature Class files from the geodatabase to a new folder. Opening that folder reveals that each feature class exports as several files, including the essential file.shp, file.prj. file.dbf, and file.shx files. Each includes essential information such as the projection, spatial reference, point or line locations, and attributes. Selecting all the files associated with a point or line feature class, right clicking, and selecting Send to Zipped Folder creates a compressed folder that the free ArcGIS Online accepts as an upload, as long as it does not contain more than 1,000 features.

Next, I started a new map from within my free ArcGIS Online account by selecting the Map link, then the New Map button, and then the Basemap button and adding the same Terrain base map I used in ArcMap. I then saved the new map to My Content with the name Dutch and British Atlantic Slave Trade Voyages, 1751-1795. Once that GIS had been saved to the ArcGIS cloud, I was able to add all the point and line layers for the 48 slaving voyages by selecting the Add Content button, selecting Add Layer from File, navigating to the folder of shape files on my computer, and uploading each in turn.

Those shape files do not contain the symbology and other features, such as the visibility range, of the layers in the GIS from which they were exported, necessitating a lot of work to reestablish appropriate symbols to indicate cargoes and so on within ArcGIS Online. That is accomplished laboriously but straightforwardly through the Contents panel of the  Web Map and a menu that appears when the arrow to the right of each layer is selected.

The popup box associated with clicking on each feature, line or point, is particularly useful in a Web GIS because it can include URL links to other Websites. Most basically, I configured the popup boxes for the point symbols for a particular voyage to include the URL for the search window in TSTD for that same voyage, allowing users to immediately connect the data and representations of one project to those of the other. I also ended up importing the Ports_and_Landmarks shape file to identify places relevant to the slave trade, from landmarks like Cape Mount, to ports like Paramaribo, to archives like the Zeeuws Archief in Middelburg that hold the logbook data on which the GIS is based. Each popup can contain a relevant image and “Get more info.” link to, for example, the Website of the archive or a Wikipedia entry on the place. I also added popup boxes to some of the lines that represent the routes of the vessels, in this case linking to the shipping news sections of online newspaper archives so that clicking on the line representing a specific voyage brings up an image of the newspaper that contains a link to the reference in its shipping news section for that specific voyage.

I also wanted to represent one of the patterns that became clear in the ArcMap version of the GIS, namely the pattern of deaths of enslaved Africans during the Middle Passage and the disposal overboard of their corpses. The Dutch logbooks recorded the number of deaths on each day of the crossing, making it possible to visualize that horrific aspect of the slave trade. To do so, I used the Merge tool in ArcMap (in Data Management Tools, then General) to generate a single layer that combined all the individual voyages but eliminated all fields except for VesselID, Cargo, and Occurrences, the last of which contained the number of enslaved who died on each day at each position, from a low of 0 to a high of 5. That created a new point Feature Class File with 8,889 records, or rows in the attribute table. I used various tools (Add Field, Find & Replace, Field Calculator, and Sort) available through the Table Options button in the top-left corner of the attribute table window or through right clicking the column heading to create a new short-integer field called SlaveDeaths and populate it with the number of slaves who died at each latitude, longitude on a particular day. I then eliminated all records with zero deaths and ended up with a layer with only 389 records that I could export, compress, and upload to ArcGIS Online in the same way as the other layers. Once added to the Web map, I assigned different diameter point symbols to each number of deaths. The pattern is striking enough with that representation, but I also wanted to visualize it as a continuous density surface.

To represent the pattern of deaths as a density surface, I first ran the Kernel Density Tool (in Spatial Analyst Tools, then Density) in ArcMap. It calculates the density of occurrences, deaths in this case, around each data point, the vessel positions in this case, and creates a floating point raster layer as its output, in other words, a layer that consists of square cells that each have a value such as 0.349759 or 2.897347. The problem was that the free version of ArcGIS Online does not allow you to upload raster layers. The raster layers must already exist within ArcGIS Online, for example, the base maps, which are raster layers. I used three additional tools to work around that limitation. First I used the Raster Calculator Tool (in Spatial Analyst Tools, then Map Algebra) to multiply all the raster values by 10,000, which changed the output from deaths per square kilometer to deaths per 10,000 square kilometers but would stop the next tool from truncating most of the significant figures. That next tool was the Int Tool (in Spatial Analyst Tools, then Math), used to convert a floating point raster file to an integer raster file by truncating all of the cell values. And the last tool was the Raster to Polygon Tool (in Conversion Tools, then From Raster), which converts integer rasters, but not floating point rasters, to a series of lines that define polygons. Once that polygon layer had been created, I exported it as a shape file, compressed the results into a zipped folder, uploaded it to ArcGIS Online, and applied colors to each polygon to represent different values of deaths per 10,000 km2.

The free version of ArcGIS Online does not support uploading temporal layers, so the voyages cannot be run as a temporal sequence in the Web GIS. But future posts will explore solutions to that issue.

In the meantime, here is a prior temporal animation of the CLIWOC database for purposes other than historical climatology; here is another; and here is a nice static representation as well as one that shows seasonal patterns.

No comments: