Skip to main content

Occupancy analysis tool for systems having time of day and day of week effects

Project description

hillmaker

hillmaker is a Python package that computes time of day and day of week specific occupancy statistics from transaction data containing arrival and departure timestamps. Typical use is for capacity planning problems in places like hospital emergency departments, surgical recovery rooms or any system in which entities arrive, occupy capacity for some amount of time, and then depart. It gets its name from the hill-like nature of plots based on temporal occupancy statistics.

hillmaker Screenshot

  • Takes a pandas DataFrame or csv file as the input data type
  • Functions for computing arrival, departure and occupancy summary statistics by time of day, day of week, and entity category based on a pandas DataFrame containing one record per visit.
  • Functions for computing arrival, departure and occupancy for each datetime bin in the analysis period, by zero or one category fields.
  • Select any time bin size (minutes) that divides evenly into a day.
  • Output statistics includes sample size, mean, min, max, standard deviation, coefficient of variation, standard error, skew, kurtosis, and percentiles.
  • Output CSV files are written by default but can be supressed.
  • Optionally capture outputs as a dictionary of pandas DataFrames for further post-processing (e.g. plot creation).
  • Requires Python 3.7+ and pandas 1.2.0+
  • MIT License

Where to get it

Quick Start

A companion repo, https://github.com/misken/hillmaker-examples/ contains Jupyter notebooks and Python scripts illustrating the use of hillmaker.

You can see an html version of the basic_usage_shortstay_unit notebook here.

The source and a binary wheel are available from PyPi. You can install using pip:

pip install hillmaker

Learn more about hillmaker

Hillmaker has been around in various forms for over 30 years. A few blog posts describing how it works are available though many things about the API as well as the computational guts of hillmaker have changed with this recent version.

I published a paper a long time ago regarding the use of hillmaker in practice.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hillmaker-0.4.2.tar.gz (16.5 kB view hashes)

Uploaded Source

Built Distribution

hillmaker-0.4.2-py3-none-any.whl (17.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page