> For the complete documentation index, see [llms.txt](https://docs.growthepie.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.growthepie.com/recipes-tutorials/recipes/compare-chains-over-time.md).

# Compare Chains Over Time

This recipe compares transaction count across several chains using the public `txcount` export. Use this recipe when you want a normalized notebook workflow for multi-chain comparisons.

## Example

```python
import pandas as pd
import requests

url = "https://api.growthepie.com/v1/export/txcount.json"
rows = requests.get(url, timeout=30).json()

df = pd.DataFrame(rows)
df["date"] = pd.to_datetime(df["date"])

chains = ["arbitrum", "base", "optimism"]
subset = df[df["origin_key"].isin(chains)]

pivot = subset.pivot_table(
    index="date",
    columns="origin_key",
    values="value",
    aggfunc="sum"
).sort_index()

print(pivot.tail())
```

## Related Pages

* [txcount](/metric-reference/metric-reference/txcount.md)
* [Plot A Timeseries](/recipes-tutorials/recipes/plot-a-timeseries.md)
