# Running the app

The Shiny app wraps the same pipeline in an interface for comparing topics side by side. Launch it from the command line (the port defaults to 8000).

``` bash
nostalgia run --port 8000
```

You can also launch it from Python with [run_app()](../reference/run_app.md#nostalgia_index.run_app).

``` python
from nostalgia_index import run_app
run_app(port=8000)
```


# Computing an index

The sidebar holds every input the index needs. Work through it from top to bottom.


*\[Rich HTML output -- view on the documentation site\]*


1.  Choose articles in Topics, or click a preset button (Sports, Games, TV, and so on) to load a curated set. To add an article that isn't listed, type its title in Add an article and click Add. The app resolves redirects and warns you if no article exists.
2.  Set Smoothing (days) to control the rolling median window (7 to 90 days, default 28).
3.  Set the Date range. Data is available from 2015-07-01.
4.  Click Compute index.

The app doesn't fetch or recompute anything until you click Compute index, so you can adjust several settings first.

> **Note: Note**
>
> The baseline is the first 12 months of the date range you select. Moving the start date moves the baseline, so the same topic can show different index values across date ranges.


# Starter topics

The topic dropdown starts with 92 articles in 8 categories. Michael Jordan and Nintendo 64 are selected by default, and each category has a preset button that selects its whole group.

| Category | Count | Topics |
|----|----|----|
| Sports | 17 | Michael Jordan, Chicago Bulls, Space Jam, Shaquille O'Neal, Ken Griffey Jr., Sammy Sosa, Mark McGwire, Derek Jeter, Brett Favre, Dale Earnhardt, Tiger Woods, Mike Tyson, Attitude Era, WCW Monday Nitro, 1996 Summer Olympics, 1992 United States men's Olympic basketball team, Topps |
| Games | 21 | Oregon Trail II, Super Mario Bros., Nintendo 64, GoldenEye 007, Mario Kart 64, Super Smash Bros., Sega Genesis, Game Boy, Game Boy Color, PlayStation (console), Pokémon Red, Blue, and Yellow, Mortal Kombat, Street Fighter II, NBA Jam, Madden NFL, Tony Hawk's Pro Skater, Halo: Combat Evolved, Counter-Strike, StarCraft, RuneScape, Xbox network |
| TV | 13 | Dawson's Creek, Glee (TV series), One Tree Hill (TV series), Gossip Girl, Dragon Ball Z, Toonami, Cartoon Network, Nickelodeon, Teenage Mutant Ninja Turtles, Mighty Morphin Power Rangers, Cowboy Bebop, Beavis and Butt-Head, Jackass (franchise) |
| Music | 15 | Taylor Swift, Beyoncé, Backstreet Boys, Michael Jackson, Eminem, Weezer, The Pussycat Dolls, Alanis Morissette, Britney Spears, The Eras Tour, Blink-182, Linkin Park, Limp Bizkit, Green Day, Wu-Tang Clan |
| Films | 6 | Mean Girls, Barbie (film), Star Wars, The Matrix, Fight Club, American Pie (film) |
| Books | 3 | Harry Potter, Twilight (novel series), The Hunger Games |
| Toys | 8 | Lego, Nerf, Hot Wheels, Transformers, Beyblade, Magic: The Gathering, Yu-Gi-Oh!, Milk caps (game) |
| Tech | 9 | Instant camera, Phonograph record, Blockbuster (retailer), Napster, LimeWire, AIM (software), Myspace, Mountain Dew, Jolt Cola |

Type any other article title into the box and click Add to include it.


# Reading the results

The value boxes across the top show the topic with the highest peak, the biggest comeback (the largest current change versus baseline), and the total number of revival events. The tabs below them hold the index chart, the revival events table, a comparison grid, and a short summary of the methodology.


# Recap

Launch the app with `nostalgia run` or [run_app()](../reference/run_app.md#nostalgia_index.run_app), pick your topics and settings in the sidebar, and click Compute index. Keep the start date in mind when comparing runs, because it sets the baseline.
