isd_read: Read NOAA ISD/ISH local file

Description Usage Arguments Details Value References See Also Examples

View source: R/isd_read.R

Description

Read NOAA ISD/ISH local file

Usage

1
2
3
4
5
6
7
isd_read(
  path,
  additional = TRUE,
  parallel = FALSE,
  cores = getOption("cl.cores", 2),
  progress = FALSE
)

Arguments

path

(character) path to the file. required.

additional

(logical) include additional and remarks data sections in output. Default: TRUE. Passed on to isdparser::isd_parse()

parallel

(logical) do processing in parallel. Default: FALSE

cores

(integer) number of cores to use: Default: 2. We look in your option "cl.cores", but use default value if not found.

progress

(logical) print progress - ignored if parallel=TRUE. The default is FALSE because printing progress adds a small bit of time, so if processing time is important, then keep as FALSE

Details

isd_read - read a .gz file as downloaded from NOAA's website

Value

A tibble (data.frame)

References

ftp://ftp.ncdc.noaa.gov/pub/data/noaa/

See Also

isd(), isd_stations(), isd_stations_search()

Other isd: isd_stations_search(), isd_stations(), isd()

Examples

1
2
3
4
5
6
## Not run: 
file <- system.file("examples", "011490-99999-1986.gz", package = "rnoaa")
isd_read(file)
isd_read(file, additional = FALSE)

## End(Not run)

Example output

<path>/usr/lib/R/site-library/rnoaa/examples/011490-99999-1986.gz

# A tibble: 1,328 x 119
   total_chars usaf_station wban_station     date  time date_flag latitude
         <chr>        <chr>        <chr>    <chr> <chr>     <chr>    <chr>
 1        0050       011490        99999 19860101  0000         4   +66267
 2        0123       011490        99999 19860101  0600         4   +66267
 3        0050       011490        99999 19860101  1200         4   +66267
 4        0094       011490        99999 19860101  1800         4   +66267
 5        0050       011490        99999 19860102  0000         4   +66267
 6        0123       011490        99999 19860102  0600         4   +66267
 7        0050       011490        99999 19860102  1200         4   +66267
 8        0094       011490        99999 19860102  1800         4   +66267
 9        0050       011490        99999 19860103  0000         4   +66267
10        0123       011490        99999 19860103  0600         4   +66267
# ... with 1,318 more rows, and 112 more variables: longitude <chr>,
#   type_code <chr>, elevation <chr>, call_letter <chr>, quality <chr>,
#   wind_direction <chr>, wind_direction_quality <chr>, wind_code <chr>,
#   wind_speed <chr>, wind_speed_quality <chr>, ceiling_height <chr>,
#   ceiling_height_quality <chr>, ceiling_height_determination <chr>,
#   ceiling_height_cavok <chr>, visibility_distance <chr>,
#   visibility_distance_quality <chr>, visibility_code <chr>,
#   visibility_code_quality <chr>, temperature <chr>,
#   temperature_quality <chr>, temperature_dewpoint <chr>,
#   temperature_dewpoint_quality <chr>, air_pressure <chr>,
#   air_pressure_quality <chr>, AG1_precipitation_estimated <chr>,
#   AG1_discrepancy_code <chr>, AG1_estimated_water_depth <chr>,
#   GF1_sky_condition <chr>, GF1_coverage <chr>, GF1_opaque_coverage <chr>,
#   GF1_coverage_quality <chr>, GF1_lowest_cover <chr>,
#   GF1_lowest_cover_quality <chr>, GF1_low_cloud_genus <chr>,
#   GF1_low_cloud_genus_quality <chr>, GF1_lowest_cloud_base_height <chr>,
#   GF1_lowest_cloud_base_height_quality <chr>, GF1_mid_cloud_genus <chr>,
#   GF1_mid_cloud_genus_quality <chr>, GF1_high_cloud_genus <chr>,
#   GF1_high_cloud_genus_quality <chr>, MD1_atmospheric_change <chr>,
#   MD1_tendency <chr>, MD1_tendency_quality <chr>, MD1_three_hr <chr>,
#   MD1_three_hr_quality <chr>, MD1_twentyfour_hr <chr>,
#   MD1_twentyfour_hr_quality <chr>, AA1_precipitation_liquid <chr>,
#   AA1_period_quantity_hrs <chr>, AA1_depth <chr>,
#   AA1_condition_quality <chr>, AA1_quality_code <chr>, AJ1_snow_depth <chr>,
#   AJ1_depth_dimension <chr>, AJ1_condition_code <chr>,
#   AJ1_quality_code <chr>, AJ1_equivalent_water_depth <chr>,
#   AJ1_equivalent_water_condition_code <chr>,
#   AJ1_equivalent_water_condition_quality_code <chr>,
#   N01_original_observation <chr>, N01_original_value_text <chr>,
#   N01_units_code <chr>, N01_parameter_code <chr>, IA1_ground_surface <chr>,
#   IA1_ground_surface_code <chr>, IA1_ground_surface_code_quality <chr>,
#   KA1_extreme_temp <chr>, KA1_period_quantity <chr>, KA1_max_min <chr>,
#   KA1_temp <chr>, KA1_temp_quality <chr>, REM_remarks <chr>,
#   REM_identifier <chr>, REM_length_quantity <chr>, REM_comment <chr>,
#   AY1_past_weather_manual <chr>, AY1_condition_code <chr>,
#   AY1_condition_quality <chr>, AY1_period <chr>, AY1_period_quality <chr>,
#   AY2_past_weather_manual <chr>, AY2_condition_code <chr>,
#   AY2_condition_quality <chr>, AY2_period <chr>, AY2_period_quality <chr>,
#   MW1_first_weather_reported <chr>,
#   MW1_manual_atmospheric_condition_code <chr>, MW1_condition_quality <chr>,
#   GA1_sky_cover_layer_identifier <chr>, GA1_coverage_code <chr>,
#   GA1_coverage_quality_code <chr>, GA1_base_height_dimension <chr>,
#   GA1_base_height_quality_code <chr>, GA1_cloud_type_code <chr>,
#   GA1_cloud_type_quality_code <chr>, EQD_observation_identifier <chr>,
#   EQD_observation_text <chr>, EQD_reason_code <chr>, EQD_parameter <chr>, ...
<path>/usr/lib/R/site-library/rnoaa/examples/011490-99999-1986.gz

# A tibble: 1,328 x 31
   total_chars usaf_station wban_station     date  time date_flag latitude
         <chr>        <chr>        <chr>    <chr> <chr>     <chr>    <chr>
 1        0050       011490        99999 19860101  0000         4   +66267
 2        0123       011490        99999 19860101  0600         4   +66267
 3        0050       011490        99999 19860101  1200         4   +66267
 4        0094       011490        99999 19860101  1800         4   +66267
 5        0050       011490        99999 19860102  0000         4   +66267
 6        0123       011490        99999 19860102  0600         4   +66267
 7        0050       011490        99999 19860102  1200         4   +66267
 8        0094       011490        99999 19860102  1800         4   +66267
 9        0050       011490        99999 19860103  0000         4   +66267
10        0123       011490        99999 19860103  0600         4   +66267
# ... with 1,318 more rows, and 24 more variables: longitude <chr>,
#   type_code <chr>, elevation <chr>, call_letter <chr>, quality <chr>,
#   wind_direction <chr>, wind_direction_quality <chr>, wind_code <chr>,
#   wind_speed <chr>, wind_speed_quality <chr>, ceiling_height <chr>,
#   ceiling_height_quality <chr>, ceiling_height_determination <chr>,
#   ceiling_height_cavok <chr>, visibility_distance <chr>,
#   visibility_distance_quality <chr>, visibility_code <chr>,
#   visibility_code_quality <chr>, temperature <chr>,
#   temperature_quality <chr>, temperature_dewpoint <chr>,
#   temperature_dewpoint_quality <chr>, air_pressure <chr>,
#   air_pressure_quality <chr>

rnoaa documentation built on May 19, 2021, 9:13 a.m.