JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://fetchclimate2.cloudapp.net/scripts/request.js"></script>
<div>
    <a id="getVar" href="#">Click</a> to get relative humidity in Moscow (monthly average for years 2000..2005)
</div>
    <div id="output">
</div>

JavaScript

$(function() {

    $('#getVar').on('click', function(e) {
        e.preventDefault();
        
        // Construct FetchClimate request
        var request = new FC.Request({
            spatial: new FC.ScatteredPoints(
                [ 52.4 ],  // Latitudes of points 
                [ -1.36 ]), // Longitudes of points
            temporal: new FC.TemporalDomain(
                [1960,2015], true, // Average for years 2000..2005
                [1,32,60,91,121,152,162,213,244,274,305,335,366], true,  // Monthly average
                [0,24], true), // Average for entire day
                // Other Variables airt, airt_land, dtr, frs, prate, relhum, relhum_land, sunp, wet, windspeed
            variable:"airt",
            serviceUrl: "http://fetchclimate2.cloudapp.net"
        });

        request.perform().then( 
            function(response) { // Success handler for request gets data 
                response.getData([ "values", "sd" ]).then(
                    function(data) { // Success handler for data retrieved
                        var t = "";
                        for(var i =0;i<12;i++)
                            t += data.values[0][i].toFixed(2) + "&plusmn;" + data.sd[0][i].toFixed(2) + "<br/>";
                        $("#output").html(t);
                    },
                    function(error) { // Error handler
                        $("#output").text("Error retrieving data: " + error);
                    }                
                );
            },
            function(error) { // Error handler
                $("#output").text("Request failed: " + error);
            });

    });

});