The generic merge tool assists in the creation of custom grouped regions using any geojson shapefile; it is similar to the zip code merge tool, except that it may be used on any geographical map.
Based on a data file containing grouping information, the generic grouping tool merges individual regions on a map to generate a single region.
To access the tool, follow this link:
The below is screenshot is from generic grouping tool web page.
In our example, we will generate CBSA regions using a geojson collection of US counties.
The US County level geojson file is included in the VitaraMaps package and can be found in the plugins /VitaraMaps/custom/shapes/us-all-admin2.geo.json directory.
Please follow the steps below to construct CBSA groups that have been merged from us-all-admin2.geo.json
To merge using the generic tool you need to convert your geojson file into topojson file format. Open https://mapshaper.org/ to convert geojson file into topojson file. Below screenshot shows mapshaper webpage.
Click on select button and browse to the geojson file saved from your local machine. Now the webpage displays your uploaded geojson file as a map.
Now click export button which is on top left corner of the webpage.
Select required layer and file format as “topojson” and click export button as shown in below screenshot, a topojson file will be downloaded.
Now switch to generic tool webpage and upload the topojson file as shown in below screenshot.
Now we need to get the topojson object name from the downloaded topojson file. How to view json files in jsonviewer.stack.hu is described in the Customizing Map Chart.
Enter the TopoJson Object Name fetched from json.
For the example we will use CBSA and fips codes grouping info in a csv file format.Upload the csv file into data field in our generic tool webpage as shown in below screenshot.
Now for Group By field add the column name on which grouping is done, in our case its CBSA column from the csv file.
The next two fields are Data Prop and Shape Prop, which are mapping fields that map a feature from a shapefile to a row from a data file. So, in our situation, Data Prop is the column name from our csv file that is FIPS, and Shape Prop is the column name from our topojson file that is fips (please see screenshot below; how to check shape prop is also mentioned in zip code merge example).
Fill the data and click on Export button to merge and download the merged geojson file which can be used to create a new maplayer.
Once the geojson file is downloaded please refer to creating new map layer documentation to create a map layer using this geojson as a shapefile.
Below screenshot shows the merged output map file.