Air Quality (AQ) API JSON Data

edited March 29 in Library Questions

Hi - I am working on an installation that will be using 'real time' data from an AQ mesh pod API. I want to turn the data (which provides a minute-to-minute output of this data) into a JS object and then sonify. Below is the data I am receiving:

https://api.airmonitors.net/3.0/interface/a95a08aC/8e9d-2701-A6ji-meFI-me8A-junC-7a70-0f69/stationdata/date/201803180015/201803210800/102150>;

SAMPLE:

[
    {
        "Timestamp": "2018-03-18 00:15:00",
        "StationType": "AQMeshPod",
        "GasProtocol": "4.2.2",
        "ParticleProtocol": null,
        "Channels": [
            {
                "ChannelNumber": null,
                "PreScaled": -13.0183,
                "Scaled": -13.2733,
                "Offset": -0.2549999952,
                "Slope": 1,
                "Status": "sampling",
                "UnitId": 3,
                "SensorId": 0
            },
            {
                "ChannelNumber": null,
                "PreScaled": 6.3399,
                "Scaled": 12.9826,
                "Offset": 6.6427001953,
                "Slope": 1,
                "Status": "sampling",
                "UnitId": 3,
                "SensorId": 1
            },
            {
                "ChannelNumber": null,
                "PreScaled": 22.524401,
                "Scaled": 23.987284,
                "Offset": 1.2015999556,
                "Slope": 1.0116000175,
                "Status": "sampling",
                "UnitId": 3,
                "SensorId": 8
            },
            {
                "ChannelNumber": null,
                "PreScaled": 0,
                "Scaled": 0,
                "Offset": 0,
                "Slope": 1,
                "Status": "sampling",
                "UnitId": 9,
                "SensorId": 18
            },
            {
                "ChannelNumber": null,
                "PreScaled": 84.400002,
                "Scaled": 84.400002,
                "Offset": 0,
                "Slope": 1,
                "Status": "sampling",
                "UnitId": 10,
                "SensorId": 19
            },
            {
                "ChannelNumber": null,
                "PreScaled": 1004.700012,
                "Scaled": 1004.700012,
                "Offset": 0,
                "Slope": 1,
                "Status": "sampling",
                "UnitId": 31,
                "SensorId": 364
            },
            {
                "ChannelNumber": null,
                "PreScaled": 3.5,
                "Scaled": 3.5,
                "Offset": 0,
                "Slope": 1,
                "Status": "sampling",
                "UnitId": 35,
                "SensorId": 580
            }
        ]
    },
    {
        "Timestamp": "2018-03-18 00:16:00",
        "StationType": "AQMeshPod",
        "GasProtocol": "4.2.2",
        "ParticleProtocol": null,
        "Channels": [
            {
                "ChannelNumber": null,
                "PreScaled": -16.691601,
                "Scaled": -16.946601,
                "Offset": -0.2549999952,
                "Slope": 1,
                "Status": "sampling",
                "UnitId": 3,
                "SensorId": 0
            },
            {
                "ChannelNumber": null,
                "PreScaled": 7.1464,
                "Scaled": 13.7891,
                "Offset": 6.6427001953,
                "Slope": 1,
                "Status": "sampling",
                "UnitId": 3,
                "SensorId": 1
            },
            {
                "ChannelNumber": null,
                "PreScaled": 23.385099,
                "Scaled": 24.857967,
                "Offset": 1.2015999556,
                "Slope": 1.0116000175,
                "Status": "sampling",
                "UnitId": 3,
                "SensorId": 8
            },
            {
                "ChannelNumber": null,
                "PreScaled": 0,
                "Scaled": 0,
                "Offset": 0,
                "Slope": 1,
                "Status": "sampling",
                "UnitId": 9,
                "SensorId": 18
            },
            {
                "ChannelNumber": null,
                "PreScaled": 84.300003,
                "Scaled": 84.300003,
                "Offset": 0,
                "Slope": 1,
                "Status": "sampling",
                "UnitId": 10,
                "SensorId": 19
            },
            {
                "ChannelNumber": null,
                "PreScaled": 1004.700012,
                "Scaled": 1004.700012,
                "Offset": 0,
                "Slope": 1,
                "Status": "sampling",
                "UnitId": 31,
                "SensorId": 364
            },
            {
                "ChannelNumber": null,
                "PreScaled": 3.5,
                "Scaled": 3.5,
                "Offset": 0,
                "Slope": 1,
                "Status": "sampling",
                "UnitId": 35,
                "SensorId": 580
            }
        ]
    }

I am plenty comfortable processing the JS into audio in the browser, but does anyone have any experience with this sort of thing? I have toyed with APIs in the past, but I am not well-versed.

AQ mesh > https://www.aqmesh.com/product/

Tagged:

Answers

Sign In or Register to comment.