def test_can_be_aggregated_lon_lat(get_dataframe): """ Query can be aggregated to a spatial level with lon-lat data. """ hl = ModalLocation(*[ daily_location( d, spatial_unit=make_spatial_unit("lon-lat"), method="last") for d in list_of_dates("2016-01-01", "2016-01-03") ]) agg = hl.aggregate() df = get_dataframe(agg) assert ["lon", "lat", "value"] == list(df.columns)
def test_can_be_aggregated_latlong(get_dataframe): """ Query can be aggregated to a spatial level with lat-lon data. """ hl = ModalLocation( *[ daily_location(d, level="lat-lon", method="last") for d in list_of_dates("2016-01-01", "2016-01-03") ] ) agg = hl.aggregate() df = get_dataframe(agg) assert ["lat", "lon", "total"] == list(df.columns)