Skip to content

Commit

Permalink
update data
Browse files Browse the repository at this point in the history
  • Loading branch information
taisukef committed Sep 6, 2023
1 parent 25f1790 commit cf44ec3
Show file tree
Hide file tree
Showing 5 changed files with 157 additions and 28 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/scheduled-backup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Scheduled

on:
schedule:
# 3:31分に実行 3(JST)-9+24=18(UTC)
- cron: '31 18 * * *'

jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: make
env:
SECRET_URL: ${{ SECRET_URL }}
run: |
deno run -A -r update.js $SECRET_URL
- name: commit and push
run: |
git config --global user.email "workflow@example.com"
git config --global user.name "workflow user"
git add .
git commit -m 'update data' && git push ${REPO} HEAD:${{github.event.pull_request.head.ref}} || true
git push
91 changes: 91 additions & 0 deletions data/2023-09-06.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
date_visit,n_stay,n_people,n_room,amount_fee,n_reserve
2023-09-06,18,36,12,1464720,15
2023-09-07,173,461,115,11420699,145
2023-09-08,207,576,128,13765438,187
2023-09-09,229,795,153,23009321,213
2023-09-10,234,604,107,13637686,180
2023-09-11,149,366,101,9578910,123
2023-09-12,113,341,75,8814867,101
2023-09-13,107,443,61,9248807,98
2023-09-14,99,1050,80,16830591,98
2023-09-15,131,373,140,11095425,100
2023-09-16,296,1185,186,32164979,245
2023-09-17,219,830,150,24936288,213
2023-09-18,139,346,70,7999827,116
2023-09-19,78,275,58,5212607,76
2023-09-20,92,236,64,5993110,79
2023-09-21,90,309,80,7352768,82
2023-09-22,156,577,115,15076724,142
2023-09-23,183,740,147,22463405,178
2023-09-24,184,458,108,10728015,135
2023-09-25,204,483,99,9573713,124
2023-09-26,85,295,67,6432255,73
2023-09-27,142,285,47,7029085,78
2023-09-28,147,335,86,7444946,109
2023-09-29,184,537,131,13552065,157
2023-09-30,164,576,121,15247822,151
2023-10-01,109,375,59,6506475,78
2023-10-02,62,234,42,5720090,52
2023-10-03,69,254,41,6433318,61
2023-10-04,33,163,37,3883740,33
2023-10-05,80,260,62,6531700,62
2023-10-06,118,440,85,10659454,108
2023-10-07,175,917,155,25867585,156
2023-10-08,187,1369,148,31195219,160
2023-10-09,34,100,44,2459887,30
2023-10-10,56,152,58,4420352,47
2023-10-11,21,301,72,6601470,20
2023-10-12,43,419,93,5078100,42
2023-10-13,100,757,123,14670031,94
2023-10-14,152,906,149,23319903,147
2023-10-15,115,476,105,11636805,108
2023-10-16,88,340,65,8054638,78
2023-10-17,46,270,37,5926040,45
2023-10-18,39,477,97,11251265,34
2023-10-19,55,355,77,8447352,52
2023-10-20,121,607,115,15307255,120
2023-10-21,122,743,135,21807643,120
2023-10-22,150,603,97,12529500,133
2023-10-23,67,329,69,7707050,59
2023-10-24,79,130,22,3761834,36
2023-10-25,48,401,62,4378506,47
2023-10-26,80,485,85,10111495,71
2023-10-27,107,418,77,10223958,105
2023-10-28,127,844,133,22461024,122
2023-10-29,109,492,92,11339830,99
2023-10-30,43,179,32,4667250,38
2023-10-31,24,223,16,4208880,22
2023-11-01,27,156,22,3150400,23
2023-11-02,65,240,57,6882945,63
2023-11-03,244,903,153,27510514,205
2023-11-04,153,665,117,20124140,131
2023-11-05,78,388,54,10693382,65
2023-11-06,35,325,53,6139500,34
2023-11-07,38,211,49,4702640,36
2023-11-08,62,406,66,11541858,59
2023-11-09,47,232,47,8687510,45
2023-11-10,117,474,91,15311771,113
2023-11-11,93,776,139,25279370,90
2023-11-12,98,540,92,16922476,91
2023-11-13,55,416,78,7771830,49
2023-11-14,35,325,72,8623400,33
2023-11-15,57,351,61,11471415,50
2023-11-16,50,321,60,13319333,48
2023-11-17,86,453,87,13623798,82
2023-11-18,121,680,113,22351140,121
2023-11-19,74,531,98,16096376,70
2023-11-20,65,247,39,7903710,53
2023-11-21,43,357,59,9567720,35
2023-11-22,50,210,30,6138990,44
2023-11-23,127,553,119,18423102,118
2023-11-24,110,511,92,17300898,110
2023-11-25,110,936,146,24264991,102
2023-11-26,75,391,82,11689103,72
2023-11-27,29,201,35,5558470,29
2023-11-28,17,269,29,4378750,17
2023-11-29,20,140,16,4686010,18
2023-11-30,18,152,9,4562100,18
2023-12-01,29,431,63,6549190,29
2023-12-02,77,730,112,18250427,75
2023-12-03,10,33,10,1468370,10
2023-12-04,7,93,14,2153600,7
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,15 @@ <h1>あわら温泉エリア 宿泊予約状況(データ出典:福井県観
//([occ, adr, revpar]);

showChart("chart", columns);
span_date.textContent = new Day(columns[0][1]).toString();
};
show();

</script>

<div class=caption>
福井県あわら温泉エリア、8つのホテルの予約状況を合算したオープンデータです。<br>
<a href=latest_rsv_sum.csv>CSVオープンデータ ダウンロード</a>」(2023/9/4現在
<a href=latest_rsv_sum.csv>CSVオープンデータ ダウンロード</a>」(<span id=span_date></span>現在
</div>
<a href=https://code4fukui.github.io/fukui-kanko-advice/area/11.html>福井県AI観光アドバイス - あわら湯のまち エリア</a><br>
<br>
Expand Down
54 changes: 27 additions & 27 deletions latest_rsv_sum.csv
Original file line number Diff line number Diff line change
@@ -1,91 +1,91 @@
date_visit,n_stay,n_people,n_room,amount_fee,n_reserve
2023-09-05,48,103,23,4129050,30
2023-09-06,18,36,12,1464720,15
2023-09-07,173,461,115,11420699,145
2023-09-08,207,576,128,13765438,187
2023-09-09,229,792,152,22960921,212
2023-09-10,233,602,106,13577986,179
2023-09-09,229,795,153,23009321,213
2023-09-10,234,604,107,13637686,180
2023-09-11,149,366,101,9578910,123
2023-09-12,113,341,75,8814867,101
2023-09-13,107,443,61,9248807,98
2023-09-14,99,1050,80,16830591,98
2023-09-15,130,371,139,11042325,99
2023-09-16,294,1177,184,31826499,243
2023-09-17,218,826,149,24793388,212
2023-09-18,140,348,71,8063927,117
2023-09-15,131,373,140,11095425,100
2023-09-16,296,1185,186,32164979,245
2023-09-17,219,830,150,24936288,213
2023-09-18,139,346,70,7999827,116
2023-09-19,78,275,58,5212607,76
2023-09-20,92,236,64,5993110,79
2023-09-21,90,309,80,7352768,82
2023-09-22,156,577,115,15076724,142
2023-09-23,184,743,148,22529855,179
2023-09-23,183,740,147,22463405,178
2023-09-24,184,458,108,10728015,135
2023-09-25,204,483,99,9573713,124
2023-09-26,85,295,67,6432255,73
2023-09-27,142,285,47,7029085,78
2023-09-28,147,335,86,7444946,109
2023-09-29,183,535,130,13494565,156
2023-09-29,184,537,131,13552065,157
2023-09-30,164,576,121,15247822,151
2023-10-01,108,370,57,6392025,77
2023-10-02,61,232,41,5675790,51
2023-10-01,109,375,59,6506475,78
2023-10-02,62,234,42,5720090,52
2023-10-03,69,254,41,6433318,61
2023-10-04,33,163,37,3883740,33
2023-10-05,80,260,62,6531700,62
2023-10-06,117,435,83,10545004,107
2023-10-06,118,440,85,10659454,108
2023-10-07,175,917,155,25867585,156
2023-10-08,187,1369,148,31195219,160
2023-10-09,35,102,45,2517387,31
2023-10-09,34,100,44,2459887,30
2023-10-10,56,152,58,4420352,47
2023-10-11,21,301,72,6601470,20
2023-10-12,41,415,91,4974100,40
2023-10-12,43,419,93,5078100,42
2023-10-13,100,757,123,14670031,94
2023-10-14,149,898,146,22965903,144
2023-10-15,114,470,103,11493205,107
2023-10-16,88,340,65,8061238,78
2023-10-14,152,906,149,23319903,147
2023-10-15,115,476,105,11636805,108
2023-10-16,88,340,65,8054638,78
2023-10-17,46,270,37,5926040,45
2023-10-18,39,477,97,11251265,34
2023-10-19,55,355,77,8447352,52
2023-10-20,120,605,114,15243155,119
2023-10-20,121,607,115,15307255,120
2023-10-21,122,743,135,21807643,120
2023-10-22,150,603,97,12529500,133
2023-10-23,67,329,69,7707050,59
2023-10-24,79,130,22,3761834,36
2023-10-25,48,401,62,4378506,47
2023-10-26,79,481,84,10015495,70
2023-10-26,80,485,85,10111495,71
2023-10-27,107,418,77,10223958,105
2023-10-28,127,844,133,22461024,122
2023-10-29,109,492,92,11339830,99
2023-10-30,43,179,32,4667250,38
2023-10-31,24,223,16,4208880,22
2023-11-01,27,156,22,3150400,23
2023-11-02,65,240,57,6882945,63
2023-11-03,242,897,151,27259664,203
2023-11-03,244,903,153,27510514,205
2023-11-04,153,665,117,20124140,131
2023-11-05,77,384,53,10580882,64
2023-11-05,78,388,54,10693382,65
2023-11-06,35,325,53,6139500,34
2023-11-07,38,211,49,4702640,36
2023-11-08,62,406,66,11541858,59
2023-11-09,47,232,47,8687510,45
2023-11-10,117,474,91,15311771,113
2023-11-11,93,776,139,25279370,90
2023-11-12,98,540,92,16922476,91
2023-11-13,55,415,78,7744180,49
2023-11-13,55,416,78,7771830,49
2023-11-14,35,325,72,8623400,33
2023-11-15,57,351,61,11471415,50
2023-11-16,49,320,60,13323733,47
2023-11-16,50,321,60,13319333,48
2023-11-17,86,453,87,13623798,82
2023-11-18,120,676,112,22179750,120
2023-11-18,121,680,113,22351140,121
2023-11-19,74,531,98,16096376,70
2023-11-20,65,247,39,7903710,53
2023-11-21,43,357,59,9567720,35
2023-11-22,48,206,28,6012990,42
2023-11-23,127,553,119,18427502,118
2023-11-22,50,210,30,6138990,44
2023-11-23,127,553,119,18423102,118
2023-11-24,110,511,92,17300898,110
2023-11-25,110,936,146,24264991,102
2023-11-26,74,387,81,11565303,71
2023-11-26,75,391,82,11689103,72
2023-11-27,29,201,35,5558470,29
2023-11-28,17,269,29,4378750,17
2023-11-29,20,140,16,4686010,18
2023-11-30,18,152,9,4562100,18
2023-12-01,29,431,63,6549190,29
2023-12-02,77,730,112,18250427,75
2023-12-03,10,33,10,1468370,10
2023-12-04,7,93,14,2153600,7
9 changes: 9 additions & 0 deletions update.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { CSV } from "https://js.sabae.cc/CSV.js";
import { Day, TimeZone } from "https://js.sabae.cc/DateTime.js";

const url = Deno.args[0];

const data = await (await fetch(url)).json();
await Deno.writeTextFile("data/" + new Day(TimeZone.JST).toString() + ".csv", CSV.stringify(data));
await Deno.writeTextFile("latest_rsv_sum.csv", CSV.stringify(data));

0 comments on commit cf44ec3

Please sign in to comment.