DEQ Environmental Data Viewer
Generic application for searching, viewing and downloading DEQ GIS data and related tables.
Production - enviro.deq.utah.gov
In order for a dataset to be used as a query layer within the application, it must satisfy all of the following requirements:
- Hosted in ArcGIS Online or ArcGIS Portal
- "Export Data" enabled
These are managed via the "Data" tab of the AGOL item. Any changes should immediately be reflected in the application. The config spreadsheet also supports defining aliases for fields with the following syntax: FieldName (Field Alias)
. If an alias is defined in the config spreadsheet, it will take precedence over the AGOL alias.
The fields that show up in the results grid after searching are configurable via the "Result Grid Fields" column in the config spreadsheet. This can contain anywhere from 1 to 5 fields. Aliases can be defined in the source AGOL service or via the following syntax FieldName (Field Alias), AnotherField (Another Field Alias)
.
This is managed via the "Visualization" tab of the AGOL item. Any changes should immediately be reflected in the application. If there is no specific symbology defined, the app has some reasonable defaults that look better than the AGOL defaults.
These are also managed via the "Visualization" tab of the AGOL item. Any changes should immediately be reflected in the application. The config spreadsheet also supports defining a map label field via the "Map Label Field" column. If a map label field is defined in the config spreadsheet, it will take precedence over the AGOL label field.
The links in the "Links" tab in the identify panel are controlled via the corresponding columns in the config spreadsheet. If you want to append the feature's attributes to the URL, use the following syntax: https://example.com?param1={field1}¶m2={field2}
.
Most updates are taken care of via the config spreadsheet.
- Add the new row in the config spreadsheet
- Deploy changes
You will need to copy the functions-key-dev.json
key file from the terraform project to the functions
directory in order to have permissions to hit the staging config spreadsheet.
The download service is hosted in Cloud Run since it requires a custom Docker container. The are npm scripts for building and running the container for local development. If you are working on the download service itself, you can run the "Dev Containers: Reopen in Container" command in VSCode. This will give you the ability to use the python environment defined in the Dockerfile with VSCode extensions. It also has a launch config allowing you to debug the service. Don't forget to run npm run dev:firebase
to start the emulator since the download service depends on it.
This is accomplished via Google Apps Scripts. An example script and json config can be found in the src/apps-script
directory. This is accessible via the "Deployment" menu -> "Deploy Configs to..." item in both of the config spreadsheets.
Note that the Apps Scripts GCP project needs to be pointed at the same GCP project as the hosting project.
To grant someone access to be able to use the deploy script, add them to the "[email protected]" google group.
This blog post was a good reference for setting it up.