jessiesdata

Scripts

downloadEcoData.ts

Downloads ecological data from policysupport.org and saves it to blob storage. The script:

  • Fetches CSV data from the specified URL
  • Saves the data to blob storage with a timestamped key
  • Also saves the data with a consistent key "eco_data_latest" for easy access to the most recent data

To run this script manually, you can call it directly. To schedule it to run automatically, you can set up a cron trigger in the Val Town web UI.

viewEcoData.ts (HTTP)

Renders the ecological data from blob storage in a clean, interactive HTML table. Features:

  • Displays data in a responsive, well-formatted table
  • Allows sorting by clicking on column headers
  • Includes search functionality to filter the table
  • Provides a download button to export the data as CSV
  • Highlights search matches in the table

This val requires that data has been previously downloaded using the downloadEcoData.ts script.