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

Update sample microreact.pkl to include maps & timelines #342

Merged
merged 3 commits into from
Jan 7, 2025

Conversation

absternator
Copy link
Contributor

As per the discussion, this PR adds maps and timelines into the sample microreact.pkl file that gets loaded. This means that the map and timeline info will show in microreact. If the info_csv does not contain latitude or longitude columns, then we make maps = {}, and assuming date is split into year,month,day, if there is no year column we make timelines={}. This ensures that map and timelines are not rendered on microreact.

Below is the added json to sample microreact.pkl:

  "maps": {
    "map-1": {
      "controls": true,
      "dataType": "geographic-coordinates",
      "grouped": true,
      "groupMarkersByRegion": false,
      "lasso": false,
      "markersOpacity": 100,
      "maxNodeSize": 64,
      "minNodeSize": 4,
      "nodeSize": 5,
      "path": null,
      "regionsColourField": null,
      "regionsColourMethod": "entries",
      "regionsColourOpacity": 100,
      "regionsColourPalette": "ColorBrewer YlOrBr-2",
      "scaleMarkers": false,
      "scaleType": "logarithmic",
      "showMarkers": true,
      "showRegionOutlines": true,
      "showRegions": true,
      "style": "light",
      "tileLayerDialog": false,
      "tileLayerOpts": null,
      "tileLayerUrl": null,
      "trackViewport": false,
      "type": "mapbox",
      "title": "Map",
      "coordinateUnit": "decimal-degrees",
      "latitudeField": "latitude",
      "longitudeField": "longitude"
    }
  },
  "timelines": {
    "timeline-1": {
      "bounds": null,
      "controls": true,
      "nodeSize": 14,
      "playing": false,
      "speed": 1,
      "laneField": null,
      "style": "bar",
      "unit": null,
      "viewport": null,
      "title": "Timeline",
      "dataType": "year-month-day",
      "yearField": "year"
    }
  },

@absternator absternator requested a review from johnlees January 7, 2025 12:20
Copy link
Member

@johnlees johnlees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good to me

(The check annotation will be fixed in #322)

@johnlees johnlees merged commit 09e9c3d into master Jan 7, 2025
3 checks passed
@johnlees johnlees deleted the update-microreact-json branch January 7, 2025 15:25
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

Successfully merging this pull request may close these issues.

2 participants