PATSTAT Explorer Documentation Index
Generated: 2026-02-01 | Scan Level: Deep | Project Type: Data Analytics
Attribute
Value
Type
Monolith - Data Analytics Application (Modular Architecture)
Primary Language
Python
UI Framework
Streamlit >= 1.28.0
Database
Google BigQuery (~450 GB)
AI Integration
Anthropic Claude (Query Builder)
Data Source
EPO PATSTAT 2025 Autumn Edition
Item
Value
Entry Point
app.py (72 lines)
Modules
modules/ (1,802 lines total)
Queries
queries_bq.py (42 queries, 3,893 lines)
Tests
tests/ (5 test files)
Live Demo
patstatexplorer.depa.tech
This application serves as a bridge to TIP for 300 PATLIB centres, delivering:
42 ready-to-use parameterized queries
No-code parameter adjustment
AI-powered query generation
Direct export to TIP Jupyter environment
┌─────────────────────────────────────────────────────────────┐
│ Coolify (patstatexplorer.depa.tech) │
│ ┌───────────────────────────────────────────────────────┐ │
│ │ app.py (72 lines) │ │
│ │ Entry Point + Router │ │
│ └───────────────────────┬───────────────────────────────┘ │
│ │ │
│ ┌───────────────────────▼───────────────────────────────┐ │
│ │ modules/ (1,802 lines) │ │
│ │ config.py │ data.py │ logic.py │ ui.py │ utils.py │ │
│ └───────────────────────┬───────────────────────────────┘ │
│ │ │
│ ┌───────────────────────▼───────────────────────────────┐ │
│ │ queries_bq.py (42 queries) │ │
│ └───────────────────────┬───────────────────────────────┘ │
└──────────────────────────┼──────────────────────────────────┘
│
▼
┌─────────────────┐
│ Google BigQuery │
│ 27 tables │
│ ~450 GB │
└─────────────────┘
Feature
Description
Question-Based Navigation
Queries presented as questions, filtered by category/stakeholder
Dynamic Parameters
Year range, jurisdictions, tech fields via UI controls
AI Query Builder
Natural language → SQL using Claude
Take to TIP
Export ready-to-run code for TIP Jupyter
Visualization
Auto-generated Altair charts
Contribution
Users can submit new queries
Total: 42 queries organized by category and stakeholder
Category
Count
Description
Trends
12
Time-series analysis, growth patterns
Competitors
10
Applicant rankings, market share
Regional
8
Geographic analysis, NUTS regions
Technology
12
IPC/CPC/WIPO field analysis
Tag
Count
Description
PATLIB
25
Patent libraries, information centers
BUSINESS
20
Companies, industry users
UNIVERSITY
15
Researchers, academia
Module
Lines
Responsibility
config.py
123
Constants, color palette, AI prompt
data.py
156
BigQuery client, query execution
logic.py
238
Business logic, AI, filtering
ui.py
1,193
All Streamlit rendering
utils.py
84
Pure helper functions
git clone https://github.com/herrkrueger/patstat.git
cd patstat
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env # Add credentials
streamlit run app.py
Add entry to queries_bq.py with unique ID
Include metadata: title, tags, category, description
Define parameters for dynamic queries
Set visualization config for charts
Run pytest tests/test_query_metadata.py
Document
Location
TIP4PATLIB Specification
context/BPM001977_Technical_Specifications__TIP4PATLIB.pdf
README
README.md
Visit patstatexplorer.depa.tech
Browse queries by category (Competitors, Trends, Regional, Technology)
Filter by stakeholder tag (PATLIB, BUSINESS, UNIVERSITY)
Run a query, adjust parameters, download results
Use "Take to TIP" to export to Jupyter
Read Project Overview for architecture
Study Query Design Patterns for SQL patterns
Review What Worked Well for design decisions
Check tests/ for validation patterns
Copy Query Design Patterns for query structure
Apply lessons from What Worked Well
Use query-as-data pattern for rich metadata
Build TIP export from day one