Coder Social home page Coder Social logo

epicollect / epi-collect Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 3.0 7.45 MB

๐ŸŒ๐ŸŒŽ๐ŸŒ Liberate Google Takeout location data for epidemiological research and local contact tracing https://epi-collect.org

License: MIT License

Makefile 0.79% Dockerfile 0.75% Python 19.95% HTML 0.66% TypeScript 75.29% CSS 2.56%
covid-19 covid19 coronavirus coronavirus-tracking google-takeout epidemiology epidemiology-analysis

epi-collect's People

Contributors

larsmennen avatar nessup avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

epi-collect's Issues

Unzip data on the client

Currently we unzip the Google Takeout data on the server. This works well, but requires large data uploads and processing power on the server. It'd be better if we can do this on the client.

Fix warning about state update on unmounted component

Description

When navigating back to the map to filter data, there's a minor bug where clicking on a previously drawn polygon causes an attempted state update on an unmounted component.

Steps to reproduce

  1. Go to http://localhost:3000/wizard
  2. Upload some data (e.g. in tests/data)
  3. Draw some polygons on the map
  4. Click 'Next'
  5. Now go back via the breadcrumbs to 'Review and filter data'.
  6. Click the "hand" icon to go into dragging mode.
  7. Click on the polygon.
  8. Console will throw:
index.js:1 Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
    in GeoMap (at GeoMap.tsx:23)
    in Unknown (at SelectData.tsx:21)
    in div (at SelectData.tsx:20)
    in SelectData (created by Context.Consumer)
    in Route (at Wizard.tsx:85)

This warning should not appear.

In data deletion process, show user number of data points that will be deleted

Current state

When a user wants to delete their data using their token on https://epi-collect.org/delete, at the moment as soon as they click submit all their data will be deleted (after it has been verified to be a correct token in the backend).

Desired state

When a user wants to delete their data:

  1. They enter their token
  2. They see in the UI that this will delete X locations and Y answers to questions they submitted.
  3. They can confirm deletion.

Changes required

  • In the backend (api.py), the current delete route will need to be split into two: one route that returns the number of data points and one to confirm deletion.
  • In the frontend, when submitting, we first call the first route, then show a modal / other UI component to the user stating how many data points there are and allow them to confirm. Then call the second route and delete the data.

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.