<jupyter_start><jupyter_text>Getting Started===============Installation------------You can install the package with pip from [PyPI](https://pypi.org/project/timeatlas/)    pip install timeatlasHandle TimeSeries-----------------TimeAtlas is a library to handle time series of any kind. Let's create aTimeSeries object.<jupyter_code>from timeatlas import TimeSeries
from pandas import DataFrame, DatetimeIndex

index = DatetimeIndex(['2019-01-01', '2019-01-02', '2019-01-03', '2019-01-04','2019-01-05', '2019-01-06', '2019-01-07', '2019-01-08','2019-01-09', '2019-01-10', '2019-01-11', '2019-01-12'])
my_series = DataFrame([0.4, 1.0, 0.7, 0.6, 0.4, 1.0, 0.7, 0.6, 0.4, 1.0, 0.7, 0.6], index=index)

ts = TimeSeries(my_series)
ts<jupyter_output><empty_output><jupyter_text>Like in Pandas, you can check its main characteristics with `TimeSeries.describe()`<jupyter_code>ts.describe()<jupyter_output><empty_output><jupyter_text>You can visualize it with the `TimeSeries.plot()` function<jupyter_code>ts.plot()<jupyter_output><empty_output><jupyter_text>What about Metadata ?---------------------TimeAtlas includes a Metadata object allowing you to add some typed metadataobject. For instance :<jupyter_code>from timeatlas import Metadata, types

my_unit = types.Unit("power", "W", "float")
my_sensor = types.Sensor(2902, "HB/floor2/22-23C/Prises_Power_Tot")
my_coords = types.Coords(46.796611, 7.147563)

# You can also use Python dictionaries
my_location = {
    "building" : "Blue Factory",
    "floor" : "12",
    "room"  : "22C"
}

my_dict = {
    "unit": my_unit,
    "sensor": my_sensor,
    "location": my_location,
    "coordinates": my_coords
}

# Create the Metadata object
my_meta = Metadata(my_dict)
my_meta<jupyter_output><empty_output><jupyter_text>And we can create a `TimeSeries` object with its associated metadata.<jupyter_code>ts_meta = TimeSeries(my_series, my_meta)
ts_meta.plot()<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup