$ show danvk/oldnyc
Old NYC is a Python application that processes historical photographs from the NYPL Digital Collections to create a geolocated, searchable archive. The system ingests metadata, applies OCR to extract text from images, geocodes photos using multiple strategies (title patterns, subject matching, GPT, and a Manhattan grid model), incorporates user feedback corrections, and generates a static website for public access. The architecture follows a modular pipeline design with pluggable geocoders, isolated utility modules, and clear separation of concerns between data processing and presentation. While the project relies on external APIs and contains some legacy shell scripts, it demonstrates active maintenance and thoughtful engineering in handling historical data ambiguities.
The LLM identified 4 files worth highlighting for reuse:
Defines a Coder protocol that enables pluggable geocoding strategies. Each coder (title_pattern, subjects, gpt, special_cases) implements the get_codes method independently, allowing easy extension and testing of new geocoding methods without modifying core logic. Demonstrates strong separation of concerns and runtime polymorphism.
Implements a grid-based interpolation system for historical Manhattan addresses. Converts alphanumeric grid references (e.g., '(10, 44)') to latitude/longitude by interpolating between known street intersections. Solves a niche geocoding problem for early 20th century NYC addresses with non-obvious mathematical approach.
Provides a configurable pipeline for cleaning OCR output through sequential application of regex-based corrections. Handles common OCR errors like character misreadings, spacing issues, and formatting inconsistencies. The modular design allows easy customization of cleaning rules for different OCR engines or document types.
Parses ambiguous historical date expressions (e.g., 'circa 1920', '1920s', 'Fall 1923') into structured date ranges or specific dates. Handles multiple formats and uncertainties common in archival metadata. The isolated module provides reusable logic for normalizing imprecise temporal data in historical research.