Coder Social home page Coder Social logo

abbasnikbakht / google-covid19-mobility-reports Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vitorbaptista/google-covid19-mobility-reports

0.0 1.0 0.0 41.42 MB

Data extraction of Google's COVID-19 Mobility Reports

License: MIT License

Makefile 0.04% HTML 93.02% Python 6.94%

google-covid19-mobility-reports's Introduction

Google COVID-19 Mobility Reports

Archive of the Google COVID-19 Mobility Reports' PDFs and their data extracted as a CSV.

Motivation

Google launched a series of reports on their user's mobility during the Coronavirus pandemic. According to their website, the reports "chart movement trends over time by geography, across different categories of places such as retail and recreation, groceries and pharmacies, parks, transit stations, workplaces, and residential."

https://www.google.com/covid19/mobility/

This data is very interesting and important during these times. However, it's only available as a PDF per country (or per State in the USA). This project has two goals:

  1. Provide an archive of the reports
  2. Extract this data into a more convenient format (CSV or JSON)

Where is the data?

How reliable is the CSV?

I've been very careful in checking that the data in the CSV corresponds to the data in the PDF. There are tests to reduce the possibility of bugs being introduced, and I manually checked a few of the results.

That being said, there are no guarantees that the data is error-free. I recommend double checking the CSV with the raw PDFs if you want to be sure. If you find any errors, please create an issue.

Installing

To run it locally, you need pdftotext and a recent Python version (tested on 3.8, but it should work on 3.6+). You can then download any new reports and parse the files by running make.

This will download the main Mobility Reports' HTML page, saving it into data/raw/html, then download any new PDF reports into data/raw/reports, and finally parse them, saving the results to data/processed/mobility_reports.csv.

If you want to convert a single report PDF to CSV, run:

PYTHONPATH=. python mobility_reports/cli.py <PATH_TO_THE_PDF>

This command accepts multiple paths, and outputs the CSV to stdout.

License

The data is copyrighted by Google. Everything else is licensed under the MIT License.

google-covid19-mobility-reports's People

Contributors

vitorbaptista avatar actions-user 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.