Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

map: collection markers response does not match api #39

Open
dmfalke opened this issue May 15, 2024 · 0 comments
Open

map: collection markers response does not match api #39

dmfalke opened this issue May 15, 2024 · 0 comments
Assignees

Comments

@dmfalke
Copy link
Member

dmfalke commented May 15, 2024

It seems the response I get from /apps/standalone-map/visualizations/map-markers/collections does not match what is in the API: https://veupathdb.github.io/service-eda/api.html#resources:/apps/standalone-map/visualizations/map-markers/collections:post.

Here is an example of a response I'm getting (missing markers[].entityCount, markers[].minLat, markers[].minLon):

Request:

POST /eda/apps/standalone-map/visualizations/map-markers/collections

{
  "studyId": "VBP_MEGA",
  "config": {
    "outputEntityId": "OBI_0002728",
    "geoAggregateVariable": {
      "entityId": "GAZ_00000448",
      "variableId": "EUPATH_0043203"
    },
    "longitudeVariable": {
      "entityId": "GAZ_00000448",
      "variableId": "OBI_0001621"
    },
    "latitudeVariable": {
      "entityId": "GAZ_00000448",
      "variableId": "OBI_0001620"
    },
    "viewport": {
      "latitude": { "xMin": -58.35563036280967, "xMax": 81.1203884020757 },
      "longitude": { "left": -154.33593750000003, "right": 173.49609375000003 }
    },
    "collectionOverlay": {
      "collection": {
        "entityId": "OBI_0002728",
        "collectionId": "POPBIO_8000007"
      },
      "selectedMembers": [
        "POPBIO_8000009",
        "POPBIO_8000010",
        "POPBIO_8000011",
        "POPBIO_8000012",
        "POPBIO_8000013",
        "POPBIO_8000014",
        "POPBIO_8000044"
      ]
    },
    "aggregatorConfig": {
      "overlayType": "categorical",
      "numeratorValues": ["absent", "present"],
      "denominatorValues": ["absent", "present"]
    }
  }
}

Response

{
  "markers": [
    {
      "avgLat": 47.221748734056725,
      "avgLon": -104.06240417780266,
      "maxLat": 48.7611,
      "maxLon": -90.2613,
      "values": [
        {
          "variableId": "c",
          "value": 1,
          "confidenceInterval": {
            "min": 1,
            "max": 1
          },
          "n": 65
        },
        {
          "variableId": "c",
          "value": 1,
          "confidenceInterval": {
            "min": 1,
            "max": 1
          },
          "n": 65
        },
        {
          "variableId": "c",
          "value": 1,
          "confidenceInterval": {
            "min": 1,
            "max": 1
          },
          "n": 65
        },
        {
          "variableId": "c",
          "value": "NaN",
          "confidenceInterval": {
            "min": "NaN",
            "max": "NaN"
          },
          "n": 0
        },
        {
          "variableId": "c",
          "value": "NaN",
          "confidenceInterval": {
            "min": "NaN",
            "max": "NaN"
          },
          "n": 0
        },
        {
          "variableId": "c",
          "value": "NaN",
          "confidenceInterval": {
            "min": "NaN",
            "max": "NaN"
          },
          "n": 0
        },
        {
          "variableId": "c",
          "value": "NaN",
          "confidenceInterval": {
            "min": "NaN",
            "max": "NaN"
          },
          "n": 0
        }
      ]
    },
    {
      "avgLat": 42.28028422525342,
      "avgLon": -73.674180398493,
      "maxLat": 44.99735992,
      "maxLon": -67.03207616,
      "values": [
        {
          "variableId": "d",
          "value": 1,
          "confidenceInterval": {
            "min": 1,
            "max": 1
          },
          "n": 3316
        },
        {
          "variableId": "d",
          "value": 1,
          "confidenceInterval": {
            "min": 1,
            "max": 1
          },
          "n": 5037
        },
        {
          "variableId": "d",
          "value": 1,
          "confidenceInterval": {
            "min": 1,
            "max": 1
          },
          "n": 3316
        },
        {
          "variableId": "d",
          "value": "NaN",
          "confidenceInterval": {
            "min": "NaN",
            "max": "NaN"
          },
          "n": 0
        },
        {
          "variableId": "d",
          "value": 1,
          "confidenceInterval": {
            "min": 1,
            "max": 1
          },
          "n": 719
        },
        {
          "variableId": "d",
          "value": 1,
          "confidenceInterval": {
            "min": 1,
            "max": 1
          },
          "n": 719
        },
        {
          "variableId": "d",
          "value": 1,
          "confidenceInterval": {
            "min": 1,
            "max": 1
          },
          "n": 719
        }
      ]
    },
    {
      "avgLat": 56.68104418665377,
      "avgLon": 11.13186940207455,
      "maxLat": 59.5321,
      "maxLon": 15.641,
      "values": [
        {
          "variableId": "u",
          "value": 1,
          "confidenceInterval": {
            "min": 1,
            "max": 1
          },
          "n": 55
        },
        {
          "variableId": "u",
          "value": 1,
          "confidenceInterval": {
            "min": 1,
            "max": 1
          },
          "n": 55
        },
        {
          "variableId": "u",
          "value": 1,
          "confidenceInterval": {
            "min": 1,
            "max": 1
          },
          "n": 55
        },
        {
          "variableId": "u",
          "value": "NaN",
          "confidenceInterval": {
            "min": "NaN",
            "max": "NaN"
          },
          "n": 0
        },
        {
          "variableId": "u",
          "value": "NaN",
          "confidenceInterval": {
            "min": "NaN",
            "max": "NaN"
          },
          "n": 0
        },
        {
          "variableId": "u",
          "value": "NaN",
          "confidenceInterval": {
            "min": "NaN",
            "max": "NaN"
          },
          "n": 0
        },
        {
          "variableId": "u",
          "value": "NaN",
          "confidenceInterval": {
            "min": "NaN",
            "max": "NaN"
          },
          "n": 0
        }
      ]
    },
    {
      "avgLat": 45.80807139369196,
      "avgLon": -73.66616728588325,
      "maxLat": 47.23577756,
      "maxLon": -67.16718411,
      "values": [
        {
          "variableId": "f",
          "value": 1,
          "confidenceInterval": {
            "min": 1,
            "max": 1
          },
          "n": 107
        },
        {
          "variableId": "f",
          "value": 1,
          "confidenceInterval": {
            "min": 1,
            "max": 1
          },
          "n": 107
        },
        {
          "variableId": "f",
          "value": 1,
          "confidenceInterval": {
            "min": 1,
            "max": 1
          },
          "n": 107
        },
        {
          "variableId": "f",
          "value": "NaN",
          "confidenceInterval": {
            "min": "NaN",
            "max": "NaN"
          },
          "n": 0
        },
        {
          "variableId": "f",
          "value": 1,
          "confidenceInterval": {
            "min": 1,
            "max": 1
          },
          "n": 19
        },
        {
          "variableId": "f",
          "value": 1,
          "confidenceInterval": {
            "min": 1,
            "max": 1
          },
          "n": 19
        },
        {
          "variableId": "f",
          "value": 1,
          "confidenceInterval": {
            "min": 1,
            "max": 1
          },
          "n": 19
        }
      ]
    },
    {
      "avgLat": 39.60704033497297,
      "avgLon": -104.6693147931283,
      "maxLat": 44.9478,
      "maxLon": -90.0388,
      "values": [
        {
          "variableId": "9",
          "value": 1,
          "confidenceInterval": {
            "min": 1,
            "max": 1
          },
          "n": 151
        },
        {
          "variableId": "9",
          "value": 1,
          "confidenceInterval": {
            "min": 1,
            "max": 1
          },
          "n": 151
        },
        {
          "variableId": "9",
          "value": 1,
          "confidenceInterval": {
            "min": 1,
            "max": 1
          },
          "n": 151
        },
        {
          "variableId": "9",
          "value": "NaN",
          "confidenceInterval": {
            "min": "NaN",
            "max": "NaN"
          },
          "n": 0
        },
        {
          "variableId": "9",
          "value": "NaN",
          "confidenceInterval": {
            "min": "NaN",
            "max": "NaN"
          },
          "n": 0
        },
        {
          "variableId": "9",
          "value": "NaN",
          "confidenceInterval": {
            "min": "NaN",
            "max": "NaN"
          },
          "n": 0
        },
        {
          "variableId": "9",
          "value": "NaN",
          "confidenceInterval": {
            "min": "NaN",
            "max": "NaN"
          },
          "n": 0
        }
      ]
    }
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants