load_historical_data

museotoolbox.datasets.load_historical_data(return_X_y=False, return_X_y_g=False, centroid=False, low_res=False)[source]

Get a sample of a french Historical map made by the army (carte d’état-major). These maps are used to identify forest in the 1800’s.

Field of the vector containning the label class is Class.

Classes

5

Samples total

12647

Number of polygons

17

Dimensionality

3

Features

integer

Parameters
  • return_X_y (boolean, optional (default=False)) – If True, returns (data, target) instead of a path of files.

  • return_X_y_g (boolean, optional (default=False)) – If True, returns the polygon id for each feature.

  • centroid (boolean, optional (default=False)) – If True, return the path of the centroid for each feature.

  • low_res (boolean, optinal (default=False)) – If True returns a low resolution of the raster, so you will have also less features.

Returns

  • raster,vector (list of str.) – Return path of raster and vector files if

  • (data, target) (tuple if return_X_y is True)

  • (data, target, group) (tuple if return_X_y_g is True)

References

https://github.com/nkarasiak/HistoricalMap

Examples

>>> X, y = load_historical_data(return_X_y=True)
>>> X.shape, y.shape
(12647, 3) (12647,)
>>> raster,vector = load_historical_data()
>>> raster
/mnt/DATA/lib/MuseoToolBox/museotoolbox/datasets/_historicalmap/map_compress.tif
>>> vector
/mnt/DATA/lib/MuseoToolBox/museotoolbox/datasets/_historicalmap/train.gpkg