How to validate DAS metadata in JSON
Completion requirements
This notebook demonstrates a workflow for accessing and validating Distributed Acoustic Sensing (DAS) metadata.
Steps covered:
- Environment Setup: Installation of
boto3(for S3 access) andjsonschema(for data validation); - S3 Data Retrieval: Configures a
boto3client to access a public S3 endpoint (GFZ Potsdam) using unsigned requests. It downloads a metadata file named3u2023.json - Schema Fetching: Uses the
requestslibrary to fetch the official FDSN DAS-Metadata JSON schema (v2.0) from GitHub; - Validation:
- Initial validation of the downloaded metadata against the schema to ensure compliance.
- A demonstration of how schema validation works by intentionally
introducing a type error (changing an array to a string) and showing the
resulting
ValidationError
Click on How to validate DAS metadata in JSON to open the resource.