Hasty Briefsbeta

Observable Notebooks Data Loaders

4 days ago
  • #Observable Notebooks
  • #Data Loaders
  • #Node.js Python
  • Data loaders in Observable Notebooks run at build time for static data preparation, ensuring consistency and performance.
  • Supported languages for data loaders include Node.js and Python, with potential for more in the future.
  • Data loaders support various text-based (e.g., JSON, CSV) and binary formats (e.g., Arrow, Parquet), as well as image and HTML formats.
  • Outputs from data loaders are saved in a local `.observable/cache` directory, with stable snapshots that update only upon re-running the cell.
  • Node.js data loaders require Node.js 22.12+ and have security restrictions limiting file access to the notebook's directory.
  • Python data loaders require Python 3.12+ and can utilize virtual environments, but packages must be manually installed.
  • Examples include a Python cell printing a greeting and a Node.js cell fetching npm download statistics for Observable Plot.