climepi.app.run_app#
- climepi.app.run_app(clim_dataset_example_base_dir=None, clim_dataset_example_names=None, enable_custom_clim_dataset=False, custom_clim_data_dir=None, epi_model_example_names=None, enable_custom_epi_model=True, dask_distributed=False, **kwargs)[source]#
Run the climepi front-end application locally.
- Parameters:
clim_dataset_example_base_dir (
strorpathlib.Path) – Base directory for the example climate datasets, optional. IfNone, the datasets will be downloaded to and accessed from the OS cache.clim_dataset_example_names (
listofstr) – List of example names for climate datasets, optional. If None, the default list inclimdata.EXAMPLE_NAMESis used.enable_custom_clim_dataset (
bool) – Whether to enable the option to load a custom climate dataset. Default isFalse. IfTrue,xarray.open_mfdataset()will be called on all netCDF files in the directory specified bycustom_clim_data_dirif the loading of custom data is triggered.custom_clim_data_dir (
strorpathlib.Path) – Directory containing the custom climate dataset. Must be specified ifenable_custom_clim_datasetisTrue.epi_model_example_names (
listofstr) – List of example names for epidemiological models, optional. If None, the default list inepimod.EXAMPLE_NAMESis used.enable_custom_epi_model (
bool) – Whether to enable the option to specify a custom temperature range in which transmission can occur. Default isTrue.dask_distributed (
bool) – Whether to use the Dask distributed scheduler. Default isFalse. IfFalse, the Dask single-machine scheduler using threads will be used. To use the distributed scheduler, a Dask local cluster must be started from a separate terminal by runningpython -m climepi.app.clusterbefore starting the app.**kwargs – Additional keyword arguments to pass to
panel.serve().
- Returns:
panel.io.server.Serverorpanel.io.threads.StoppableThread– The server or thread running the app (return value ofpanel.serve()).