isdparser

knitr::opts_chunk$set(
  comment = "#>",
  collapse = TRUE,
  warning = FALSE,
  message = FALSE
)

Project Status: Active – The project has reached a stable, usable state and is being actively developed. cran checks R-check codecov.io rstudio mirror downloads cran version

Parse NOAA Integrated Surface Data Files

Documentation at https://docs.ropensci.org/isdparser/

isdparser: Parse 'NOAA' Integrated Surface Data Files:

isdparser is a parser for 'NOAA' Integrated Surface Data ('ISD') files, described at https://www.ncdc.noaa.gov/isd. ISD includes numerous parameters such as wind speed and direction, wind gust, temperature, dew point, cloud data, sea level pressure, altimeter setting, station pressure, present weather, visibility, precipitation amounts for various time periods, snow depth, and various other elements as observed by each station. Data is stored as variable length ASCII character strings, with most fields optional. Included are tools for parsing entire files, or individual lines of data.

Coverage

ISD is a global database, with data from approximately 35,000 stations worldwide, though the best spatial coverage is evident in North America, Europe, Australia, and parts of Asia. Coverage in the Northern Hemisphere is better than the Southern Hemisphere, and the overall period of record is currently 1901 to present.

Code liberated from rnoaa to focus on ISD parsing since it's sorta complicated. Has minimal dependencies, so you can parse your ISD/ISH files without needing the deps that rnoaa needs. Will be used by rnoaa once on CRAN.

Documentation at ftp://ftp.ncdc.noaa.gov/pub/data/noaa/ish-format-document.pdf

API:

isd_parse_csv() parses NOAA ISD csv files, whereas isd_parse() and isd_parse_line() both handle compressed files where each row of data is a string that needs to be parsed.

isd_parse_csv() is faster than isd_parse() because parsing each line takes some time - although using isd_parse(parallel = TRUE) option gets closer to the speed of isd_parse_csv().

Installation

CRAN stable version

install.packages("isdparser")

Dev version

remotes::install_github("ropensci/isdparser")
library('isdparser')

isd_parse_csv: parse a CSV file

Using a csv file included in the package:

path <- system.file('extdata/00702699999.csv', package = "isdparser")
isd_parse_csv(path)

isd_parse: parse a file with ASCII strings

path <- system.file('extdata/024130-99999-2016.gz', package = "isdparser")
isd_parse(path)

process in parallel

isd_parse(path, parallel = TRUE)

Meta

rofooter



ropensci/isdparser documentation built on Sept. 12, 2022, 8:01 a.m.