Description Usage Arguments Details Value Examples
This function converts gauge information including names, codes, coordinates and time-series from a typical spread-sheet layout (in .csv, .xls, or .txt) to a STFDF (spacetime) object. The time-stamps are also converted from the local time-zone to UTC. Use data(gauges.hh.piura) to obtain an example of the format of the data-frame for which this function is designed.
1 | spacetime_gauge(gauges, projection, timezone)
|
gauges |
A dataframe containing gauge information in a typical format. Type data (gauges.piura) to see an example. |
projection |
A character string detailing the projection CRS. See the |
timezone |
a numeric value, describing the timezone difference to UTC (all GPM-IMERG data is in UTC) so that the gauge time-series can be converted to UTC. Negative value imply western hemisphere, e.g. Peru = -5. |
This function converts gauge information including names, codes, coordinates and time-series from a typical spread-sheet layout (in .csv, .xls, or .txt) to a STFDF (spacetime) object. The time-stamps are also converted from the local time-zone to UTC. Use data(gauges.hh.piura) to obtain an example of the format of the data-frame for which this function is designed.
Object gauges
A STFDF (spacetime) object containing the spatial information (i.e. gauge locations with attributes) and temporal information (i.e. precipitation time-series for each gauge location).
1 2 3 4 5 6 7 8 | data(gpm.hh.piura) # STFDF object with gpm imerg observations for the Piura region in Peru
gpm <- gpm.hh.piura
data(gauges.hh.piura) # STFDF object with gauge observations for the Piura region in Peru
gauges <- gauges.hh.piura
gauges <- spacetime_gauge(gauges,projection="+proj=longlat +ellps=WGS84 +datum=WGS84", timezone=-5)
str(gauges)
gauges.sp <- gauges@sp # extract spatial information of gauge locations
gauges.ts <- as(gauges[,,1],"xts") # extract gauges time-series
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.