Vignette 2 is a demonstration of method 2 in the map creation workflow using ToxpiToolbox.tbx and Covid-19 vulnerability data. The resulting map visually matches Vignette 1, the output of ToxPi_creation.py. The data used in this demonstration was already processed through steps 1A and 1B and can be found here. It is suggested to use the subset as it will significantly reduce running time(Full ~ 30min, Subset ~ 5min). A further description of the data can be found here.
- ArcGIS Pro licensing
- Requires being logged into ArcGIS Portal
- Basic knowledge of ArcGIS tools
- Source column will likely need to be split into two separate coordinate columns (See utilities folder for help formatting if needed)
- Slice names must not contain a special character followed by a number
- Note: Special characters will be replaced by underscores in the output due to ArcGIS formatting
- Windows Operating System
Note: These are just the steps to create a plain map of ToxPi figures. This methodology should be integrated into modelbuilder, used with extra geoprocessing steps, or used for subsetting of slices, otherwise Method 1 is quicker and produces better results.
2A. Already done, download entire repository to get data and scripts
2B. CSV file already generated here in repository, but coordinates need to be split into two columns using any preferred method
- Split source column using split_coordinates.py and the following command:
python location\split_coordinates.py inputfile Parameters: * inputfile - The ToxPi GUI results file that has concatenated coordinates to be split
- Example:
2C. Load results file into an ArcGIS Pro map
- Open a new project in ArcGIS Pro(Project, New, Map, Change Name, Okay)
- Add test data to the map(Map, Add Data, PracticeData_Subset_NC.csv)
- Turn on catalog pane(View, Catalog Pane)
inFeatures: Input feature layer to draw ToxPi figures from
outFeatures: The desired name for the output ToxPi feature layer
uniqueID: The column name for the unique identifier for locations
inFields: The list of all desired fields to be included as slices
inputWeights: A string of weights for determining each slices radial width in order, separated by ;
inputRadius: A numerical value for determining the size of the drawn figures. The default is 1
outFeaturesRings: The desired name for the max radius ring feature layer(optional)
- Complete further analysis or share your map to ArcGIS Online
- Toolbox generates a symbolized feature layer of ToxPi figures
- Sharing provides a web URL for the public to view your map
Interactive slices with custom popups
Colored slices based on ToxPi GUI choices
Toggleable maximum score rings
Sizing based on script parameters
Note: Special characters will be replaced with underscores in slice names
- Error when running tool
- Ensure input feature layer is in a projected coordinate system
- Ensure a proper unique identifier is referenced
- Ensure the number of slice categories and number of weights provided correspond
- Make sure slice names do not contain a special character followed by a number(ArcGIS Pro Tools do not support special characters in fields).
- Mapping Incorrect
- Ensure latitude and longitude have been referenced properly in the previous analysis steps. Using concatenated coordinates can lead to issues, thus it is suggested that the coordinates be split into latitude and longitude individually. split_coordinates.py is provided in Utilities folder to help with splitting coordinates
- Ensure slices and weights are in proper corresponding order
- Ensure basemap coordinate is set to the same coordinate as the output feature layer for the toolbox, else ToxPi figures may be skewed
- Slices may need to be renamed due to replacement of special characters with underscores. This can be done using find and replace within an attribute table, however, doing so will cause the symbology to need to be redone. It is suggested just to rename the legend aliases for slices to their proper names