# 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)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.growthepie.com/recipes-tutorials/recipes/compare-chains-over-time.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
