gawati / gawati-portal-ui

Version 2 of the gawati portal
GNU Affero General Public License v3.0
0 stars 0 forks source link

Search Timeline view #63

Open kohsah opened 6 years ago

kohsah commented 6 years ago

This is a proposed Timeline view of the search results. Results view will be split into two the default tab is the current way search results are shown. A second tab timeline view provides a timeline based graph view of the results like shown in the second image.

image

this view will show above the results a graph with years show on the X axis . The year range is from the oldest official date to the newest official date in the document results range. the height of the Y axis indicates number / frequency of documents for a particular year.

kohsah commented 6 years ago

See https://github.com/crubier/react-graph-vis [ have used visjs in the past, this is a react wrapper on visjs]

Also see https://github.com/hustcc/echarts-for-react which looks pretty good. In terms of the graph itself i would think it should be a bar chart, i have used a timeline chart in the past

image

but i think that is not very compact in terms of how we want to show it, a bar chart is perhaps better. See this example below which is pretty close to how i think we need to do it, notice how the results themselves have a year column on the left

image

kohsah commented 6 years ago

@surajpt You need 1 back-end service here (an eXist-db backend service see gawati-data ) - since the one for the listings are already there.

So you need 1 service that returns a summary of years and count (NOTE: No documents need be returned), covering the range of the search. Something like this:

{"years": {"year": [
    {
        "year": 1963,
        "count": 10
    },
    {
        "year": 1971,
        "count": 189
    },
    {
        "year": 1972,
        "count": 3
    },
    {
        "year": 1978,
        "count": 899
    },
    {
        "year": 1979,
        "count": 348
    },
    {
        "year": 2001,
        "count": 57
    },
    {
        "year": 2003,
        "count": 897
    },
    {
        "year": 2011,
        "count": 44
    }
]}}

This will help you generate a graph. Clicking specific bars in the graph which represent a year will trigger a query filtered for the year and the item being queried. I would add this timeline view to results which filter on country, language and keyword (showing the graph on the year filter would not make sense ) :

image

kohsah commented 6 years ago

@surajpt added a service in https://github.com/gawati/gawati-data/commit/b5d65a878bfba009903e2c3b0995636cc9ca50f1 this takes the same parameters as the filter service, but returns a coverage summary like described in the previous comment, implemented as /gw/filter/timeline/json, via apache will be /gwd/filter/timeline/json

kohsah commented 6 years ago

@surajpt Merged. one more thing pending is to make the graph clickable. Clicking on a graph should filter for that year.

kohsah commented 6 years ago

The graph page needs to be changed - we don't show document listings - instead we show multiple graphs one below the other

1 first graph as before 2 pie chart by language x results count 3 bar graph country x results count 4 heatmap keywords x results count

kohsah commented 6 years ago

@Basant1861 1) All the graphs use the same basic color, we need to have different color for each graph:

image

Also see if its possible to provide some variation in color within a graph. E.g 1970s in one color shade, 1980s in another and so on .

2) There are no annotations on pie chart

3) To clarify how the links should work ... you shoud switch back to the results view and show the filtered listing, based on what has been clicked.

kohsah commented 6 years ago

@Basant1861

1) can the X Axis for the scatter chart be alphabet labels ? Also there is no label for the scatter chart

image

2) CLicking a keyword on the scatter chart shows the listings of a different keyword. e.g. I clicked on "Products" and it showed me results from "Proclamation"