Simulated historical fossil emissions across time and mesh regions
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
# Simulated historical fossil emissions across time and mesh regions
np.random.seed(42)
time_windows = pd.date_range("2025-09-01", "2025-10-21", freq="D")
regions = ["NorthMesh", "SouthDrift", "EchoLattice", "BioSynapse", "QuantumThread"]
entries = []
for time in time_windows:
for region in regions:
entropy = np.clip(np.random.normal(loc=0.005, scale=0.0015), 0, 0.02)
coherence = np.clip(np.random.normal(loc=0.995, scale=0.002), 0.98, 1.0)
sentiment = np.random.choice(["positive", "neutral", "negative"], p=[0.4, 0.4, 0.2])
entries.append({
"timestamp": time,
"region": region,
"entropy": entropy,
"coherence": coherence,
"sentiment": sentiment
})
df = pd.DataFrame(entries)
# Group by week and region
df["week"] = df["timestamp"].dt.to_period("W")
agg_df = df.groupby(["week", "region"]).agg(
S_value=("entropy", "mean"),
C_value=("coherence", "mean"),
sentiment_distribution=("sentiment", lambda x: x.value_counts(normalize=True).to_dict())
).reset_index()
import ace_tools as tools; tools.display_dataframe_to_user(name="Entropy & Sentiment Tracking Summary", dataframe=agg_df)
Result
week region S_value C_value \
0 2025-09-01/2025-09-07 BioSynapse 0.005635 0.995634
1 2025-09-01/2025-09-07 EchoLattice 0.004483 0.995182
2 2025-09-01/2025-09-07 NorthMesh 0.004904 0.994467
3 2025-09-01/2025-09-07 QuantumThread 0.004964 0.994961
4 2025-09-01/2025-09-07 SouthDrift 0.003577 0.995868
sentiment_distribution
0 {'positive': 0.42857142857142855, 'neutral': 0...
1 {'neutral': 0.42857142857142855, 'positive': 0...
2 {'positive': 0.42857142857142855, 'neutral': 0...
3 {'positive': 0.5714285714285714, 'neutral': 0....
4 {'positive': 0.5714285714285714, 'negative': 0...
Comments
Post a Comment