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/UD - make sure User Dataset date variables have isTemporal annotation to work in Time series supporting plot. #791

Open
bobular opened this issue Aug 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@bobular
Copy link
Member

bobular commented Aug 14, 2024

Here are the variable annotations currently given to an all-ISO-8601 date column in a UD

	"8": {
		"id": "VAR_01ff10a196ec68be",
		"parentId": "VAR_e9c06705e76ee3f0",
		"providerLabel": "No Provider Label available",
		"displayName": "date",
		"definition": "",
		"displayType": "default",
		"type": "date",
		"hideFrom": [],
		"dataShape": "continuous",
		"distinctValuesCount": 1057,
		"isTemporal": false,
		"isFeatured": false,
		"isMergeKey": false,
		"isMultiValued": false,
		"imputeZero": false,
		"hasStudyDependentVocabulary": false,
		"distributionDefaults": {
			"rangeMin": "2022-01-01",
			"rangeMax": "2025-12-30",
			"binWidth": 1,
			"binUnits": "month"
		}
	}

These are the constraints defined by the back end:

https://github.com/VEuPathDB/service-eda/blob/42abe109e7a7d7343dff3bf9aea4b77262bd2239/src/main/java/org/veupathdb/service/eda/data/plugin/standalonemap/FloatingTimeSeriesPlugin.java#L26-L39

  public ConstraintSpec getConstraintSpec() {
    return new ConstraintSpec()
      .dependencyOrder(List.of("yAxisVariable"), List.of("xAxisVariable", "overlayVariable"))
      .pattern()
        .element("yAxisVariable")
          .description("Variable must be of the same or a child entity as the X-axis variable.")
        .element("xAxisVariable")
          .temporal(true)
          .description("Variable must be temporal and belong to the same or child entity as the variable the map markers are configured with, if any.")
        .element("overlayVariable")
          .required(false)
      .done();
  }
}

So the problem is that the UD date variable didn't get the isTemporal annotation.

I'll have a look to see where we can fix this.

@bobular bobular added the bug Something isn't working label Aug 14, 2024
@bobular bobular changed the title Map/UD - make sure date variables have correct annotations to work in Time series supporting plot. Map/UD - make sure date variables have isTemporal annotation to work in Time series supporting plot. Aug 14, 2024
@bobular bobular changed the title Map/UD - make sure date variables have isTemporal annotation to work in Time series supporting plot. Map/UD - make sure User Dataset date variables have isTemporal annotation to work in Time series supporting plot. Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant