Git Product home page Git Product logo

rvdatum's Introduction

RVDatum

Wrapper around NOAA VDatum API

Introduction

A simple wrapper around the NOAA VDatum API to do horizontal and vertical (and tidal) conversions in R.

Installation

Install from github with devtools:

devtools::install_github("jvandens/RVDatum")

Usage

Basic workflow is to take a data.frame of coordinates, mutate a column for the url by passing in the VDatum arguments into vdatum_url(), then run vdatum_convert() to call the API and create new output columns with the results from VDatum.

Notes:


library(RVDatum)

library(dplyr)
library(magrittr)

pts <- data.frame(Lat = c(41.1578110483, 41.15374),
                  Lon = c(-73.8716163883, -73.87098),
                  Alt = c(-29.3619984455, -28.664)) %>% 
  
  # construct the url with vdatum_url
  mutate(url = vdatum_url(x = Lon, y = Lat, z = Alt,
                          s_v_frame='NAD83_2011',
                          s_v_geoid='geoid12b',
                          t_coor='spc',
                          t_h_unit='us_ft',
                          t_h_zone='3101',
                          t_v_frame='NAVD88',
                          t_v_unit='us_ft',
                          t_v_geoid='geoid12b',
                          epoch_in='2022',
                          epoch_out='2022')) 

# convert the points which will also cbind to the original dataframe
t_pts <- vdatum_convert(pts, url)

Contact

Author: Jaak Van den Sype Company: HDR Inc.

rvdatum's People

Contributors

jvandens avatar

Watchers

 avatar

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.