Skip to content

DocPothos/gender-time-machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Gender Norms Time Machine ⏳

A personal journey through a century of gender expectations

Python Streamlit Anthropic Claude


Why I Built This

This app was born from a personal realization.

Growing up surrounded by the heteronormativity of the 1980s and 1990s, I didn't understand that I was queer until decades later. I didn't have the language for it. I didn't have the role models. I didn't have the cultural permission to even ask the question. That clarity didn't arrive until 2020 — well into adulthood.

It left me sitting with a question I couldn't shake: how different might my journey have been if I'd grown up with today's visibility, language, and representation?

The Gender Norms Time Machine is my attempt to explore that question — not just for myself, but for anyone who grew up feeling that something didn't quite fit, without the words or the world to understand why.


The Problem

Gender norms aren't just abstract social constructs. They shape what children are allowed to want, how they're permitted to move through the world, what futures they can imagine for themselves. And those norms have changed enormously over the past hundred years — sometimes slowly, sometimes in lurches.

But most of us experience our own era as simply the way things are. We don't have a reference point. We don't know what we weren't allowed to know.

The result is that millions of people carry unexamined wounds from growing up in eras with rigid, often harmful gender expectations — without ever having the chance to name what happened to them, understand its historical context, or imagine an alternative.


The Solution

The Gender Norms Time Machine uses AI to help people do exactly that — in a personal, grounded, and compassionate way.

You tell it a little about yourself: your birth year, your gender identity, your sexuality, and how you experienced gender growing up. It situates you in your historical moment, draws on rich cultural and historical data about gender norms across the 20th and 21st centuries, and then:

  • Shows you your era — with data visualizations tracking how gender norms shifted across a century
  • Asks you three reflection questions personalized to your specific identity and the decade you came of age in
  • Writes you a narrative about how the gender norms of your era would have shaped your particular experience
  • Imagines an alternative — what would your life have looked like if you'd grown up in the 2020s, with today's visibility, communities, language, and representation?

The result is something between a history lesson, a therapy prompt, and a letter to your younger self.


App Flow

The experience unfolds across four pages:

1. Welcome A brief introduction to the app and the personal motivation behind it. You'll see the creator's pull-quote and a description of what the experience involves.

2. About You A short form asking for your birth year, gender identity, sexuality, whether you felt pressure to conform to gender norms, and whether you felt different from your peers. As soon as you enter your birth year, an "Era at a Glance" card appears — showing you the decades you grew up across, with a historical image and key facts about gender during those years.

3. Reflection Questions Three AI-generated reflection questions, personalized to both your identity and your historical era. These are open-ended and introspective — designed to help you access your own memories and feelings, not to test you. You answer them in a simple form.

4. Your Story The results page has three sections:

  • Your Era — a century-wide chart showing how each gender norm dimension evolved, plus a comparison bar chart showing how your growing-up era compares to the 2020s
  • How Those Years Shaped You — a 250–300 word AI-generated narrative in second person, drawing on your identity, your era, and your reflection answers
  • What If You'd Grown Up in the 2020s? — a hopeful, affirming narrative imagining the resources, language, communities, and representation that would have been available to you today
  • A shareable card summarizing your story

Tech Stack

Layer Technology
Frontend & app framework Streamlit
AI narrative generation Anthropic Claude API (claude-sonnet-4-20250514)
Data visualization Plotly
Historical data Hand-curated JSON (data/decades.json) covering 1920s–2020s
Environment management python-dotenv
Language Python 3.10+

The AI does three distinct jobs in this app: generating personalized reflection questions, writing the "How Those Years Shaped You" narrative, and writing the "What If" narrative. Each uses a carefully crafted system prompt to ensure the output is empathetic, historically grounded, and respectful of LGBTQ+ identities.


Running Locally

Prerequisites

Setup

# 1. Clone the repository
git clone https://github.com/yourusername/gender-time-machine.git
cd gender-time-machine

# 2. Create and activate a virtual environment
python -m venv venv
source venv/bin/activate        # macOS/Linux
venv\Scripts\activate           # Windows

# 3. Install dependencies
pip install -r requirements.txt

# 4. Set up your API key (see below)

# 5. Run the app
streamlit run app.py

The app will open in your browser at http://localhost:8501.


API Key Setup

This app requires an Anthropic API key to generate the AI-powered reflection questions and narratives.

  1. Get a key at console.anthropic.com
  2. Copy the example environment file:
    cp .env.example .env
  3. Open .env and add your key:
    ANTHROPIC_API_KEY=your_key_here
    
  4. Restart the app

The app will show a warning banner if no API key is found. The data visualizations and historical context still work without a key — only the AI narrative generation requires it.


Project Structure

gender-time-machine/
├── app.py                        # Main Streamlit app and all page logic
├── core/
│   └── timeline_engine.py        # Data loading, decade context building, era calculations
├── services/
│   └── ai_generator.py           # Claude API calls for all three AI functions
├── visualization/
│   └── charts.py                 # Plotly chart definitions
├── prompts/
│   └── reflection_prompt.txt     # Base system prompt for reflection question generation
├── data/
│   └── decades.json              # Historical gender norm data, 1920s–2020s
├── images/                       # Decade images and what-if section photos
├── .env.example                  # Template for API key setup
└── requirements.txt

The Data

decades.json contains hand-curated historical data for each decade from the 1920s through the 2020s. Each decade entry includes:

  • A contextual narrative describing the era
  • Gender norms for women and men
  • Dominant cultural expectations
  • Key historical events related to gender
  • Cultural touchstones (films, books, figures)
  • Quantified scores (0–10 scale) across six dimensions:
    • Norm Rigidity — how rigid and enforced gender roles were
    • Work Access (Women) — access to professional and economic life
    • Political Power (Women) — representation in political and civic life
    • Appearance Pressure — social pressure around gendered appearance
    • Sexuality/Gender Openness — visibility and acceptance of LGBTQ+ identities
    • Domestic Role Expectation — pressure to occupy domestic/caretaking roles

These scores power the visualizations and provide structured context to the AI.


Ethical Considerations

This app deals with sensitive personal history and identity. A few things worth being transparent about:

AI limitations. The narratives are generated by a language model. They can be moving and insightful, but they are not a substitute for therapy, community, or genuine human connection. They reflect patterns in historical data and training — not perfect truth about any individual's experience.

Generalization. Gender norms varied significantly by geography, class, race, religion, and community, in ways this app cannot fully capture. The historical data reflects primarily Western, English-language contexts. A person's actual experience of any given decade depended enormously on factors beyond gender identity and birth year.

Identity options. The identity options in the form are not exhaustive. They are a starting point for personalization, not a definitive taxonomy of human experience.

Privacy. No data entered into this app is stored or transmitted anywhere other than to the Anthropic API for narrative generation. Nothing is logged or persisted beyond your browser session.


Future Improvements

Some directions this could go:

  • Community stories — an opt-in way to share your narrative and read others', creating a collective archive of how gender shaped different generations
  • Geographic nuance — adjust historical context by country or region, since norms differed significantly outside the US
  • More identity dimensions — disability, race, class, and religion all intersected with gender norms in powerful ways that aren't yet captured here
  • Decade-specific archival photography — richer visual immersion using curated historical images
  • Therapist/educator mode — a version designed for guided group use in educational or therapeutic contexts
  • Multilingual support — making this accessible to non-English speakers whose experiences aren't centered in the current data

Credits

Built with:

  • Streamlit — for making it possible to build a beautiful web app entirely in Python
  • Anthropic Claude — for the AI that brings the narratives to life
  • Plotly — for the data visualizations

And built for everyone who grew up not quite having the words for who they were.


"How different might my journey have been if I'd grown up with today's visibility, language, and representation?"

— The Creator

About

An interactive AI-powered app exploring how historical gender norms shape identity discovery timelines — combining educational context with personalized reflection.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages