Overview

Medicare has collected data on many different hospitals throughout the country to allow users to compare the quality of these institutions before using their services. Data includes descriptions of the location of the hospitals, information about the hospitals' emergency services and type of hospital, and outpatient volume for the different wards of the hospitals.

https://data.medicare.gov/data/hospital-compare

Explore Structure




Index Type Example Value
0 dict { }
... ... ...
Key Type Example Value Comment
"Information" dict { }
"Outpatient Volume" dict { } Outpatient data for 2014.
"Provider ID" str "110004"
"Location" dict { }
Key Type Example Value Comment
"City" str "FORT OGLETHORPE"
"ZIP Code" str "30742"
"Longitude" float -85.263105
"County" str "CATOOSA"
"State" str "GA"
"Address" str "100 GROSS CRESCENT"
"Latitude" float 34.949143
Key Type Example Value Comment
"Genitourinary" int 113
"Eye" int 244
"Nervous System" int 710
"Musculoskeletal" int 76
"Skin" int 25
"Gastrointestinal" int 395
"Cardiovascular" int 14
Key Type Example Value Comment
"Type" str "Acute Care Hospitals"
"Phone Number" str "7068582101"
"Emergency Services" str "Yes"
"Name" str "HUTCHESON MEDICAL CENTER"
"Ownership" str "Government - Hospital District or Authority"

Downloads

Download all of the following files.

Usage

This library has 1 function you can use.
import hospitals
list_of_hospital = hospitals.get_hospitals()
Additionally, some of the functions can return a sample of the Big Data using an extra argument. If you use this sampled Big Data, it may be much faster. When you are sure your code is correct, you can remove the argument to use the full dataset.
import hospitals
# These may be slow!
list_of_hospital = hospitals.get_hospitals(test=True)

Documentation

 hospitals.get_hospitals(test=False)

Returns hospitals from the dataset.