Code Monkey home page Code Monkey logo

death-certificate-project's Introduction

death-certificate-project

Project to collect, organize, and transform death certificate data for use in an academic research project.

Scrape

The data is obtained using a two part web scraper, featuring a browser extension (designed for Firefox), which copies data from the page and into a consistent JSON format and a python script featuring pyautogui to navigate the webpage and save the data into series of files.

Load

load_death_certs.py provides the facility to load the created JSON files into an available CouchDB document database, simultaneously providing an initial pass of data regularization.

Clean

dedup.py implements some wrappers around the CouchDB API to provide reuseable ability to search and update records in the database, as well as functionality to interactively clean up key fields in the database. Namely, given a file of suspected death date/name duplicates in the database, main() provides a facility for quickly comparing records to determine if they are truly duplicates, and deleting duplicated records. Additionally get_suggestions() provides the core functionality to use fuzzy matching to standardize the spelling of any of the free text fields in the data, by comparing the distinct values of a variable with a set of known good responses. This was used to reduce the number of distinct spellings of cities where individuals died from tens of thousands to fewer than one hundred, which could then be reliably filtered against.

For birthplaces, there was significantly more variety, requiring a more powerful approach. categorize.py defines a LocationForest tree structure which allows a user to progressively build a hierarchy of valid locations by using regular expressions to progressively categorize the uncategorized locations into new or existing leaves of the tree, starting with the most popular labels from the database in order to get the most value possible for a given effort put into categorizing.

uploadDC.zsh was used to associate images of death certificate records with their corresponding records in the database for easy availability.

death-certificate-project's People

Contributors

tthansel avatar

Watchers

 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.