code: def prepare_bikesharing_data():
      """Loads bike-sharing data and adds proper regressors."""
      dl = DataLoaderTS()
      agg_func = {
          "count": "sum",
          "tmin": "mean",
          "tmax": "mean",
          "pn": "mean",
      }
      df = dl.load_bikesharing(agg_freq="daily", agg_func=agg_func)
  
      # There are some zero values which cause issue for MAPE
      # This adds a small number to all data to avoid that issue
      value_col = "count"
      df[value_col] += 10
      # We drop last value as data might be incorrect as original data is hourly
      df.drop(df.tail(1).index, inplace=True)
      # We only use data from 2018 for demonstration purposes (run time is shorter)
      df = df.loc[df["ts"] > "2018-01-01"]
      df.reset_index(drop=True, inplace=True)
  
      print(f"\n df.tail(): \n {df.tail()}")
  
      # Creates useful regressors from existing raw regressors
      df["bin_pn"] = (df["pn"] > 5).map(float)
      df["bin_heavy_pn"] = (df["pn"] > 20).map(float)
      df.columns = [
          "ts",
          value_col,
          "regressor_tmin",
          "regressor_tmax",
          "regressor_pn",
          "regressor_bin_pn",
          "regressor_bin_heavy_pn",
      ]
  
      forecast_horizon = 7
      train_df = df.copy()
      test_df = df.tail(forecast_horizon).reset_index(drop=True)
      # When using the pipeline (as done in the ``fit_forecast`` below),
      # fitting and prediction are done in one step
      # Therefore for demonstration purpose we remove the response values of last 7 days.
      # This is needed because we are using regressors,
      # and future regressor data must be augmented to ``df``.
      # We mimic that by removal of the values of the response.
      train_df.loc[
          (len(train_df) - forecast_horizon) : len(train_df), value_col
      ] = None
  
      print(f"train_df shape: \n {train_df.shape}")
      print(f"test_df shape: \n {test_df.shape}")
      print(f"train_df.tail(14): \n {train_df.tail(14)}")
      print(f"test_df: \n {test_df}")
  
      return {"train_df": train_df, "test_df": test_df}
  
file_path: greykite/docs/nbpages/quickstart/02_interpretability/0200_interpretability.py
imports: import plotly
  import warnings
  import pandas
  from greykite.framework.benchmark.data_loader_ts import DataLoaderTS
  from greykite.framework.templates.autogen.forecast_config import EvaluationPeriodParam
  from greykite.framework.templates.autogen.forecast_config import ForecastConfig
  from greykite.framework.templates.autogen.forecast_config import MetadataParam
  from greykite.framework.templates.autogen.forecast_config import ModelComponentsParam
  from greykite.framework.templates.forecaster import Forecaster
  from greykite.framework.templates.model_templates import ModelTemplateEnum
  from greykite.framework.utils.result_summary import summarize_grid_search_results
  from greykite.common.viz.timeseries_plotting import plot_multivariate
label_desc: Use image node_id 1 for calling a global function with example usage: prepare_bikesharing_data() and returns: dict