1 from predictops.engine import Engine
2 from predictops.learn.preprocessing import Preprocessing
4 from logging import getLogger
5 from logging.config import fileConfig
6 from pathlib import Path
8 import geopandas as gpd
10 fileConfig((Path.cwd() / 'config') / 'logging.cfg')
13 if __name__ == '__main__':
15 config = (Path.cwd() / 'config') / 'learn.cfg'
16 engine = Engine(config_file = config)
21 process = Preprocessing(config_file = config, dict_features = engine.X)
23 print(process.dataframe.head(n=20))
24 print(process.dataframe.tail(n=20))
26 #target = toarea(stream_file = Path.cwd() / 'data' / 'targets' / 'sdis25' / 'interventions.csv')
31 depts = gpd.read_file( Path.cwd() / 'data' / 'targets' / 'departments' / "departements-20180101.shp")
32 Doubs = depts.loc[depts['nom'] == 'Doubs'].iloc[0]
34 ToArea(area=Doubs.geometry,
35 csv_file = Path.cwd() / 'data' / 'targets' / 'sdis25' / 'interventions.csv')