Skip to content

Predictive model for health and safety inspections in the USA

Notifications You must be signed in to change notification settings

adrian-soto/HSinspect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HSinspect

Predictive model for health and safety inspections in the USA. It is based in data from the Occupational Health and Safety Administration, curated by Enigma public

https://public.enigma.com/browse/occupational-safety-and-health-administration-osha/98fa73e5-f974-4c46-8419-8010543c3cd2

The model is based on the random forest algorithm and it predicts both the outcome of a violation and its probability.

Getting Started

This Python code:

  1. creates the SQL database
  2. trains and validates the model, optimizing hyperparameters
  3. evaluates its performance
  4. creates maps of violations by US state

Prerequisites

This code is Python 2.7 and relies on the following packages:

  • numpy
  • matplotlib
  • pandas
  • postgresql
  • sqlalchemy
  • psycopg2
  • basemap

Please ensure these packages are installed before attempting to run this code

Authors

  • Adrián Soto

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

About

Predictive model for health and safety inspections in the USA

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published