-
Notifications
You must be signed in to change notification settings - Fork 46
ArcGIS FeatureServer
- Make a new directory for your new state. Unless otherwise specified, the directory should be named
runners/<state>/arcgis
(e.g.,runners/al/arcgis
).
-
Open developer console in your web browser, then open the Network panel
-
Open the ArcGIS dashboard for your state. Here is Alabama's dashboard, as an example.
-
In the Network developer panel, filter for urls with the string "query" in them.
-
For each tab in the dashboard, you should see urls that looks like:
https://services7.arcgis.com/4RQmZZ0yaZkGR1zy/arcgis/rest/services/ApptOnly2_Public/FeatureServer/0/query?f=pbf&cacheHint=true&maxRecordCountFactor=4&resultOffset=0&resultRecordCount=4000&where=1%3D1&orderByFields=objectId%20ASC&outFields=*&outSR=102100&spatialRel=esriSpatialRelIntersects
-
Remove all query args from the urls found above, so they look like:
https://services7.arcgis.com/4RQmZZ0yaZkGR1zy/arcgis/rest/services/ApptOnly2_Public/FeatureServer/0/query
-
Opening this url will open the query interface for this layer. In this example, the layer is named ApptOnly2, with ID: 0. We actually want to open the service url, so remove the layer number from the url. It should look like this:
https://services7.arcgis.com/4RQmZZ0yaZkGR1zy/arcgis/rest/services/ApptOnly2_Public/FeatureServer
-
Open this url in a web browser. You will see a
Service ItemId
listed. Save this value, you'll need it in a moment. In this example, the Service ItemId is:d1a799c7f98e41fb8c6b4386ca6fe014
-
On the same page, you will see a bullet-point list of
Layers
. Save them, you'll need them in a moment. In this example, there is only one layer:ApptOnly2
We offer a shared fetcher - configurable via a .yml
file - for fetching ArcGIS FeatureServers.
See #76 for a sample PR.
-
In the directory you created (
runners/<state>/arcgis
), create a file calledfetch.yml
-
Using the following template, update your
fetch.yml
.-
Update the
state
key to your state's two-letter abbreviation. -
The
arcgis
key is a list of objects, each of which has anid
key (set to the id from above) and alayer_names
key (set to a list of layer names from above).
This is a sample
fetch.yml
for Alabama. Your file may contain fewer (or more!) configurations.--- state: al arcgis: - id: d1a799c7f98e41fb8c6b4386ca6fe014 layer_names: - ApptOnly2 - id: d677f142234648a1a41b84d94df8e134 # A second feature server layer_names: # this feature server has several layers - Mass Vaccination Sites - Pharmacy Vaccination Sites - FederalPartners
-
-
Test your fetcher by running:
poetry run vaccine-feed-ingest fetch <state>/arcgis
In our case, this command will look like:
poetry run vaccine-feed-ingest fetch al/arcgis
-
That's it! The arcgis python module (
ingestors/arcgis.py
) will download the locations from each layer. Behind the scenes, it will grab a url like:https://opendata.arcgis.com/datasets/<service_item_id>_<layer_id>.geojson
In our case, it will look like:
https://opendata.arcgis.com/datasets/51d4c310f1fe4d83a63e2b47acb77898_0.geojson
We offer a shared parser - configurable via a .yml
file - for parsing files fetched from ArcGIS FeatureServers.
See #81 for a sample PR.
-
In the directory you created (
runners/<state>/arcgis
), create a file calledparse.yml
-
Using the following template, update your
parse.yml
.-
Update the
state
key to your state's two-letter abbreviation. -
Update the
site
key to the name of your directory (probablyarcgis
). -
Set the
parser
key toarcgis_features
.
This is a sample
parse.yml
for Alabama.--- state: al site: arcgis parser: arcgis_features
-
-
Test your parser by running:
poetry run vaccine-feed-ingest parse <state>/arcgis
In our case, this command will look like:
poetry run vaccine-feed-ingest parse al/arcgis
-
That's it! We will parse your downloaded data using the shared parser.
At this time there is no shared tooling for normalization. Take a look at runners/ak/arcgis/normalize.py
as a sample!
- Find an issue you'd like to help out with
- Set up a development environment
- Read up on how our pipeline works
- Run the pipeline locally
Some pre-built tools to help fetch or parse common data types