1 from predictops.engine import Engine
2 from predictops.learn.preprocessing import Preprocessing
3 from predictops.target.toarea import ToArea
5 from logging import getLogger
6 from logging.config import fileConfig
7 from pathlib import Path
9 import geopandas as gpd
11 fileConfig((Path.cwd() / 'config') / 'logging.cfg')
14 if __name__ == '__main__':
16 config = (Path.cwd() / 'config') / 'learn.cfg'
17 engine = Engine(config_file = config)
21 process = Preprocessing(config_file = config, dict_features = engine.X)
24 #print(engine.X[datetime.strptime('06/30/2010 21:00:00', '%m/%d/%Y %H:%M:%S')])
25 print(process.dataframe.head(n=20))
26 print(process.dataframe.tail(n=20))
29 depts = gpd.read_file( Path.cwd() / 'data' / 'targets' / 'departments' / "departements-20180101.shp")
30 Doubs = depts.loc[depts['nom'] == 'Doubs'].iloc[0]
32 ToArea(area=Doubs.geometry,
33 start = start, end = end,
34 csv_file = Path.cwd() / 'data' / 'targets' / 'sdis25' / 'interventions.csv')