A modern, interactive web application for exploring word frequencies in the National Library of Norway's digital collections. This tool allows users to analyze and visualize how word usage has evolved over time in both books and newspapers. Here is a link N-gram to explore the viewer.
-
Interactive Word Frequency Analysis
- Search multiple words simultaneously
- Compare frequencies across different corpora (books and newspapers)
- Support for multiple languages (Bokmål, Nynorsk, Sami languages, and Kven)
- Real-time visualization updates
-
Advanced Visualization Options
- Relative frequency view
- Absolute frequency view
- Cumulative frequency analysis
- Cohort analysis for comparing proportions
- Smooth data visualization with adjustable year ranges
- Interactive zoom and pan capabilities
-
User-Friendly Interface
- Clean, modern design
- Intuitive drag-to-zoom functionality
- Touch-device support
- Responsive layout for all screen sizes
- Easy-to-use language and corpus selection
-
Data Export Options
- Download visualizations as PNG
- Export data as CSV
- Export data as Excel spreadsheet
- React
- Chart.js for visualizations
- React-Bootstrap for UI components
- DH-Lab API for N-gram data
- Year range limits (1810-2025) for data consistency
- Smoothing algorithm for trend visualization
- Case-sensitive search options
- Multi-language support with proper localization
- Responsive design for mobile and desktop
node >= 14.0.0
npm >= 6.14.0# Clone the repository
git clone https://github.com/Yoonsen/ngram-pwa-new.git
# Install dependencies
cd ngram-pwa-new
npm install
# Start development server
npm startnpm run buildnpm run buildbuilds for GitHub Pages (/ngram).npm run build:nbbuilds for NB production path (/ngram).
This project serves as a case study for AI-assisted development, particularly in transitioning between different programming ecosystems. It demonstrates how teams with expertise in one technology stack (Python) can successfully develop modern web applications using different technologies (JavaScript/React) with AI assistance.
- Successfully converted from Python/Dash/Plotly to React/JavaScript
- Maintained full functionality while modernizing the technology stack
- Achieved smooth transition despite team's primary Python background
- Preserved complex visualization features while improving user experience
- AI tools provided contextual guidance for JavaScript/React ecosystem
- Handled complex transitions in:
- Component architecture
- State management
- Modern UI implementation
- API integration
- Translated Python development patterns to JavaScript equivalents
- Maintained code quality and best practices across languages
- Human expertise driving:
- Data visualization requirements
- Library selection
- User experience design
- Domain-specific features
- AI assistance with:
- Technical implementation
- Code structure
- Best practices
- Documentation
- Problem-solving
- Bilingual documentation (English/Norwegian)
- Clear technical documentation accessible to Python developers
- Detailed development logging
- Comprehensive feature documentation
This approach demonstrates how AI tools can effectively bridge technical gaps, enabling teams to:
- Venture beyond their primary technology stack
- Implement modern web development practices
- Maintain high code quality
- Focus on domain expertise while letting AI handle technical details
- National Library of Norway's DH-Lab for the N-gram API
- Cursor AI for assistance in codebase conversion and development
- ChatGPT AI for pair programming support
- The open-source community for various tools and libraries
This project is licensed under the MIT License - see the LICENSE file for details.