diff --git a/geoplot.py b/geoplot.py index 6f264d1..0cf8f61 100644 --- a/geoplot.py +++ b/geoplot.py @@ -1,293 +1,144 @@ -""" -geoplot.py ----------- - -This visualization renders a 3-D plot of the data given the state -trajectory of a simulation, and the path of the property to render. - -It generates an HTML file that contains code to render the plot -using Cesium Ion, and the GeoJSON file of data provided to the plot. - -An example of its usage is as follows: - -```py -from agent_torch.visualize import GeoPlot - -# create a simulation -# ... - -# create a visualizer -engine = GeoPlot(config, { - cesium_token: "...", - step_time: 3600, - coordinates = "agents/consumers/coordinates", - feature = "agents/consumers/money_spent", -}) - -# visualize in the runner-loop -for i in range(0, num_episodes): - runner.step(num_steps_per_episode) - engine.render(runner.state_trajectory) -``` -""" - import re import json - import pandas as pd -import numpy as np - -from string import Template -from agent_torch.core.helpers import get_by_path +@@ -26,7 +25,6 @@ +# HTML template for Cesium visualization +# This template defines the structure and behavior of the Cesium-based visualization. +# It includes functions for interpolating colors, determining pixel sizes, and processing time-series data. geoplot_template = """ -
- - -