GithubHelp home page GithubHelp logo

teng2015 / 2019-wuhan-coronavirus-data Goto Github PK

View Code? Open in Web Editor NEW

This project forked from globalcitizen/2019-wuhan-coronavirus-data

0.0 1.0 0.0 40.93 MB

2019 Wuhan Coronavirus data (2019-nCoV)

License: GNU General Public License v3.0

Shell 4.83% Perl 13.54% PHP 81.63%

2019-wuhan-coronavirus-data's Introduction

2019 Wuhan Coronavirus data (2019-nCoV)

Note: No longer updated. I have resigned from Wikipedia in protest at content deletion.

This public repository archives data over time from various public sources on the web.

Data is presented as timestamped CSV files, for maximum compatibility.

It is hoped that this data will be useful to those producing visualizations or analyses.

Code is included.

Sample animation

Shown here in GIF format. There is a better (smaller/higher resolution) webm format also generated.

image

Sample visualization

image

image

Generates static SVGs.

Source images were this one and this one.

Generating

China

For a China map, the following command sequence will grab data from DXY and render it.

./build china

You now have timestamped JSON, CSV and SVG files in the data-sources/dxy/data/ subdirectory.

World

For a world map, the process is similar.

./build world

You now have timestamped CSV and SVG files in data-sources/bno/data.

Software Dependencies

Probably an incomplete list:

  • bash
  • perl
  • php
  • imagemagick
  • ffmpeg
  • wget

Sources used

Includes detail on foreign sources, individual provincial update URLs. Updated once per day or so.

High level information without specific source URLs. However, this is updated frequently and appears to be the best available data.

TODO

Links of note

Other projects

How this was built (non-technical explanation)

This section is written for the curious / non-technical user.

The general approach to problems such as these is as follows:

  1. Gather the data
  2. Modify and store it
  3. Do something with it.

Gather the data

The area of programming surrounding gathering data from websites that were not explicitly designed for it is called web scraping.

In general, web scraping consists of making an HTTP (web) request to the website in question, parsing (or interpreting) the response, and extracting the data of interest. Thereafter some modification may be required.

Modify and store it

We translate some Chinese and English information (toponyms or geographic region names) in to a known format by matching against a static database file for countries and a similar file for regions in or near China.

We then store the data in various formats, mostly CSV and JSON, which are timestamped in a most to least significance format, inspired by the ISO 8601 standard, to aid in sorting.

Do something with it

Finally, we further interpret and process the data in two stages.

Static image generation

First, we transform some reference SVG maps gathered from Wikimedia Commons by applying the data we have captured.

Combine in to an animation

Finally we animate multiple such resulting images in to two formats, animated GIF and the greatly superior and far more modern webm container format with VP9 encoding. This is done using the open source tools imagemagick and ffmpeg.

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.