canopy.json

canopy.json.json_functions

canopy.json.json_functions.distribution(json_config)[source]
canopy.json.json_functions.latitudinal_plot(json_config)[source]
canopy.json.json_functions.map_diff(json_config)[source]
canopy.json.json_functions.map_simple(json_config)[source]
canopy.json.json_functions.preprocess_data(json_config)[source]

Preprocess data based on configuration settings provided in a JSON object.

This includes loading a field, applying reductions, and optionally transforming or dropping layers.

canopy.json.json_functions.static(json_config)[source]
canopy.json.json_functions.time_series(json_config)[source]

canopy.json.json_registry module

canopy.json.json_registry.get_json_function(json_config)[source]

Get the appropriate function from the registry based on the json_config.

canopy.json.json_registry.register_json(func)[source]

Decorator to register a function in the json_function_registry.

canopy.json.run_json module

canopy.json.run_json.load_json_config(file_path)[source]
canopy.json.run_json.run_json(config_file)[source]

Run a function based on the JSON configuration file.

Parameters:

config_file (str) – Path to the JSON configuration file.

Notes

This function loads the configuration from the specified JSON file, retrieves the appropriate function from the registry, and executes it with the configuration as an argument.

canopy.json.run_json.warn_unused_keys(json_config, expected_keys)[source]