Giter Site home page Giter Site logo

dynamicgenetics / covid-19-community-response Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 168.94 MB

Mapping community support in Wales during the COVID-19 pandemic

Home Page: https://covidresponsemap.wales

License: GNU General Public License v3.0

Python 7.19% HTML 1.00% JavaScript 43.80% CSS 48.02%
covid-19 health visualization d3js

covid-19-community-response's Introduction

COVID-19 Community Response Map

DOI

This is a project to map community support in Wales throughout the COVID-19 pandemic.

We are using a range of open and government data sources to understand the population distributions that may be signigicant when planning community support, and displaying this alongside known existing sources of community support.

The project is a collaboration between the Dynamic Genetics group and Public Health Wales.

Interactive Map

To see and use the map generated by project please visit our COVID-19 Community Response Map.

Data Documentation

You can view the documentation for this project, and the data sources, on the Open Science Framework.

Technical Documentation

Documentation of the code used to create the map is available in the docs/ folder of this repository.

covid-19-community-response's People

Contributors

ninadicara avatar cmorenostokoe avatar leriomaggio avatar oliverdavis avatar altanner avatar bengcooper avatar dependabot[bot] avatar

Stargazers

Léo Gorman avatar Natalie Zelenka avatar  avatar  avatar PEP 8 Speaks avatar

Watchers

James Cloos avatar  avatar

covid-19-community-response's Issues

borgLayers file needs manual reformat before use

currently the borgLayers file needs reformat before use (i.e., removing all "* and *" strings). Valerio suggested we use a dataclass to output layers from the borg in the format we want. This stems from the issue that we are using objective javascript objects:

Desired format (obj JS):
{ key : value, "quotedKey" : value }

Current output format (JSON):
{ "key" : value, "quotedKey" : value }

Adding new data to the map

Summary

We are hoping to add new data to the map.
This issue will be a place to decide what data we will be adding, or post links to useful sources.

Ideas

Here are some of the themes that we said we would consider going forwards for ideas!
Screenshot 2021-07-22 at 12 23 34

Works in progress

  • #105

  • Twitter data

  • Update documentation

  • Update Welsh site

Variable definition is not robust enough in case one column in Master dataset is missing

If MasterDataset is missing the column mapped to a variable, the code will break as each variable accesses the corresponding data series (i.e. pd.Series) directly from master_dataset (which is a DataFrame).

Alternatively, a get method should be used, so that if the series is not there, the Variable won't be included in the generated data.json file.

(See backend.datasets.generate_json.py)

API Keys on server

Make somewhere to hold key files on server so they aren't lost when pulling new versions of the repository.

Vaccination data

I've looked into it now and the vaccination data is pulled from the same location as the COVID-19 case rate data is.
This should mean we can reuse the same functions for collecting the dataset and will just need to write new ones to process the spreadsheet.

I think we will want :
http://www2.nphs.wales.nhs.uk:8080/CommunitySurveillanceDocs.nsf/PublicPage?OpenPage&AutoFramed
title = "COVID19 vaccination downloadable data"
sheet = "HealthBoard_LocalAuthority"
filters: Risk group = "Wales residents aged 18 years and older"

There are columns for first and second dose so we might want to provide layers for both?

add on-hover to dots

Changelog:

  • add on-hover data display for point layers (e.g., showing groups for individual points on hover)

Name of IMD variable not reflecting data level (LA/LSOA) selected

Possible fixes:

  • if having LSOA data means we default to the LSOA data in all analysis then we can easily switch to prioritising the LSOA labels in the json meta data.
  • if not, we'll need a frontend fix related to responding to the variable.
  • alternatively, we just name both levels the same thing but make the name more general (e.g. 'Relative Deprivation'). This may be a better solution as this problem is quite unique to this variable.

Documentation structure and updating

Would it make sense to integrate our data documentation into the \docs\ folder of this repo so that all of the documentation would be available in one place as the docs for the code? This might look like having a code and data documentation sections on the website (present site is here) Some benefits of this might be...

  • We could host meta-data about our datasets in the repository itself.
  • Having datasets and documentation together will probably make it easier to keep docs up to date (OSF is already a bit out of date)
  • We could probably integrate some kind of variables that keep track of when each dataset was last updated (especially for live datasets), and this would automatically update this information in the documentation too.

We made the Sphynx site quite last minute so I think there's a lot we could do to make it look nicer and fit better with the theme of the main site. We could then add a documentation option to the navbar?

Users should not be able to mix layers from different sections

Being able to mix layers from different sections allows users to mix colour palettes. To maintain data interpretability this should be discouraged.

To avoid this we need to implement functionality that prevents users from mixing layers from different sections, but allows them to 'layer' within a single section.

language by LSOA data does not work

the language data in demos_LSOA does not get put onto the map. It appears to be properly compiled from csv into geojson but the generateLayers does not produce a layer for it.

Put technical documentation on readthedocs.io?

After couple of fixes to the style, I would absolutely agree to put the docs on readthedocs.

As for the launch, I would just link the docs in the landing page with static link.

Therefore, I am converting this note into an issue pro memoria futura
(my tuppence tip-of-the-day in latin for you :D)

consider layer mixing

Changelog:

  • human computer interaction considerations
  • If we keep combining layers, add radio buttons / other way to prevent people mixing layers
  • dynamically change opacity as a function of number of layers visible

implement category ordering system

Changelog:

  • implement category ordering system in map.js
  • implement category coloring system in borg.py
  • Move community to top of list and bias to bottom

Data scale and direction is confusing

Data (e.g. COVID Vulnerable (comborbidity %)) is not all scaled in the same direction, or to the same scale.
This needs to be addressed for the interpretability of the map.

so:

  1. decide direction and scale of layers
  2. scale layers
  3. set reverseColors property for data we want to reverse in colors

Nina's issue on this subject was slightly incorrect since the direction of colors (i.e., more means less or more means more of the measure) IS cureently supported (dataSources.py)

Sidebar not mobile friendly

Currently the sidebar of the map will take over the display when opened on mobile, so it is not possible to see the map.

We need a mobile implementation of the sidebar that allows it be opened, layers adjusted, and then closed again, so that mobile users can interact with the map.

Dataset import lag

Importing static dataset module takes a lot of time.

The issue is caused by global dataset constants to be defined in the module actually reading from files.

This issue could be easily fixed by replacing global constants with loading_functions.

better on hover data readout

Changelog:

  • add units to on hover data
  • consider renaming layers to shorter names on on:hover readout
  • build dictionary for these units & short names
  • revise number formatting (e.g., so there aren't 0.000 values)

Project structure - potential for git submodules?

Making an issue for this discussion that we had a few month ago to decide whether we want to do this going forwards.
The idea was that we could have two repositories, one for the website and one for the data backend.
Making them separate might make it easier to:
a) update the map without having to pull the entire repo
b) treating the data behind the map and the frontend as separate outputs (e.g. someone might want to reuse the frontend, and would just need to edit it and then provide a data.json file that is formatted as expected).
(Tagging all of us in this one as something to potentially discuss as a group)

Some questions about this though.

  • Do we want the dataset we create to have its own repo , or do we want the datasets and code together as they are now in the /backend/ folder?
  • Would this be much work? i.e. is it worth doing vs benefit we'd get from it?

Documentation structure does not reflect map layers

The documentation of data sources, and pages with explanations of sources, should match the layers on the map. This needs to be changed to make sure the map documentation is easy to navigate for those not familiar with the data.

fix scrolling issue

Changelog:

  • scrolling moves the whole page (source: Nina)
  • sidebar size overflows page (source: Nina)

move bias to new map

Changelog:

  • consider whether bias should exist on a different map or could be a different map view on the same page / layer
  • consider what risk of bias means (e.g., rename to factors affecting data quality)
  • implement new bias map mode/view/page

Inconsistent geography file use

Scrapers files and the main data pipeline currently use different versions of the LA and LSOA boundaries files (in static/geoboundaries). Need to implement 'single point of failure' for loading and using these files in scripts, and to ensure all scripts are using the same version. This will also need to be integrated with the frontend.

revise language

Changelog:

  • consider our audience when naming layers and ensure they make sense and are accessible

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.