In [ ]:
import hmis
import time
import numpy as np
import matplotlib.pylab as plt
%matplotlib notebook

In [ ]:
# The name of the dictionary file that must be read in.
filename = '../test_data/hmis_test_data.pkl'

# Pull out the information on all the people
people = hmis.read_dictionary_file(filename)

In [ ]:
# The type of program you want to specify 
prog_type='Emergency Shelter'

# Select the individuals that have been to the specific program
ppl_based_on_program_type = hmis.select_by_program_type(people, prog_type)

In [ ]:
# Gets the average age based on program type. 
# This function only calculates the average ages for 2013, 2014, 2015 and 2016, and for all individuals before 2013.  
data_list = hmis.calc_average_age_by_year(ppl_based_on_program_type)

In [ ]:
plt.figure(figsize=(8,4))
hmis.plot_time_series(ppl_based_on_program_type)

In [ ]: