<jupyter_start><jupyter_text>Simple demo of PV environment<jupyter_code>import matplotlib.pyplot as plt
import numpy as np
import pandas as pd

%load_ext autoreload
%matplotlib inline
%autoreload 2
from gridworld.agents.pv import PVEnv
# Create the environment.
env = PVEnv(
    name="pv",
    profile_csv="pv_profile.csv",
    scaling_factor=10.,
    rescale_spaces=False
)
# Run one episode of the environment using random actions, and plot
# the trajectory.

done = False
env.reset()
df = []
while not done:
    action = env.action_space.sample()
    obs, rew, done, meta = env.step(action)
    df.append((float(obs), rew, float(action.squeeze()), env.real_power))
    
df = pd.DataFrame(df, columns=["obs", "rew", "act", "real_power"])
_ = df.plot()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12388250319284802, 'fraction_numerical': 0.0038314176245210726, 'mean_word_length': 4.7226277372262775, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '328964', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 278, 'n_tokens_neox': 268, 'n_words': 73, 'path': 'examples/envs/pv.ipynb', 'repo_name': 'NREL/PowerGridworld', 'size': '783'}