Giter Site home page Giter Site logo

marcmaceira / covid-19-mobility-tracker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pastelsky/covid-19-mobility-tracker

0.0 1.0 0.0 2.14 MB

Google Mobility Reports, reverse-engineered into a JSON / CSV API

License: MIT License

JavaScript 100.00%

covid-19-mobility-tracker's Introduction

Covid-19 Mobility Tracker

last synced from source last update from google

Note

Note: Google recently started publishing raw CSV data for this, and following it is recommended for all future updates.

This project would still continue update sources, but it might not be as realtime.

Google Mobility Reports show aggregate activity in each country, and how it changes in response to policies aimed at combating COVID-19. However, it is only published as a PDF and the data isn't available in a machine-readable format that could enable more richer analysis.

This is an effort to reverse-engineer the PDFs into vectors and ultimately into time-series data available as a JSON Rest API.

alt text

Usage

Country-level data

Country level JSON is available for use at –

https://pastelsky.github.io/covid-19-mobility-tracker/output/<ISO-COUNTRY-CODE>/mobility.json

For eg India: https://pastelsky.github.io/covid-19-mobility-tracker/output/IN/mobility.json

US State-level data

US state level JSON is available at –

https://pastelsky.github.io/covid-19-mobility-tracker/output/US/<US-STATE-CODE>/mobility.json

For eg: New York: https://pastelsky.github.io/covid-19-mobility-tracker/output/US/NY/mobility.json

Accessing data as CSV

If you prefer to use CSVs instead, you can go to -

https://pastelsky.github.io/covid-19-mobility-tracker/output/<ISO-COUNTRY-CODE>/mobility-<social-place>.csv

Where social place is one of parks | residential | retail-and-recreation | transit-stations | workplaces | grocery-and-pharmacy

For eg. parks data for India in CSV - https://pastelsky.github.io/covid-19-mobility-tracker/output/IN/mobility-parks.csv

For US states, just add the state code after the country code.

Data structure

Each data element consists of date and value (which represents mobility change in percentage)

Limitations

  • Expected error range is ±2%, though errors in activity percentanges should be rare given the methodolgy used to extract data.
  • As of now, this only indexes country-level data and US state level data. State / Province level breakup for other countries is yet to be added.
  • Data sources will be updated once / day and is incumbent upon google publishing updated reports
  • It assumes that the same scale (-80% to +80%) is used in all PDFs and they are structured similarly.

Contributing

  1. Run yarn install to install dependencies.

  2. Install Inkscape 1.1-dev for your OS, and make sure the inkscape is available as in your path as a command line utility. You can test this using inkscape --version

  3. Run yarn build to begin downloading reports form google, and parsing it into the ouput folder.

Credits

All data made available for use is by taken from Google Mobility Reports. This project does not claim any ownership over this data, and is not reponsible for guaranteeing accuracy of this data.

covid-19-mobility-tracker's People

Contributors

pastelsky avatar

Watchers

James Cloos 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.