refactor to remove region magic constant
add some test coverage around get_config
add ability to control how many datapoints to get back
add way to specify stat period