---
name: nostalgia_index
description: >
  Wikipedia pageviews as a cultural pulse: a normalized nostalgia index, Shiny app and CLI. Use when writing Python code that uses the nostalgia_index package.
compatibility: Requires Python >=3.10.
---

# Nostalgia Index

Wikipedia pageviews as a cultural pulse: a normalized nostalgia index, Shiny app and CLI.

## Installation

```bash
pip install nostalgia_index
```

## API overview

### Dataclasses

Dataclass definitions

- `NostalgiaIndex`: Compute and hold the nostalgia index for one or more topics

### Functions

Utility functions

- `fetch_project_total`: Fetch total daily views for a project (``/aggregate/`` endpoint), used as the denominator
- `fetch_views`: Fetch daily pageviews for a single Wikipedia article
- `run_app`: Launch the Nostalgia Index Shiny app

## Resources

- [llms.txt](llms.txt) — Indexed API reference for LLMs
- [llms-full.txt](llms-full.txt) — Comprehensive documentation for LLMs
