Giter Club home page Giter Club logo

gps-visualiser's Introduction

GPS Visualiser

Summarisation of the findings in Global Pneumococcal Sequencing Project (GPS) country-specific analysis papers in a visual format.

This summarisation effort is composed of a Python script and a website.

 

Python Script

The Python script processor.py in the data subdirectory extracts and processes data from the GPS database (not publicised) and export a JSON file data.json to be taken up by the website.

The script has one global dictionary and two global lists that can be modified.

  • TABLE_NAMES: The value of each key can be changed to match the tables in the GPS database.
  • ANTIBIOTICS: It should contain full names of FIVE target antibiotics.
  • COUNTRIES: It should contain tuples of ("Country Alpha-2 Code", "Value in 'Country' Columns of the Database", "Link to research article") of the countries that should be included in data.json. The tuple requirement is due to the country names not being standardised in the database, and links to papers are not included in the database. If the paper is not yet available, put the "Link to research article" as an empty string "".

To generate the data.json, put the database in the same directory as the script and run the following command (change database.db to the file name of the database):

python processor.py database.db

 

Website

The website takes the JSON file data.jsonin the data subdirectory and renders the charts in both global and pre-country views on the fly. The website utilises HTML5, JavaScript (vanilla JavaScript with D3.js for chart rendering) to run fully on the client-side. This website has a responsive web design using a mixture of CSS Flexbox and Media Query, but is not yet optimised for mobile devices.

 

Requirements & Compatibility

Python script requirements:

Website tested on:

  • Firefox 101
  • Chrome 102
  • Safari 15

GPS Database requirement:

  • v3.3

 

Live Website

The live website is available at https://www.pneumogen.net/gps/gps-visualiser/. It might not be based on the latest code at all time.

 

Credits

This project uses Open Source components. You can find the source code of their open source projects along with license information below. I acknowledge and am grateful to these developers for their contributions to open source.

Country Flags in SVG

D3.js

Pandas

Sequences Icicle

Sequences Sunburst

SVG World Map JS

gps-visualiser's People

Contributors

harryhung avatar

Stargazers

 avatar

Watchers

 avatar Victoria Dyster avatar

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.