def test_dashboard_with_invalid_datatype(): with pytest.raises(ValueError): Dashboard(str)
def dash_for_Array(data): return Dashboard(data.temp)
#one_image_res = dsi.isel(time=[0]).to_array().values #plot first image dsi.isel(time=[0]).to_array().plot() #shows upsidedown than imshow # <codecell> # or, select by date/name dsi.sel(time='05/31/1969-00').to_array().plot() # <codecell> #dsi.to_netcdf('dtw_historic_with_dates.nc') dsi.to_netcdf('dtw_historic_with_dates_netcdf3.nc', format='NETCDF3_64BIT') # <codecell> dashboard = Dashboard(ds_wt) dashboard.show() # #%% select points to plot tiime variation and probability distribution one_location = ds_wt.isel(x=[600], y=[500]).to_array() #plot one_location #ds_wt.isel(x=[500], y = [500]).to_array().plot() #shows upsidedown than imshow # <codecell> how to define an xrray dataset sns.distplot(one_location) sns.distplot(one_location, bins=20, kde=False, rug=True)
def dashboard(data): return Dashboard(data)
import xarray as xr import xrviz from xrviz.dashboard import Dashboard ds = xrviz.sample_data.great_lakes dash = Dashboard(ds) dash.show()