美文网首页
数据对接格式说明

数据对接格式说明

作者: Lynn童 | 来源:发表于2017-04-20 11:01 被阅读0次

首页数据格式(charts.js)

  1. 折线图实时数据
    url : '/frontend/getflow'
    参数: 0/1
    请求间隔:3s
    返回格式:
var getFlow=[{
        time:"2017/03/04 22:22:22",
        size: 1200,
        insize: 100,
        inrate:0.5,
    },{
        time:"2017/03/04 22:22:25",
        size: 1300,
        insize: 200,
        inrate:0.3,
    },{
        time:"2017/03/04 22:22:28",
        size: 1400,
        insize: 110,
        inrate:0.1,
    },{
        time:"2017/03/04 22:22:31",
        size: 1500,
        insize: 400,
        inrate:0.3,
    },{
        time:"2017/03/04 22:22:34",
        size: 1100,
        insize: 300,
        inrate:0.2,
    },{
        time:"2017/03/04 22:22:37",
        size: 1100,
        insize: 500,
        inrate:0.7,
    },{
        time:"2017/03/04 22:22:40",
        size: 520,
        insize: 600,
        inrate:0.6,
    },{
        time:"2017/03/04 22:22:43",
        size: 1400,
        insize: 700,
        inrate:0.4,
    },{
        time:"2017/03/04 22:22:46",
        size: 1500,
        insize: 200,
        inrate:0.5,
    },{
        time:"2017/03/04 22:22:49",
        size: 1600,
        insize: 100,
        inrate:0.1,
}];
  1. 来访周期+活跃度
    url: '/frontend/period'
    参数:0/1
    请求间隔:5min
    返回格式:
var period ={
    t1:100,
    t2:200,
    t3:400,
    t4:300,
    t5:100,
    t6:50,
    high:100,
    medium:200,
    low:150,
    sleep:250
};
  1. 新老顾客
    url: '/frontend/newOld'
    参数:0/1
    请求间隔:5min
    返回格式:
var newOld ={
    newVisitor:300,
    oldVisitor:150
};
  1. 驻点时长+深访跳出
    url: '/frontend/intime'
    参数:0/1
    请求间隔:5min
    返回格式:
var intime ={
    deep:0.3,
    jump:0.4,
    f1:100,
    f2:200,
    f3:400,
    f4:300,
    f5:100
};
  1. 首页地图坐标
    url: '/frontend/gps'
    参数:0/1
    请求间隔:无
    返回格式:
var gps={
    lon:116.325409,
    lat:39.996147
};

details 请求格式

  1. 客流分析
    url: '/frontend/details/traffic'
    参数:
var params={
    probeID:0,
    date:"Wed Apr 05 2017 00:00:00 GMT+0800 (中国标准时间)"
};

返回格式:

var traffic={
    d1:[{
        data: [500, 6, 0, 28,5, 6, 0, 28, 8, 24, 11, 16, 14, 0, 31, 0, 2, 0, 4, 0, 3, 2, 6, 6]
    }, {
        data: [0, 2, 12, 2,0, 2, 12, 2, 12, 0, 12, 0, 2, 3, 0, 2, 4, 22, 0, 8, 0, 4, 0, 0]
    },{
        data:[0.60, 0.65, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50,0.60, 0.62, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50]
    }],
    d2:[{
        data: [5, 6, 0, 28,5, 6, 0, 28, 8, 24, 11, 16, 14, 0, 31, 0, 2, 0, 4, 0, 3, 2, 6, 6]
    }, {
        data: [0, 2, 12, 2,0, 2, 12, 2, 12, 0, 12, 0, 2, 3, 0, 2, 4, 22, 0, 8, 0, 4, 0, 0]
    },{
        data:[0.60, 0.65, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50,0.60, 0.62, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50]
    }],
    d3:[{
        data: [5, 6, 0, 28,5, 6, 0, 28, 8, 24, 11, 16, 14, 0, 31, 0, 2, 0, 4, 0, 3, 2, 6, 6]
    }, {
        data: [0, 2, 12, 2,0, 2, 12, 2, 12, 0, 12, 0, 2, 3, 0, 2, 4, 22, 0, 8, 0, 4, 0, 0]
    },{
        data:[0.60, 0.65, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50,0.60, 0.62, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50]
    }],
    d4:[{
        data: [5, 6, 0, 28,5, 6, 0, 28, 8, 24, 11, 16, 14, 0, 31, 0, 2, 0, 4, 0, 3, 2, 6, 6]
    }, {
        data: [0, 2, 12, 2,0, 2, 12, 2, 12, 0, 12, 0, 2, 3, 0, 2, 4, 22, 0, 8, 0, 4, 0, 0]
    },{
        data:[0.60, 0.65, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50,0.60, 0.62, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50]
    }],
    d5:[{
        data: [5, 6, 0, 28,5, 6, 0, 28, 8, 24, 11, 16, 14, 0, 31, 0, 2, 0, 4, 0, 3, 2, 6, 6]
    }, {
        data: [0, 2, 12, 2,0, 2, 12, 2, 12, 0, 12, 0, 2, 3, 0, 2, 4, 22, 0, 8, 0, 4, 0, 0]
    },{
        data:[0.60, 0.65, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50,0.60, 0.62, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50]
    }],
    d6:[{
        data: [5, 6, 0, 28,5, 6, 0, 28, 8, 24, 11, 16, 14, 0, 31, 0, 2, 0, 4, 0, 3, 2, 6, 6]
    }, {
        data: [0, 2, 12, 2,0, 2, 12, 2, 12, 0, 12, 0, 2, 3, 0, 2, 4, 22, 0, 8, 0, 4, 0, 0]
    },{
        data:[0.60, 0.65, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50,0.60, 0.62, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50]
    }],
    d7:[{
        data: [5, 6, 0, 28,5, 6, 0, 28, 8, 24, 11, 16, 14, 0, 31, 0, 2, 0, 4, 0, 3, 2, 6, 6]
    }, {
        data: [0, 2, 12, 2,0, 2, 12, 2, 12, 0, 12, 10, 2, 3, 0, 2, 4, 22, 0, 8, 0, 4, 0, 0]
    },{
        data:[0.60, 0.65, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50,0.60, 0.62, 0.55, 0.45, 0.48, 0.49, 0.68, 0.74, 0.88, 0.76, 0.70, 0.50]
    }],

};

  1. 来访周期+活跃度
    url: '/frontend/details/period'
    参数:
var params={
    probeID:0,
    date:"Wed Apr 05 2017 00:00:00 GMT+0800 (中国标准时间)"
};

返回格式:

var period={
    period:[4,7,11,15,25, 36,22, 32, 24,42,120],
    high:200,
    medium:300,
    low:150
};
  1. 驻店时长
    url: '/frontend/details/intime'
    参数:
var params={
    probeID:0,
    date:"Wed Apr 05 2017 00:00:00 GMT+0800 (中国标准时间)"
};

返回格式:

var intime={
    f1:[10, 22, 41, 64, 90, 110,120, 132, 151, 204, 250, 310,320, 282, 241, 214, 190, 170,150, 132, 101, 84, 50, 23],
    f2:[10, 22, 41, 64, 90, 110,120, 132, 151, 204, 250, 310,320, 282, 241, 214, 190, 170,150, 132, 101, 84, 50, 23],
    f3:[10, 22, 41, 64, 90, 110,120, 132, 151, 204, 250, 310,320, 282, 241, 214, 190, 170,150, 132, 101, 84, 50, 23],
    f4:[10, 22, 41, 64, 90, 110,120, 132, 151, 204, 250, 310,320, 282, 241, 214, 190, 170,150, 132, 101, 84, 50, 23],
    f5:[10, 22, 41, 64, 90, 110,120, 132, 151, 204, 250, 310,320, 282, 241, 214, 190, 170,150, 132, 101, 84, 50, 23]
};

4.新老顾客
url: '/frontend/details/newOld'
参数:

var params={
    probeID:0,
    date:"Wed Apr 05 2017 00:00:00 GMT+0800 (中国标准时间)"
};

返回格式:

var newOld={
    newVisitor:[7,25,50, 76,102,130,164,180,140,112,72, 32],
    oldVisitor:[125,160,120,100,70,48,18,7,26,46,69,109]
};
  1. 深访跳出
    url: '/frontend/details/deep'
    参数:
var params={
    probeID:0,
    date:"Wed Apr 05 2017 00:00:00 GMT+0800 (中国标准时间)"
};

返回格式:

var deep={
    deep:[7,25,50,76,102,130,164],
    jump:[125,160,120,100,70,48,18]
}

相关文章

  • 数据对接格式说明

    首页数据格式(charts.js) 折线图实时数据url : '/frontend/getflow'参数: 0/1...

  • 数据可视化Superset使用

    1.对接MySQL数据源 1.1 安装依赖 conda install mysqlclient 说明:对接不同的数...

  • 线性渐变设计方案

    线性渐变 线性渐变数据格式 expendProperties BasicState 数据格式说明 position...

  • c语言

    格式说明由“%”和格式字符组成 ,如%d%f等。它的作用是将输出的数据转换为指定的格式输出。格式说明总是由“%”字...

  • 接口数据格式说明

    一般来说接口返回格式分为数据部分和状态部分,如下: 返回数据时调用这个方法即可。

  • GWAS 数据格式说明

    全基因组关联分析(GWAS)大家都不陌生,今天我们给大家介绍下各种格式之间转化在R语言是怎么实现的。首先我们来看下...

  • flutter实现多图选择+常用做法

    先看效果。 Android配置 完整代码 使用 其他说明(可能用到):正常我们对接接口都是给接口传base64.格式

  • Android接口开发规范

    1.返回格式 类别参数类型说明codeint响应码dataobject {} 或 List []数据返回格式mes...

  • C# 转换 Blob 对象为图片

    概述 在数据对接时,经常需要把数据库(如:MySql, Oracle)中的blob对象转换为图片格式,对于C#处理...

  • go ISO-8601时间格式化

    最近对接数据遇到ISO-8601时间格式需要输出,但是time包里面没有,需要自己定义,如下:

网友评论

      本文标题:数据对接格式说明

      本文链接:https://www.haomeiwen.com/subject/hyagjttx.html