|
68 | 68 | "| event_id |list(int)| id (>0) of each hazard event (Hazard.event_id)|\n", |
69 | 69 | "| event_name |(list(str))| name of each event (Hazard.event_name)|\n", |
70 | 70 | "| date |np.array| date of events (Hazard.date)|\n", |
71 | | - "| coord_exp |np.array| exposures coordinates [lat, lon] (in degrees) (Exposure.gdf["latitudes"], Exposure.gdf["longitude"])|\n", |
| 71 | + "| coord_exp |np.array| exposures coordinates [lat, lon] (in degrees) (Exposure.gdf['latitudes'], Exposure.gdf['longitude'])|\n", |
72 | 72 | "| frequency |np.array| frequency of events (Hazard.frequency)|\n", |
73 | 73 | "| frequency_unit |str| unit of event frequency, by default '1/year', i.e., annual (Hazard.frequency_unit)|\n", |
74 | 74 | "| unit |str| value unit used (Exposure.value_unit)|\n", |
|
1468 | 1468 | "\n", |
1469 | 1469 | "# Set Hazard in Exposures points\n", |
1470 | 1470 | "# set centroids from exposures coordinates\n", |
1471 | | - "centr_pnt = Centroids.from_lat_lon(exp_pnt.gdf["latitude"].values, exp_pnt.gdf["longitude"].values, exp_pnt.crs)\n", |
| 1471 | + "centr_pnt = Centroids.from_lat_lon(exp_pnt.gdf['latitude'].values, exp_pnt.gdf['longitude'].values, exp_pnt.crs)\n", |
1472 | 1472 | "# compute Hazard in that centroids\n", |
1473 | 1473 | "tr_pnt = TCTracks.from_ibtracs_netcdf(storm_id='2007314N10093')\n", |
1474 | 1474 | "tc_pnt = TropCyclone.from_tracks(tr_pnt, centroids=centr_pnt)\n", |
|
1492 | 1492 | "# Compute Impact\n", |
1493 | 1493 | "imp_pnt = ImpactCalc(exp_pnt, impf_pnt, tc_pnt).impact()\n", |
1494 | 1494 | "# nearest neighbor of exposures to centroids gives identity\n", |
1495 | | - "print('Nearest neighbor hazard.centroids indexes for each exposure:', exp_pnt.gdf["centr_TC"].values)\n", |
| 1495 | + "print('Nearest neighbor hazard.centroids indexes for each exposure:', exp_pnt.gdf['centr_TC'].values)\n", |
1496 | 1496 | "imp_pnt.plot_scatter_eai_exposure(ignore_zero=False, buffer=0.05);" |
1497 | 1497 | ] |
1498 | 1498 | }, |
|
1716 | 1716 | "# Compute impact\n", |
1717 | 1717 | "imp_ras = ImpactCalc(exp_ras, impf_ras, haz_ras).impact(save_mat=False)\n", |
1718 | 1718 | "# nearest neighbor of exposures to centroids is not identity because litpop does not contain data outside the country polygon\n", |
1719 | | - "print('\\n Nearest neighbor hazard.centroids indexes for each exposure:', exp_ras.gdf["centr_FL"].values)\n", |
| 1719 | + "print('\\n Nearest neighbor hazard.centroids indexes for each exposure:', exp_ras.gdf['centr_FL'].values)\n", |
1720 | 1720 | "imp_ras.plot_raster_eai_exposure();" |
1721 | 1721 | ] |
1722 | 1722 | }, |
|
1967 | 1967 | "\n", |
1968 | 1968 | "# compute sequence of hazards using TropCyclone video_intensity method\n", |
1969 | 1969 | "exp_sea = add_sea(exp_video, (100, 5))\n", |
1970 | | - "centr_video = Centroids.from_lat_lon(exp_sea.gdf["latitude"].values, exp_sea.gdf["longitude"].values)\n", |
| 1970 | + "centr_video = Centroids.from_lat_lon(exp_sea.gdf['latitude'].values, exp_sea.gdf['longitude'].values)\n", |
1971 | 1971 | "centr_video.check()\n", |
1972 | 1972 | "\n", |
1973 | 1973 | "track_name = '2017242N16333'\n", |
|
0 commit comments