LandUse prediction

[1]:
from blocksnet import City, LandUsePrediction

city = City.from_pickle('../data/model.pickle')
[6]:
lup = LandUsePrediction(city_model=city)

Cosine similarity

[7]:
result = lup.calculate()
result.head()
100%|██████████| 16320/16320 [00:24<00:00, 663.45it/s]
[7]:
geometry land_use
id
0 POLYGON ((354918.622 6625258.829, 354901.464 6... None
1 POLYGON ((355412.142 6623378.149, 355411.700 6... None
2 POLYGON ((353934.329 6625429.433, 353923.453 6... AGRICULTURE
3 POLYGON ((355099.099 6623847.765, 355074.808 6... AGRICULTURE
4 POLYGON ((352766.168 6621954.748, 352744.412 6... RESIDENTIAL
[8]:
LandUsePrediction.plot(result)
../../_images/examples_methods_land_use_prediction_5_0.png

Other way around

[9]:
result = lup.calculate(False)
result.head()
100%|██████████| 16320/16320 [00:22<00:00, 725.87it/s]
[9]:
geometry land_use
id
0 POLYGON ((354918.622 6625258.829, 354901.464 6... None
1 POLYGON ((355412.142 6623378.149, 355411.700 6... None
2 POLYGON ((353934.329 6625429.433, 353923.453 6... None
3 POLYGON ((355099.099 6623847.765, 355074.808 6... None
4 POLYGON ((352766.168 6621954.748, 352744.412 6... RESIDENTIAL
[10]:
LandUsePrediction.plot(result)
../../_images/examples_methods_land_use_prediction_8_0.png