Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

telgniw/UVMeals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

7 Days UV Light Meals

UV information is fetched from cwb.gov.tw for heater.

# To fetch current weather data into database.
python scripts/main.py data/uv.sqlite3

Visualization API

Generating magic circle.

GET /api/draw/magic

JavaScript call to the page.

// start magic circle
start(date, place_l, place_r, duration_l, duration_r);
field format
date 'yyyy-MM-dd'
place '地點'
duration 0 (optional)
// stop magic circle
stop(position);
field format
position POSITION.LEFT
        | POSITION.RIGHT

Data API

Get location list.

GET /api

Get uv list for a specific location and time.

GET /api/地點/yyyy-MM-dd

From UV to Toast

UV Index Heating Time (seconds)
0 ~ 2 0
3 ~ 5 30
6 ~ 7 60
8 ~ 10 90
11+ 120
Total Heating Time (seconds) Estimated Burnt
0 ~ 250 No
251 ~ 500 Slight
500+ Significant

Library Used

License

Copyright (c) 2013 Chao Hao Yang, Daniel Y.C. Kao, Ke-Ting Huang, Yi Huang