1 from predictops.engine import Engine
2 from predictops.learn.preprocessing import Preprocessing
3 from predictops.target.all import All
4 from predictops.target.toarea import ToArea
6 from logging import getLogger
7 from logging.config import fileConfig
8 from pathlib import Path
10 import geopandas as gpd
12 fileConfig((Path.cwd() / 'config') / 'logging.cfg')
15 if __name__ == '__main__':
17 config = (Path.cwd() / 'config') / 'learn.cfg'
18 engine = Engine(config_file = config)
22 process = Preprocessing(config_file = config, dict_features = engine.X)
25 #print(engine.X[datetime.strptime('06/30/2010 21:00:00', '%m/%d/%Y %H:%M:%S')])
26 print(process.dataframe.head(n=20))
27 print(process.dataframe.tail(n=20))
30 target = All(stream_file = Path.cwd() / 'data' / 'targets' / 'sdis25' / 'interventions.csv')
35 depts = gpd.read_file( Path.cwd() / 'data' / 'targets' / 'departments' / "departements-20180101.shp")
36 Doubs = depts.loc[depts['nom'] == 'Doubs'].iloc[0]
38 ToArea(area=Doubs.geometry,
39 start = start, end = end,
40 csv_file = Path.cwd() / 'data' / 'targets' / 'sdis25' / 'interventions.csv')