-
-
Notifications
You must be signed in to change notification settings - Fork 3
ArcGIS Data Sources
ArcGIS is a very common tool for displaying Geographic data (such as vaccination and testing sites for COVID).
Data is available in "Feature layers" that can be added to existing maps using libraries like leafletjs, or in case of this script, parsed as geoJSON.
It seems as though all states that use ArcGIS has publicly-accessible API's for accessing these feature layers. These endpoints and some documentation can be found by looking for requests to domains similar to services.arcgis.com and finding the links that end in /FeatureServer/# where # is the layer ID.
Suppose you have this map of Indiana state vaccination sites. It's clearly an ArcGIS page, which means the data is most likely available in a geoJSON format.
In order for GeoCompare to fetch this GeoJSON, it needs the serviceItemID for the dataset.
To find this data:
- open the ArcGIS url for the map with inspect element open (you may need to refresh if you opened inspect element after the ArcGIS page)
- on the
Networktab of inspect element, filter byXHRrequests and type "service" into the URL filter. - look for a request for what will appear as a file whose name is a single number (typically 0). These are the different layers and any of them will work since we dont actually need the layer information just yet.
- copy the URL from the inspect element for that request up until - but not including the
/before that layer number. In the case of this Indiana map, it ishttps://services5.arcgis.com/f2aRfVsQG7TInso2/arcgis/rest/services/COVID_Vaccine_Sites_Pub/FeatureServer. Paste this URL into a new tab - You should see some information about the FeatureServer. This is how ArcGIS serves this feature information.
- save the value of the
Service ItemID, which should be at about the second line or so. GeoCompare will need this. - Scroll down to the section where it says "Layers", likely near the end. These are all the different layers that are available at this FeatureServer endpoint. Double-check to make sure that the layer for the you want is there and save the layer's ID (the number in the parenthesis). GeoCompare will also need this.
- Use the source entries already present in
config.jsonto cnstruct a new entry for this new ArcGIS source using theserviceItemIDandlayerIDthat you found earlier.
For information on how this information is fetched, see the arcgis fetcher page. for parsing, see the geojson parser page