Skip to content

Frontend meeting notes

Thad Kerosky edited this page Oct 17, 2023 · 6 revisions

2023 Sept 5

How to add Pyodide to the window for experimentation:

declare global {
    interface Window { pydd: any; }
}

(add below after pyodide await in root.tsx)
window.pydd = window.pyodide || {};

2023 Aug 30

Frontend-Pyodide Questions

  • How to manage the state of loading and errors of Pyodide (useFetcher?, router's useActionData, useLoaderData)
  • How to retain the pyodide globals between react re-renders and
    • Not for now: maybe page refreshes (in Remix backend server?).
  • Not for now: caching Pyodide WASM Module and NumPy so it doesn't re-download.

Weather

Use Archive to retrieve archival weather (do not use for last 6-7 days of weather)

Geocode address
    use to lookup county from [design_temp_by_county.csv](https://github.com/codeforboston/home-energy-analysis-tool/blob/main/design_temp/design_temp_by_county.csv) and handle edge cases where counties may not match somehow.
Get timezone
Historical archival records API: https://archive-api.open-meteo.com/v1/archive?latitude=52.52&longitude=13.41&daily=temperature_2m_max&timezone=America%2FNew_York&start_date=2022-01-01&end_date=2023-08-30&temperature_unit=fahrenheit
Current week forecast API: https://api.open-meteo.com/v1/forecast?latitude=52.52&longitude=13.41&daily=temperature_2m_max&timezone=America%2FNew_York&past_days=5&forecast_days=1&temperature_unit=fahrenheit
Clone this wiki locally