How dhruvbaslas/global-data-security-observatory works
The observatory combines a Python pipeline that gathers and scores national policy data with a client-side React application for browsing, comparing, ranking, and adding country frameworks. The graph emphasizes documented orchestration and sampled import relationships; unsampled implementation details are not inferred.
Main entry points: App.jsx Observatory app · ComparisonView.jsx Head-to-head comparison · scraper.py Statutory scraper · BestOfBest.jsx Best-of-best rankings
Components 24
Data pipeline
- Scraper entry point
scraper/main.py - Statutory scraper
scraper/scraper.py - Sources and settings
scraper/config.py - Scrape cache
scraper/cache.py - Data sanitizer
scraper/sanitizer.py - Country dataset
frontend/public/data/countries.json
Policy analysis
- Policy scoring
scraper/analyzer.py - Comparison scoring
frontend/src/utils/analysis.js
Country browsing
- Observatory app
frontend/src/App.jsx - Country data hook
frontend/src/hooks/useCountryData.js - Country filtering
frontend/src/components/CountryFilter.jsx - Country detail cards
frontend/src/components/CountryCard.jsx - Legal archetypes
frontend/src/utils/archetypes.js - Add country
frontend/src/components/AddCountry.jsx - Input sanitization
frontend/src/utils/sanitize.js - Navigation and notice
frontend/src/components/Header.jsx - Privacy notice
frontend/src/components/DataSecurityNotice.jsx
Comparison experience
- Head-to-head comparison
frontend/src/components/ComparisonView.jsx - Radar visualizer
frontend/src/components/ParameterRadar.jsx - Searchable selector
frontend/src/components/SearchableSelect.jsx - Best-of-best rankings
frontend/src/components/BestOfBest.jsx - Seven-language localization
frontend/src/utils/i18n.js
Other components
- Researcher
- Official sources
Connections 29
- Researcher → Observatory app: uses
README.md - Official sources → Statutory scraper: provides statutes
README.md - Scraper entry point → Statutory scraper: runs scraping
scraper/main.py - Scraper entry point → Policy scoring: scores countries
scraper/main.py - Scraper entry point → Country dataset: writes dataset
README.md - Statutory scraper → Sources and settings: uses settings
scraper/scraper.py - Statutory scraper → Scrape cache: reads and writes
scraper/scraper.py - Statutory scraper → Data sanitizer: sanitizes data
scraper/scraper.py - Policy scoring → Sources and settings: uses parameters
scraper/analyzer.py - Observatory app → Country data hook: loads countries
frontend/src/App.jsx - Country data hook → Country dataset: fetches dataset
frontend/src/hooks/useCountryData.js - Observatory app → Country filtering: renders filtering
frontend/src/App.jsx - Observatory app → Country detail cards: renders country cards
frontend/src/App.jsx - Observatory app → Head-to-head comparison: renders comparison
frontend/src/App.jsx - Observatory app → Best-of-best rankings: renders rankings
frontend/src/App.jsx - Observatory app → Add country: renders country form
frontend/src/App.jsx - Observatory app → Legal archetypes: filters archetypes
frontend/src/App.jsx - Country filtering → Legal archetypes: classifies countries
frontend/src/components/CountryFilter.jsx - Add country → Input sanitization: sanitizes input
frontend/src/components/AddCountry.jsx - Head-to-head comparison → Comparison scoring: calculates comparisons
frontend/src/components/ComparisonView.jsx - Head-to-head comparison → Legal archetypes: evaluates transfer adequacy
frontend/src/utils/archetypes.js - Head-to-head comparison → Radar visualizer: renders radar chart
frontend/src/components/ComparisonView.jsx - Head-to-head comparison → Searchable selector: selects countries
frontend/src/components/ComparisonView.jsx - Best-of-best rankings → Comparison scoring: ranks countries
frontend/src/components/BestOfBest.jsx - Best-of-best rankings → Radar visualizer: renders radar chart
frontend/src/components/BestOfBest.jsx - Navigation and notice → Privacy notice: renders notice
frontend/src/components/Header.jsx - Head-to-head comparison → Seven-language localization: translates interface
frontend/src/components/ComparisonView.jsx - Best-of-best rankings → Seven-language localization: translates rankings
frontend/src/components/BestOfBest.jsx - Navigation and notice → Seven-language localization: translates navigation
frontend/src/components/Header.jsx