I'm not good at JS, so I gave it a try in PHP (just good enough to get it working

See work-in-progress below, whould it be interesting to share this code fore someone to migrate it to JavaScript?
(parts in blue are created by me, retrieving data, formatting and replacing buienradar icons with skycons. part in red is still on todo list cause it takes too much time executing it in LUA, sometimes over 10 seconds). I'm parsing the buienradar JSON information, putting it into a table, apply some CSS, etc.