Skip to content

Converts Environment and Climate Change Canada's SWOB-ML XML files to JSON

Notifications You must be signed in to change notification settings

cioos-siooc/swob-to-json

Repository files navigation

Python package

Surface Weather Markup Language (SWOB) to JSON

Converts Environment and Climate Change Canada's SWOB-ML XML files to JSON.

SWOB is Surface Weather and Marine Observation Markup Language, the format is described in docs here

Installation

  1. Create a new python environment if required. eg python -m venv venv && source venv/bin/activate
  2. pip install --upgrade https://github.com/cioos-siooc/swob_to_json/tarball/main

Command line usage

  1. python -m swob_to_json /test_files/input_xml/2023-02-01-0615-46036-AUTO-swob.xml
  2. See example output file - /test_files/output_json/2023-02-01-0615-46036-AUTO-swob.xml.json

Module Usage

from swob_to_json import swob_to_json

swob_json = swob_to_json.parseFile(filename)
# or
swob_json = swob_to_json.parseText(xml_string)

Links

About

Converts Environment and Climate Change Canada's SWOB-ML XML files to JSON

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published