Giter VIP home page Giter VIP logo

rradar's Introduction

Project Status: Active – The project has reached a stable, usable state and is being actively developed. Signed by Signed commit % Linux build Status
Minimal R Version License

rradar

Animate NOAA NWSRadar Images by Station Id

Description

NOAA NWS has an array of National Doppler Radar Sites. Tools are provided to to help you locate stations and create an animated composite image of recent radar images.

What’s Inside The Tin

The following functions are implemented:

  • animate_conus_mosaic: Create an animated weather radar mosaic for the the conterminus U.S.
  • animate_radar: Create an animated weather image from a NOAA station
  • latest_radar: Read latest NWS regional or ConUS radar mosaics as a stars object
  • latest_ridge: Read latest NWS ridge as a stars object
  • scale_fill_rradar: Continuous fill scale for use with NWS raster radar data
  • stations: NOAA U.S. Radar Stations

Installation

install.packages("rradar", repos = "https://cinc.rud.is")
# or
remotes::install_git("https://git.rud.is/hrbrmstr/rradar.git")
# or
remotes::install_git("https://git.sr.ht/~hrbrmstr/rradar")
# or
remotes::install_gitlab("hrbrmstr/rradar")
# or
remotes::install_bitbucket("hrbrmstr/rradar")
# or
remotes::install_github("hrbrmstr/rradar")

NOTE: To use the β€˜remotes’ install options you will need to have the {remotes} package installed.

Usage

library(rradar)

# current version
packageVersion("rradar")
## [1] '0.4.0'

Stations

library(tidyverse)

filter(stations, state == "Maine")
## # A tibble: 2 x 4
##   state city     dir   station
##   <chr> <chr>    <chr> <chr>  
## 1 Maine Caribou  N0R   CBW    
## 2 Maine Portland N0R   GYX

filter(stations, state == "California")
## # A tibble: 11 x 4
##    state      city             dir   station
##    <chr>      <chr>            <chr> <chr>  
##  1 California Beale AFB        N0R   BBX    
##  2 California Edwards AFB      N0R   EYX    
##  3 California Eureka           N0R   BHX    
##  4 California Hanford          N0R   HNX    
##  5 California Los Angeles      N0R   VTX    
##  6 California Sacramento       N0R   DAX    
##  7 California San Diego        N0R   NKX    
##  8 California San Francisco    N0R   MUX    
##  9 California San Joaquin Vly. N0R   HNX    
## 10 California Santa Ana Mtns   N0R   SOX    
## 11 California Vandenberg AFB   N0R   VBX
animate_radar("GYX")

animate_radar("VBX")

animate_conus_mosaic("small")

library(sf)
library(stars)
library(rradar)
library(viridis)
library(rnaturalearth)
library(hrbrthemes)
library(tidyverse)

wrld <- ne_countries(scale = "medium", country = c("united states of america", "canada"), 
                     continent = "north america", returnclass = "sf")
us <- ne_states("united states of america", returnclass = "sf")

ne_radar <- latest_radar("northeast")

wrld <- st_crop(wrld, st_bbox(ne_radar))
us <- st_crop(us, st_bbox(ne_radar))

ggplot() +
  geom_sf(data = wrld, size = 0.125, fill = '#fefefe') +
  geom_sf(data = us, size = 0.125, fill = '#fefefe') +
  geom_stars(data = ne_radar) +
  coord_sf(datum = NA) +
  scale_fill_rradar() +
  labs(
    x = NULL, y = NULL,
    title = "NWS Radar Mosaic β€” Northeast Sector",
    subtitle = "1758 UTC 2019-12-15"
  ) +
  theme_ipsum_es(grid="") +
  theme(legend.key.height = unit(5, "lines"))

rradar Metrics

Lang # Files (%) LoC (%) Blank lines (%) # Lines (%)
R 10 0.91 276 0.87 51 0.65 127 0.77
Rmd 1 0.09 40 0.13 27 0.35 39 0.23

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

rradar's People

Contributors

hrbrmstr avatar muschellij2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

muschellij2

rradar's Issues

Baltimore Station Error

library(tidyverse)
library(rradar)
stations %>% 
  filter(state == "Maryland")
#> # A tibble: 1 x 4
#>   state    city      dir   station
#>   <chr>    <chr>     <chr> <chr>  
#> 1 Maryland Baltimore N0R   LWX
rradar::animate_radar("LWX")
#> Error in parse_url(url): length(url) == 1 is not TRUE
traceback()
#> No traceback available

Created on 2019-12-05 by the reprex package (v0.3.0.9000)

Session info
sessioninfo::session_info()
#> ─ Session info ──────────────────────────────────────────────────────────
#>  setting  value                       
#>  version  R version 3.6.0 (2019-04-26)
#>  os       macOS Mojave 10.14.6        
#>  system   x86_64, darwin15.6.0        
#>  ui       X11                         
#>  language (EN)                        
#>  collate  en_US.UTF-8                 
#>  ctype    en_US.UTF-8                 
#>  tz       America/New_York            
#>  date     2019-12-05                  
#> 
#> ─ Packages ──────────────────────────────────────────────────────────────
#>  package     * version date       lib source                            
#>  assertthat    0.2.1   2019-03-21 [1] CRAN (R 3.6.0)                    
#>  backports     1.1.5   2019-10-02 [1] CRAN (R 3.6.0)                    
#>  broom         0.5.2   2019-04-07 [1] CRAN (R 3.6.0)                    
#>  cellranger    1.1.0   2016-07-27 [1] CRAN (R 3.6.0)                    
#>  cli           1.1.0   2019-03-19 [1] CRAN (R 3.6.0)                    
#>  colorspace    1.4-1   2019-03-18 [1] CRAN (R 3.6.0)                    
#>  crayon        1.3.4   2017-09-16 [1] CRAN (R 3.6.0)                    
#>  digest        0.6.23  2019-11-23 [1] CRAN (R 3.6.0)                    
#>  dplyr       * 0.8.3   2019-07-04 [1] CRAN (R 3.6.0)                    
#>  evaluate      0.14    2019-05-28 [1] CRAN (R 3.6.0)                    
#>  fansi         0.4.0   2018-10-05 [1] CRAN (R 3.6.0)                    
#>  forcats     * 0.4.0   2019-02-17 [1] CRAN (R 3.6.0)                    
#>  generics      0.0.2   2018-11-29 [1] CRAN (R 3.6.0)                    
#>  ggplot2     * 3.2.1   2019-08-10 [1] CRAN (R 3.6.0)                    
#>  glue          1.3.1   2019-03-12 [1] CRAN (R 3.6.0)                    
#>  gtable        0.3.0   2019-03-25 [1] CRAN (R 3.6.0)                    
#>  haven         2.1.1   2019-07-04 [1] CRAN (R 3.6.0)                    
#>  highr         0.8     2019-03-20 [1] CRAN (R 3.6.0)                    
#>  hms           0.5.2   2019-10-30 [1] CRAN (R 3.6.0)                    
#>  htmltools     0.4.0   2019-10-04 [1] CRAN (R 3.6.0)                    
#>  httr          1.4.1   2019-08-05 [1] CRAN (R 3.6.0)                    
#>  jsonlite      1.6     2018-12-07 [1] CRAN (R 3.6.0)                    
#>  knitr         1.24.3  2019-08-28 [1] Github (muschellij2/knitr@abcea3d)
#>  lattice       0.20-38 2018-11-04 [1] CRAN (R 3.6.0)                    
#>  lazyeval      0.2.2   2019-03-15 [1] CRAN (R 3.6.0)                    
#>  lifecycle     0.1.0   2019-08-01 [1] CRAN (R 3.6.0)                    
#>  lubridate     1.7.4   2018-04-11 [1] CRAN (R 3.6.0)                    
#>  magick        2.2     2019-08-26 [1] CRAN (R 3.6.0)                    
#>  magrittr      1.5     2014-11-22 [1] CRAN (R 3.6.0)                    
#>  modelr        0.1.5   2019-08-08 [1] CRAN (R 3.6.0)                    
#>  munsell       0.5.0   2018-06-12 [1] CRAN (R 3.6.0)                    
#>  nlme          3.1-141 2019-08-01 [1] CRAN (R 3.6.0)                    
#>  pillar        1.4.2   2019-06-29 [1] CRAN (R 3.6.0)                    
#>  pkgconfig     2.0.3   2019-09-22 [1] CRAN (R 3.6.0)                    
#>  purrr       * 0.3.3   2019-10-18 [1] CRAN (R 3.6.0)                    
#>  R6            2.4.1   2019-11-12 [1] CRAN (R 3.6.0)                    
#>  Rcpp          1.0.3   2019-11-08 [1] CRAN (R 3.6.0)                    
#>  readr       * 1.3.1   2018-12-21 [1] CRAN (R 3.6.0)                    
#>  readxl        1.3.1   2019-03-13 [1] CRAN (R 3.6.0)                    
#>  rlang         0.4.2   2019-11-23 [1] CRAN (R 3.6.0)                    
#>  rmarkdown     1.16    2019-10-01 [1] CRAN (R 3.6.0)                    
#>  rradar      * 0.1.0   2019-12-05 [1] Github (hrbrmstr/rradar@0146e4b)  
#>  rvest         0.3.4   2019-05-15 [1] CRAN (R 3.6.0)                    
#>  scales        1.1.0   2019-11-18 [1] CRAN (R 3.6.0)                    
#>  sessioninfo   1.1.1   2018-11-05 [1] CRAN (R 3.6.0)                    
#>  stringi       1.4.3   2019-03-12 [1] CRAN (R 3.6.0)                    
#>  stringr     * 1.4.0   2019-02-10 [1] CRAN (R 3.6.0)                    
#>  tibble      * 2.1.3   2019-06-06 [1] CRAN (R 3.6.0)                    
#>  tidyr       * 1.0.0   2019-09-11 [1] CRAN (R 3.6.0)                    
#>  tidyselect    0.2.5   2018-10-11 [1] CRAN (R 3.6.0)                    
#>  tidyverse   * 1.2.1   2017-11-14 [1] CRAN (R 3.6.0)                    
#>  utf8          1.1.4   2018-05-24 [1] CRAN (R 3.6.0)                    
#>  vctrs         0.2.0   2019-07-05 [1] CRAN (R 3.6.0)                    
#>  withr         2.1.2   2018-03-15 [1] CRAN (R 3.6.0)                    
#>  xfun          0.11    2019-11-12 [1] CRAN (R 3.6.0)                    
#>  xml2          1.2.2   2019-08-09 [1] CRAN (R 3.6.0)                    
#>  yaml          2.2.0   2018-07-25 [1] CRAN (R 3.6.0)                    
#>  zeallot       0.1.0   2018-01-28 [1] CRAN (R 3.6.0)                    
#> 
#> [1] /Library/Frameworks/R.framework/Versions/3.6/Resources/library

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.