Giter Site home page Giter Site logo

covid19-pdf-parser's Introduction

Okinawa COVID-19 Cases PDF parser

About

The tool will download the latest PDF from 新型コロナウイルス感染症患者・無症状病原体保有者の発生について and convert it to a csv file.

Important Notice

⚠️‼️ This output result cannot be used as a raw data directly ‼️⚠️

Because of the extracted data relies on the PDF format, this parser may miss some data from the PDF document due to incomplete table border. Please check the raw data before implement to your project.

There is a output report for a reference

./data/report.txt

Require tool

pdfplumber

$ pip install requests BeautifulSoup4 pdfplumber pandas pypdf2 fpdf2

How-To

Execute converter

Auto download PDF from Okinawa Prefecture Government and preprocess the PDF files

$ python3 auto_dl_process.py

[output] ./pdf/processed_latest.pdf

Parse the processed PDF and generate the CSV file

$ python3 auto_parser.py

[output] 
./data/auto_output.csv
./data/auto_summary.csv
./data/report.txt

Parse local PDF file

$ python3 parser.py [path/to/file.pdf]

Output File

./data/auto_output.csv
./data/auto_summary.csv
./data/manual_output.csv

Project Folder Structure

├── archive (old dev code)
├── data
│   ├── auto_output.csv (created hourly from auto_parser.py)
│   ├── auto_summary.csv (created hourly from auto_parser.py)
│   ├── manual_ouput.csv (created from parser.py)
│   └── report.txt
└── pdf
    ├── 68_1308.pdf
    ├── 67_1243.pdf
    └── [...].pdf

covid19-pdf-parser's People

Contributors

amouro 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.