Giter Club home page Giter Club logo

ncmeta's Introduction

Build Status Build Status AppVeyor Build Status CRAN status Coverage Status

ncmeta

The ncmeta package provides straightforward NetCDF metadata, with a set of consistent entity-based functions for extracting metadata from a file or online source. We aim to fill a gap in between the generality and power of the NetCDF framework and ease of use.

There are two main packages for using NetCDF in R, RNetCDF and ncdf4 and ncmeta uses both, where appropriate. Both packages are very close the native API of NetCDF itself, and ncmeta simply provides an easier high-level interpretation.

About NetCDF

NetCDF is both a data model and an API, and provides a very general framework for expressing data formats. The explicit entities in NetCDF are variables, dimensions and attributes and ncmeta provides functions nc_vars, nc_dims, and nc_atts to extract their names, order and other metadata. There are matching functions nc_var, nc_dim, and nc_att with an extra identifier to extract specific information about an individual variable, dimension, or attribute.

Also includes functions for implicit entities, these are grids and axes. These don’t exist in the NetCDF specification explicitly, but are meaningful and worth making explicit. Many NetCDF tools don’t explicitly present these concepts so grab hold of them with ncmeta!

A grid is an ordered set of dimensions, and the Unidata site refers informally to this concept as shape.

An axis is an instance of a dimension, the use of that dimension within a particular variable.

These functions provide a more developer-friendly scheme for working with the range of formats provided by the NetCDF ecosystem.

Installation

Install ncmeta from CRAN with:

install.packages("ncmeta")

You can install the development version of ncmeta from github with:

# install.packages("devtools")
devtools::install_github("hypertidy/ncmeta")

Example

This example shows some of the functions for extracting information from a NetCDF source.

library(ncmeta)
filename <- system.file("extdata", "S2008001.L3m_DAY_CHL_chlor_a_9km.nc", package = "ncmeta")
nc_inq(filename) # one-row summary of file

nc_dim(filename, 0)  ## first dimension
nc_dims(filename)  ## all dimensions

Get involved!

Please let us know if you have any feedback, see the Issues tab if you found a bug or have a question. Feel free to email the maintainer directly for other questions.


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.

ncmeta's People

Contributors

mdsumner avatar dblodgett-usgs avatar floriandeboissieu avatar romainfrancois 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.