日本語 | English
A smartphone-friendly tool for recording and analyzing migraine data with multiple contributing factors.
Built with Google Apps Script + Open-Meteo API + Google Sheets.
- 🌡 Multi-factor tracking — Barometric pressure, lunar phase, sleep, and more
- ⚡ Auto data fetch — Pressure & lunar data retrieved automatically via API
- 🧙 7-step Wizard UI — Minimizes input effort on mobile
- 🔄 Edit mode — Update past records anytime
- ✅ Duplicate check — Prevents accidental double entries
- Google Apps Script
- Open-Meteo API (barometric pressure)
- Google Sheets
⏱ Takes about 10 minutes. No programming knowledge needed!
You'll need: a Google account and an iPhone with Safari.
- Open Google Sheets in your browser
- Click "Blank" to create a new spreadsheet
- Give it a name (e.g.
Migraine Tracker)
- In the top menu, click "Extensions"
- Click "Apps Script"
💡 What is Apps Script?
It's a free tool provided by Google that lets you add custom features to Google Sheets. You don't need to understand the code — just paste it in!
- You'll see a code editor with some default text like
function myFunction() {}
- Select all of it and delete it
- Copy the entire code from
Code.gsand paste it into the editor. Then click the "+" button on the top left to add a new file, and paste the code fromindex.htmlthe same way - Paste it into the editor — it should look like this:
- Click the 💾 save icon (or press
Ctrl+S/Cmd+S)
This step gives you a personal URL for your tracker.
- Click "Deploy" in the top-right corner
- Select "New deployment"
- Click the ⚙️ gear icon next to "Type" and choose "Web app"
- Fill in the settings as shown below:
- Execute as:
Me - Who has access:
Anyone
- Execute as:
- Click "Deploy"
- You may be asked to authorize the app — click "Authorize access" and follow the prompts
- After deployment, you'll see a Web app URL — copy it and save it somewhere!
⚠️ Keep this URL private. Anyone with the link can view and add to your tracker.
- Open the Safari browser on your iPhone
- Paste your Web app URL (from Step 4) into the address bar and tap Go
- Confirm the tracker loads correctly
This makes the tracker feel like a native app!
- Tap the "..." button at the bottom right of Safari, then tap "Share"
- Scroll down and tap "Add to Home Screen"
- Give it a name (e.g.
Migraine Tracker) and tap "Add" - The icon will now appear on your iPhone home screen 🎉
📌 From now on, just tap the icon to open your tracker directly — no need to open Safari and type the URL each time.
Existing headache apps typically track only one factor (e.g. barometric pressure).
This tool was designed from a quality engineering perspective — inspired by design of experiments (DoE) — to capture and analyze multiple contributing factors simultaneously.
- Developed through AI collaboration (vibe coding)
- Heavily commented code — useful as a learning reference
偏頭痛の複合要因(気圧・月齢・睡眠など)を同時記録・分析できるスマホ向けツールです。
Google Apps Script + Open-Meteo API + Google スプレッドシート で動作します。
- 🌡 複合要因記録 — 気圧・月齢・睡眠・生理周期など複数要因を同時収集
- ⚡ データ自動取得 — 気圧・月齢データをAPIで自動取得
- 🧙 7ステップWizard UI — スマホでの入力負荷を最小化
- 🔄 修正モード — 過去のデータをいつでも更新可能
- ✅ 重複チェック — 二重入力を自動で防止
- Google Apps Script
- Open-Meteo API(気圧データ)
- Google スプレッドシート
⏱ 所要時間:約10分。プログラミングの知識は不要です!
必要なもの:Google アカウント と iPhone(Safari)
- ブラウザで Google スプレッドシート を開く
- 「空白」 をクリックして新しいスプレッドシートを作成
- 名前をつける(例:
偏頭痛トラッカー)
- 上のメニューから 「拡張機能」 をクリック
- 「Apps Script」 をクリック
💡 Apps Script ってなに?
Google が提供している無料のツールで、スプレッドシートに独自の機能を追加できます。コードの内容は理解しなくてOK!貼り付けるだけで動きます。
- エディタ画面に最初から書いてある文字(
function myFunction() {}など)をすべて選択して削除する
- このリポジトリの
Code.gsにあるコードをまるごとコピーして貼り付ける。次に左上の 「+」ボタン から新規ファイルを追加し、index.htmlのコードも同様に貼り付ける - エディタに貼り付ける(こんな画面になればOK)
- 画面上の 💾 保存アイコン をクリック(または
Ctrl+S/Cmd+S)
このステップで、あなた専用のURLが発行されます。
- 画面右上の 「デプロイ」 をクリック
- 「新しいデプロイ」 を選択
- ⚙️ 歯車アイコンをクリックして 「ウェブアプリ」 を選ぶ
- 以下のように設定する:
- 次のユーザーとして実行:
自分 - アクセスできるユーザー:
全員
- 次のユーザーとして実行:
- 「デプロイ」 をクリック
- 「承認が必要です」と表示されたら 「アクセスを承認」 をクリックして進む
- デプロイ完了後に ウェブアプリのURL が表示されるのでコピーして保存しておく
⚠️ このURLは他人に教えないようにしましょう。 リンクを知っている人は誰でもあなたのデータにアクセスできます。
- iPhone の Safari ブラウザを開く
- アドレスバーにステップ④で取得したウェブアプリのURLを貼り付けて 「開く」 をタップ
- トラッカーが正しく表示されることを確認する
アプリのように使えるようになります!
- Safari 右下の 「…」ボタン をタップして 「共有」 を選ぶ
- 「ホーム画面に追加」 をタップ
- 名前を入力して(例:
偏頭痛トラッカー)「追加」 をタップ - ホーム画面にアイコンが追加されます 🎉
📌 次回からはホーム画面のアイコンをタップするだけで起動できます!
既存の頭痛アプリは気圧など単一要因しか追跡できません。
偏頭痛には複数の要因が絡むと考え、富士ゼロックス時代の実験計画法・要因効果分析の経験を活かして自作しました。
治験ボランティアの経験から生まれた当事者視点の設計が特徴です。
- AIとの協働(バイブコーディング)で開発
- コード内にコメントをたっぷり入れてあるので、学習用としても参考になります