Coder Social home page Coder Social logo

openskope / skopeui Goto Github PK

View Code? Open in Web Editor NEW
0.0 10.0 4.0 5.28 MB

SKOPE user interface and visualization app

Home Page: https://www.openskope.org

License: MIT License

Dockerfile 0.36% JavaScript 35.51% Vue 62.25% SCSS 0.50% Makefile 1.37%
environmental-data environmental-modelling gis nuxtjs

skopeui's Introduction

Synthesizing Knowledge of Past Environments

DOI Build/Test Docker Image CI

This codebase provides a frontend only user interface for the NSF supported Synthesizing Knowledge of Past Environments project.

The current UI uses Nuxt 2, VueJS, Leaflet, and Plotly JS.

The application has a basic Makefile for configuration and deployment. A recent version of Docker and docker compose is recommended to set up a local development environment.

Running make for the first time will generate a default config.mk file that can be further customized:

  • DEPLOY_ENVIRONMENT can be set to dev, staging, or prod (use dev for local development)
  • SKOPE_API_HOST_URL should point at a SKOPE backend API to serve metadata and timeseries data (e.g., a deployed instance of https://github.com/openskope/skope-api/)
  • SKOPE_GEOSERVER_HOST_URL should point at a GeoServer instance with SKOPE datasets and geotiff layers preloaded (see https://github.com/openskope/skope-datasets for more details)

Run make deploy to redeploy the application with whatever settings are currently defined in config.mk

With DEPLOY_ENVIRONMENT=dev a hot-reloading development server should spin up at http://localhost:3000

Contributors

  • Allen Lee @alee
  • Kyle Bocinsky @bocinsky
  • Calvin Pritchard @cpritcha
  • Christine Nguyแป…n @chrstngyn

skopeui's People

Contributors

alee avatar bocinsky avatar chrstngyn avatar cpritcha avatar dependabot[bot] avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

skopeui's Issues

layers appear offset incorrectly when zoomed out

Zooming way out when a layer is loaded makes the layer skip around a little bit on the map with incorrect borders.

As the simplest possible solution, we could disable zooming out too far

Or look into if we can improve / correct the translation from the EPSG4326 geoserver layers mapped onto the web mercator base map tiles

Or load in a EPSG4326 base map to start with?

New basemap in SKOPE UI?

This is just to start a discussion about the default basemap and selection of baseman's in the SKOPE UI. Some considerations:

  • Esri.WorldTopoMap is nice in the sense that it is very easy to identify your area of interest quickly
  • A monochrome basemap, though, may help interpretation by not interacting (color-wise) with the datasets that are overplayed (and usually semi-transparent)
  • We could also build our own basemap using a combination of web map services with vector tiles, but each additional layer increases load time (though marginally)
  • it might also be nice to have tribal land represented, as on Esri.WorldTopoMap

The Montana Mesonet uses one of these custom basemaps, but it doesn't have park service units or tribal land demarcated: https://mesonet.climate.umt.edu/map. This uses hillshades from MapTiler and Stamen toner-lines and toner-labels.

improve polygon management

users should be able to upload polygons as GeoJSON to define the study area / area of interest

look into keeping the GeoJSON object persistent in memory for the duration of their session so they can apply the polygon to different datasets without having to reupload every time

downloading drawn polygons as GeoJSON would be useful as well

flesh out landing page

  • redesign landing page with mockups and a few alternative layouts (reduce whitespace etc)
  • needs text describing the application and how to use it
  • create some mockups for landing page layouts so we can figure out how much space is available etc

display data pixel boundaries on layer

When zoomed in on the map it would be useful to display the pixel boundaries on the layer so people can figure out if the chart data is sensible or what it's taking into account.

To solve this we could:

  1. modify the backend https://github.com/openskope/timeseries-service to return additional geo data demarcating the data pixels around the input boundary
  2. always render the pixel boundaries in the client ala https://leafletjs.com/examples/choropleth/ (do we pull this from geoserver?)

Please feel free to chime in if I misunderstood anything @tmcphillips @bocinsky ! Thanks ๐Ÿ‘

upgrade to vuetify 2.0

https://github.com/vuetifyjs/vuetify/releases/tag/v2.0.0#user-content-upgrade-guide

this is a major change, as there are quite a few backwards-incompatible vuetify components that we will need to update - after upgrading the site is completely unusable / degraded in its current form of markup. We should consider if we want to undergo this pain now or kick the can down the road.

As the application is currently not very large I think it's probably best to take the pain now.

timeseries chart issues

Keith and I witnessed some strange behavior on the chart that we will try to reproduce where the x-axis year ticks were being displayed as 1.9, 2.0, 2.1 etc., and the y-axis data ranges were off. Could have been a 1-off anomaly or an error in the underlying data cube, but @kintigh will try to figure out steps to reproduce.

  • temporal constraints have been added by @cpritcha as of fa53616 ๐Ÿ‘
  • edit polygon doesn't update timeseries chart properly when passing through pixel boundaries. fixed by d129e9c

push geometry persistence into store

We should move the user-specified geometry into the Vuex store like @cpritcha did in 5e4ae2d - this is then responsible for persistence / restoration in local storage etc.

We deliberately keep just a single global geometry in local storage - represents the "area of interest" and management is delegated to the user who can download and manage them as geoJSON files locally.

Transform graph to Z-score relative to period from X to Y

Three options for computing the z-score:

  1. moving interval (fine as is)
  2. selected temporal interval (without years)
  3. fixed temporal interval: include a year range, compute the mean + stdev for that year range and compute the z-score based on that mean/stdev for that given year range, not the selected temporal interval

take mean and stdev over the entire series or a window in the series and recast / replot the series in reference

stretch goal: sliding Z-score metric, how is your experience this year related to the cumulative experience across some user-defined window in the series?

add smoothing functions

  • Trailing running average of N years
  • Centered running average of N years
  • Spline fit to timeseries
  • Kernel density smoothing (lower priority)

Issues:

  • moving averages may have incomplete windows of data, response should always have a slot for alerts / messages from the server that could be displayed (e.g., @tako2428 suggests an alert to the user saying "Portions of this window have missing data")

refine dataset detail and data visualization UI

https://plotly.com/dash/

We don't have the resources to switch to dash now (it was a little too rough around the edges when we were initially evaluating frameworks) but we can still look to their showcases list for inspiration on how to design a better UI for displaying the map + stats. We should select a few exemplar interfaces that we think could be used for the dataset detail page UI and then refactor the SKOPE UI to match.

Showcases: https://dash-gallery.plotly.host/Portal/

Dashboards with maps:

display error message responses from timeseries service on UI

When we receive a 400 response from the timeseries service we should be displaying the error message on the dashboard page:

{"timestamp":1601655630007,"status":400,"error":"Bad Request","exception":"org.openskope.timeseries.controller.InvalidArgumentException","message":"The selected area does not overlap the region covered by the dataset","path":"/timeseries-service/api/v1/timeseries/paleocar_2/growing_degree_days"}

renew app.openskope.org ssl cert

need to renew ssl certs for *.openskope.org - cert expired on 12/8/2019

app.openskope.orgis causing ERR_CERT_DATE_INVALID errors on skope.comses.net

timeseries chart off by one

It appears to be an off-by-one on the X axis labels in the chart, as a range of 520-550 generates a chart that ranges from 519-549

sidebar functionality

  • time span slider doesn't display lower-bound numerical value when using the slider
  • checkbox list returns error when boxes are checked

geoserver integration

add timeseries service timeout

add a timeout and notify the user to "Select a point or smaller area" when the request to the timeseries service times out

improve timeout handling

  • add a setInterval when issuing a query that informs the user that things are taking too long, allow them to reset / extend the timeout until it reaches a maximum
  • clear timeout error messages when the query succeeds

frontend: replace default leaflet layers control with a custom variable selection control

Right now the leaflet control layer is convenient but has some warts w.r.t. programmatically keeping track of the selected variable and which layer is currently being displayed.

Things would be cleaner if we create a custom variable control that lets us select a variable - then we are in charge of proxying to leaflet to display the appropriate WMS layer or make the right time series service calls. Should look into this and see if it's worth the trouble as it should clean up our code so we don't have to dig into leaflet component internals and do string comparisons against our vue component data.

citable figures w/ minimal provenance

Figure out a way to restore all user activities / parameterizations that generated a given set of data.

Two options to consider:

  1. server side (short UUIDs mapped to parameterization)
  2. client side only (download / upload metadata file that restores the stored data)

Going to implement option 2 for the time being as it eases the complexity of adding additional server side logic and persistence.

stored data:

  • geometry
  • zoom level
  • selected basemap
  • temporal range
  • smoothing / transformation options
  • selected variable

frontend: detail page fixes

  • date boundaries have strange behavior (example: enter 1000-1400)
  • add step forward / backwards to animation
  • update the variables to not look so clickable
  • add help button somewhere on the top
  • add additional variable description / metadata

add universal input control for all dataset variables

In the new UI after selecting a dataset we should display a variable input control on all pages that allow the user to select the variable layer being displayed on the map or being rendered out with the timeseries graph

add atemporal boolean to datasets

atemporal boolean to signify that a dataset has a date range and can be filtered or should be unaffected by the date range filter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.