tcarleton / stagg

Spatiotemporal Aggregation for Climate Data
Other
13 stars 0 forks source link

Readme documentation: staggregate_polynomial #8

Closed gmcdonald-sfg closed 2 years ago

gmcdonald-sfg commented 2 years ago

Under step 3, when you provide the example code starting with polynomial_output <- staggregate_polynomial(, include the argument names in the function call.

So this would be:

polynomial_output <- staggregate_polynomial(

  data = prcp_kansas_dec2011_era5, # A raster brick of our primary data, typically but 
                            # not necessarily climate data. For now, data must 
                            # start at midnight and be hourly.

  overlay_weights = county_weights,           # Output from Step 2, determined here by 
                            # area-normalized cropland weights for grid cells 
                            # within each county in Kansas

  daily_agg = "sum",        # How to aggregate hourly values to the daily level,
                            # "sum" and "average" are the only options. Here we 
                            # want total daily precipitation. 

  time_agg = "month",       # The temporal level to aggregate daily transformed 
                            # values to. Current options are "day", "month", and
                            # "year" 

  degree = 3                # The highest order of the polynomial. Here this 
                            # will create variable 3 columns: x, x^2, and x^3
  )