The fruits of isolation: COVID-19 interactive map with historical schedules and migration restrictions

image


Three weeks ago, the team at Routitude and I switched from our usual tasks to creating a service to monitor the spread of the COVID-19 virus. During this time we have implemented:


  • dashboards with regularly updated data for all countries (as well as administrative subjects of Russia and the US states);
  • interactive map of the spread of infection;
  • , ;
  • .

, .


: routitude.com/map/covid, β€” .



COVID-19 β€” , SARS-CoV-2 (2019-nCoV). β€” , /, .



, .

, , .

: |


Routitude . , , (, ..). . - Routitute 1.0.


COVID-19. . 2 , , . , .



2 :


  • , . . . , .
  • , 2 : 1) 2) , . , .

image


COVID-19. (Confirmed), (Deaths), (Recovered). (Active), , (Active case rate), . , 5 , .


, . , , , , .


image



Python Flask . Vue.js , mapbox. .


(Johns Hopkins University CSSE), github . , , , . Python Pandas. .


import pandas as pd

def get_covid_daily_report(report_date):
    """
    Get coronavirus report on date
    :param report_date: requesting date of report (MM-DD-YYYY)
    :return: Pandas DataFrame with data
    """
    report_url = (
        f'https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/'
        f'csse_covid_19_data/csse_covid_19_daily_reports/{report_date}.csv'
    )
    return pd.read_csv(report_url)

df = get_daily_report('03-15-2020')

, . , , . (, , , , , ).


import pandas as pd
import requests

def get_current_covid_report():
    """
    Get current COVID-19 report
    :return: pandas DataFrame
    """
    page_url = (
        'https://en.wikipedia.org/wiki/'
        '2019%E2%80%9320_coronavirus_pandemic_by_country_and_territory'
    )
    response = requests.get(page_url)
    df = pd.read_html(response.content)[1]
    df = pd.DataFrame(
            df.values[:, 1:5], 
            columns=['country', 'confirmed', 'deaths', 'recovered']
        )
    return df

df = get_current_covid_report()

, , . , . beautifulsoup4.


?


Routitude β€” , . , , . , β€” .


.


!


All Articles