GithubHelp home page GithubHelp logo

outlierventures / buyco-procurement-data-browser Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 5.72 MB

Meteor app for browsing and visualising procurement data stored in a BigchainDB/MongoDB backend.

License: Apache License 2.0

JavaScript 23.84% HTML 3.81% CSS 69.40% Shell 2.40% Makefile 0.23% Dockerfile 0.32%

buyco-procurement-data-browser's People

Contributors

bearandyoon avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

jl789

buyco-procurement-data-browser's Issues

Grouped charts not grouped by organisation

The grouped charts (category, supplier, service) suggest they group by organisation, but they actually don't. The organisation name shown in the bars is the first organisation within the query with that group value, effectively a random one.

For category and service that's usually less apparent because all councils use different values there. However with supplier it becomes apparent. See for example a search for suppliers that contain "siemens":

image

Here we see 4.5M for Barnsley Council - SIEMENS PLC. The 4.5M is actually the total amount for SIEMENS PLC over all councils.

Cause: invalid group clause in publish.js for spendingGrouped.

iOS 9: doesn't work at all

Seen on iPad 2 and iPhone 6 emulator. Only the top and bottom bars show, no menu options work. Details to be added.

Selection filter (click filter) saved as both top-level filter and sub filter

Related to #73.

After clicking on a category:

image

The filter is stored in the session both as top level and as sub level:

image

Then when we unset on top level the filter is correctly unset in the UX:

image

However in the session, the sub filter still remains:

image

Then when we reload the page, the filter is applied in the UX again, because the group filter loads it from the session and then applies it as the global filter as per #73.

image

Changing organisations: multiple chart refreshes

Similar to #76 but for a different use case. When changing organisations, the charts refresh multiple times. This is bad UX.

This issue is not about the fact that the reload takes a long time. That can and should be improved, but the experience during the load should be better, even if it were shorter.

Screen capture of the following:

  1. Two councils are selected, no further filters
  2. We switch to All organisations.

The switching process as a whole takes +- 30s. During this process the charts reload several times. There's no indicator to the user that loading is not complete, so users can't be expected to understand whether the chart they look is final or waiting for some further data to load.

https://drive.google.com/file/d/0B5qbOn1QUh5LYXkzLXpETkswNk0/view?usp=sharing

Developer console filled with warnings about missing chart series while loading

When using the app, many warnings are logged in the developer console. They originate from the DevExpress chart components and contain a message like "The [field name] data field is absent."

I suspect this happens when the chart gets initialised with series, but the data source is still empty.

This is not a new issue, and not critical, but it should be solved.

8029a7e….js?meteor_js_resource=true:22 W2002 - The clientValue data field is absent. See:
http://js.devexpress.com/error/16_2/W2002

image

Selection filter for time chart saved and reloaded, but label not shown

When we click on a bar in the time chart, that period is applied as an extra filter to the group charts (example 2015 Q4). In the group charts this is shown as "Filter applied: 2015 Q4":

image

The value is saved in the Session and reloaded when we reload the page. It is applied to the group charts too; they show the same values. However the label "Filter applied: 2015 Q4" is not shown.

image

Category filter on top level makes supplier / service charts empty

For some values, filtering data on the top level causes the spendingGroupedCharts for other group fields to be empty.

Example:

  1. Select Wakefield MDC as organisation
  2. Select Accommodation for over 18s as category

Expected: the charts for Supplier and Service show some data. There are data points for this category and period with a Supplier and Service.
Result: the charts for Supplier and Service are empty.

image

No data shown in sub charts for specific period (2015-11)

Steps:

  1. Select "Year before last (2015)
  2. Select Wakefield and Doncaster
  3. Click on 2015-11 for Wakefield

Expected: there's a bar in the time chart up to £18.5M. I would expect bars in the spendingGroupedCharts that show this amount. For other periods (2015-09, 2015-10, 2015-12) that is indeed the case.

Result: for 2015-11, no data is shown in the sub charts:

image

While searching: repetitive `[ReqlDriverError: Cursor is closed.]` in server console

Steps:

  1. Start the app with meteor run
  2. Keep the server console open
  3. Open /spending
  4. Type fast in the search box. For example "building".

Result: in the server console, messages like this appear:

W20170124-11:39:19.330(0)? (STDERR) { [ReqlDriverError: Cursor is closed.]
W20170124-11:39:19.339(0)? (STDERR)   name: 'ReqlDriverError',
W20170124-11:39:19.341(0)? (STDERR)   msg: 'Cursor is closed.',
W20170124-11:39:19.343(0)? (STDERR)   frames: undefined,
W20170124-11:39:19.349(0)? (STDERR)   message: 'Cursor is closed.' }

The result in the browser eventually appears, although a bit slow.

It seems that on each key event, a new search query is started. The RethinkDB server gets pretty busy. The code to open and close the cursor might not be thread-safe leading to the cursor not being open when it's called in one of the search actions.

Selection filter cannot be removed if the value is not shown

Selection filters can be added by clicking bars in the chart. For example, if the category chart shows categories A, B and C, we can click on category B. The selection filter "category B" is then applied to the other charts. To remove this filter, we click the bar again.

By applying and removing multiple selection filters in sequence, it is however possible to end up in a situation where the selection filter is not shown in the chart anymore, and the user is hence unable to click it. The selection filter can then not be removed. Only by applying the same set of filters again, can the filter be removed.

Example. Here the selection filter Service: CHILDRENS AND EDUCATION SERVICES is applied. We click the bar in Supplier for St Helens Council - EUROPEAN CARE & LIFESTYLES (UK) LTD.

image

This selection filter for Supplier has now been applied. Now we click the bar in Service for CHILDRENS AND EDUCATION SERVICES to remove that selection filter:

image

Now there's still a selection filter for Supplier: EUROPEAN CARE & LIFESTYLES (UK) LTD active. But this supplier is not visible in the chart anymore. We can't remove it (without reapplying another filter to make the bar visible again):

image

Suggested approach: add an explicit removal button for selection filters in the applicable chart. So in the example case in the Supplier chart.

Filters don't remain active in chart, have to click twice

When clicking on a bar in a grouped chart, that bar should keep the "selected" style to indicate it has been applied as a filter. Clicking on it again should remove the filter.

Currently the bar doesn't keep the "selected" style. To make that happen we have to click another time. Then click a third time to remove the filter.

Steps:

  1. Open https://dev.app.publicdata.works/spending/time
  2. Click on the top bar in Spend by supplier

Expected: a filter is applied for this supplier; the bar gets diagonal stripes.
Result: the filter is applied, however the bar doesn't get the style.

  1. Click on it again. The filter doesn't change but the bar now does get the "selected" style (diagonal stripes).
  2. Click on it a third time. Now the filter gets removed.

Initial situation after 1:

image

Clicking the bar:

image

Situation after 2. (not as expected):

image

After 3. (desired situation):

image

Then after 4, filter gets removed correctly:

image

Global filter is applied as selection filter in group chart, and vice versa

We have two kinds of filters:

  1. Top-level filters as set in the filter bar
  2. Sub filters as set by clicking on a series

The top-level filters limit what is shown in any of the charts. So when we filter on Category "A", we don't see category "B" and "C" anywhere.

The sub filters limit what is shown in other charts. So in the category chart, categories A, B and C might be shown. When we click on category A, it is shown in "selected" style, and category B and C are still visible. Data in the other charts only shows data for category A.

This has previously worked correctly. However currently, the grouped charts behave like sub-filters when a top-level filter is applied.

See the below example. Category: Agency Charges - Escort is applied as a top-level filter. However we see all the other categories in the Category group chart. Because the selected category is not in the top 10, it's not visible at all. That's not how it should be, and bad UX.

image

Performance: switching from Wakefield to Doncaster takes 15-20s, high CPU on client

Steps (reproduced on my Win8 laptop, Chrome):

  1. Open https://dev.app.publicdata.works/spending/time. After +- 10 seconds the UX appears (which is another point to optimise, but not the scope of this issue). It will show Wakefield data initially.
  2. Switch organisation to "Doncaster Council"

Result:

  • CPU usage on the client for a Chrome thread goes to 100%
  • The UX freezes during this period
  • This takes 15-20 seconds
  • Then data appears

Expected result:

  • Data loads in 1-2 seconds max
  • UX doesn't freeze

The queries to get the data run quick (100s of milliseconds max). So it has to be some other issue. The issue happened already before we moved to the DevExpress chart component and still used nvd3.

Out of memory issues with developer panel open on Chrome

With the Chrome Developer panel open, I often (1-2x per day) get out of memory errors. During development, it can also be seen that the Chrome process for the developer panel takes 1-2GB of memory.

Whilst this is not an issue end users will experience, it does suggest some inefficiencies within our code and/or the libraries we use.

image

Initial load slow with continuous high CPU usage on client

The initial load is very slow, with the client browser using 100% of one CPU core and unresponsive throughout. Reproduced on Google Chrome and Firefox on Windows. On mobile it's visible as well.

With the current setup where all organisations are loaded initially this is very apparent. However reducing the number of initially visible organisations is not enough, there's something definitely off here.

We've seen this before in #17. Not reloading the category boxes was a workaround, however I don't think we really solved the underlying problem.

I've made a screen recording to illustrate this, with the CPU usage of the Chrome process visible side by side: https://drive.google.com/file/d/0B5qbOn1QUh5LZXViNF9tNGdWT2c/view?usp=sharing

Screenshots of the CPU usage during this period. It's about 40 seconds. Slightly longer because of screen recording, but the difference is just a couple of seconds. This recording was done with a logged in user, so client data was loaded. Results for not logged on users are similar.

image

image

Logging in takes very long

With a large selection shown (in an example case all organisations, all available data), logging in can take 30-40s. During this time a little progress bar is visible in the login panel. However to end users this is a bad experience.

image

Click filter in group charts: multiple refreshes

When clicking on a bar in a group chart, the other charts are filtered (selection filter). In that case the chart refresh multiple times while they would only require a single reload with the new, filtered data. This causes a flashing experience in the UX, and possibly slower performance if some actions happen twice.

Here's a screen capture of that happening:
https://drive.google.com/file/d/0B5qbOn1QUh5LR1hhWV9tSnh2MEU/view?usp=sharing

The worst part UX-wise is that the chart that is clicked on also refreshes.

For comparison see what happens when clicking on a time chart bar. Here the time chart doesn't refresh, only the group charts. The latter are refreshed twice though.
https://drive.google.com/file/d/0B5qbOn1QUh5LS193Qmd3TFZRVDA/view?usp=sharing

Internet Explorer 11: hangs with 100% CPU on open caused by select boxes with many options

After fixing #54 the app works on IE11. However when opening, the charts are never shown and IE keeps using 100% CPU.

This continues as long as "All organisations" is selected. The UX is responsive, e.g. we can select another organisation.

When we select another organisation (For example "Bradford MDC"), the app functions correctly and albeit slower than Chrome, at reasonably usable performance.

What seems to happen is something similar to #17: a lot of time (in this case seemingly unlimited time) is spent updating the filter boxes. I conclude this from:

  1. A performance profile in the IE debugger, which shows deep stack traces creating lists of options
  2. Hiding the filter boxes is a workaround. When the HTML for the filters is hidden, the issue doesn't occur.

It's unclear why this happens on IE and not on other browsers.

Issue #17 was solved by removing some of the responsive relations between UX elements. And that's where it seems to originate: UX events triggering other UX events triggering (...). More research needed.

Empty group values marked as selected when no filter is applied

The filter bars in the group charts (category, supplier, service) are marked as selected when they are clicked, i.e. a sub filter has been applied.

In cases where the group value is empty (i.e. the council data contains an empty string for category, supplier or service - this happens quite often), the bar is incorrectly marked as selected even if the user hasn't clicked it. See the top category in the screenshot below ("Bradford MDC - ").

In general it's not good UX to show these empty categories in this way. A possible approach could be to show them for example like "Bradford MDC - (no category set)". That would automatically solve this issue.

image

Group charts empty when selecting individual organisation

Steps:

  1. Open the app - All organisations selected by default. All charts are filled with data.
  2. Select Wakefield MDC as organisation

Result:

  • Time chart is filled correctly
  • Group charts have the correct series, but show no data

When selecting All organisations again, the group charts stay empty.

image

Series not shown in legend in grouped charts

After recent commits, no legend visible in grouped charts. Legend for client series is shown. And there obviously are series in the chart.

Guess: on initialisation of the chart the series aren't loaded yet. Then on reload, the series data is set, but the chart doesn't pick it up (even though the series object is configured with bindingOptions: { ... })

image

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.