There are a few more changes in here than i would like.
But at a high level we have:
exploration.py
added an exploration.py file which contains a number of useful functions for dealing with spatio-temporal summaries
calculate_seasonal_anomalies() for creating a time series of 12 datapoints for each month
calculate_seasonal_anomalies_spatial() for creating a map of anomalies at each pixel for each season (will output a xr.DataArray with N timesteps being equal to the number of Q-DEC seasons in the original data
plot_bar_anomalies() which produces a barplot of anomalies from the calculate_seasonal_anomalies_spatial function colored for positive and negative anomalies.
e.g.
GroupbyRegion code
in analysis/region_analysis/groupby_region.py add functionality to take a xr.Dataset object from a .nc file and write it to a geopandas.GeoDataFrame object for spatial plotting and analysis.
unfortunately very similar to other code but it makes sense to have this very neatly in it's own location. Other code should probably call this file and its functionality
plot_regions.py
plots to show the regional aggregations calculated in src/analysis/region_analysis/groupby_region.py and src/analysis/region_analysis/administrative_region_analysis.py
analysis/region_analysis/region_geo_plotter.py
use the GroupbyRegion code for creating GeoDataFrame objects
plot_all_regional_error_metrics() function to plot:
add to evaluation.py
spatial_rmse function
spatial_r2 function for spatial evaluations
other
add docstrings in analysis/region_analysis
NOTE: some of the scripts that use these functions are in the esowc_notes repo. Some of these should probably be turned into parts of the pipeline but i will add these in at a later date (perhaps while making the notebooks!
There are a few more changes in here than i would like.
But at a high level we have:
exploration.py
exploration.py
file which contains a number of useful functions for dealing with spatio-temporal summariescalculate_seasonal_anomalies()
for creating a time series of 12 datapoints for each monthcalculate_seasonal_anomalies_spatial()
for creating a map of anomalies at each pixel for each season (will output axr.DataArray
with N timesteps being equal to the number ofQ-DEC
seasons in the original dataplot_bar_anomalies()
which produces a barplot of anomalies from thecalculate_seasonal_anomalies_spatial
function colored for positive and negative anomalies.e.g.![AMO_seasonal_anomaly](https://user-images.githubusercontent.com/21049064/63653434-7aa80700-c764-11e9-9446-c7e765bdbf76.png)
GroupbyRegion code
analysis/region_analysis/groupby_region.py
add functionality to take axr.Dataset
object from a.nc
file and write it to a geopandas.GeoDataFrame object for spatial plotting and analysis.plot_regions.py
src/analysis/region_analysis/groupby_region.py
andsrc/analysis/region_analysis/administrative_region_analysis.py
analysis/region_analysis/region_geo_plotter.py
GeoDataFrame
objectsplot_all_regional_error_metrics()
function to plot:add to evaluation.py
spatial_rmse
functionspatial_r2
function for spatial evaluationsother
analysis/region_analysis
NOTE: some of the scripts that use these functions are in the
esowc_notes
repo. Some of these should probably be turned into parts of the pipeline but i will add these in at a later date (perhaps while making the notebooks!