Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jsta/twilight
R interface to the USNO Sun or Moon Rise/Set Data :full_moon: :waning_gibbous_moon: :last_quarter_moon: :waning_crescent_moon:
https://github.com/jsta/twilight
phenology sunrise sunset
Last synced: about 2 months ago
JSON representation
R interface to the USNO Sun or Moon Rise/Set Data :full_moon: :waning_gibbous_moon: :last_quarter_moon: :waning_crescent_moon:
- Host: GitHub
- URL: https://github.com/jsta/twilight
- Owner: jsta
- Created: 2017-03-03T13:00:30.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-07T15:50:54.000Z (almost 8 years ago)
- Last Synced: 2024-06-11T17:09:19.408Z (8 months ago)
- Topics: phenology, sunrise, sunset
- Language: R
- Homepage: http://aa.usno.navy.mil/data/docs/RS_OneYear.php
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.Rmd
Awesome Lists containing this project
README
---
output:
md_document:
variant: markdown_github
---```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```# twilight
[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/twilight)](https://cran.r-project.org/package=twilight)
[![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/twilight)](https://cran.r-project.org/package=twilight)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/jsta/twilight?branch=master&svg=true)](https://ci.appveyor.com/project/jsta/twilight)
[![Travis-CI Build Status](https://travis-ci.org/jsta/twilight.svg?branch=master)](https://travis-ci.org/jsta/twilight)The goal of twilight is to provide an R wrapper for the sun/moon rise/set data at [http://aa.usno.navy.mil/data/docs/RS_OneYear.php](http://aa.usno.navy.mil/data/docs/RS_OneYear.php)
## Installation
```{r installation, eval=FALSE}
# install.packages("devtools")
devtools::install_github("jsta/twilight")
```## Usage
### Load package
```{r load package}
library(twilight)
```### Geographic Coordinates
#### Raw Sunrise/set
```{r geo coordinates raw}
head(
sunsetrise_yr(year = 2015,
lon_deg = 80,
lon_min = 26,
lat_deg = 25,
lat_min = 5,
tz = 5)
)```
#### Day Length
```{r geo day length}
head(
tw_daylength(year = 2015,
lon_deg = 80,
lon_min = 26,
lat_deg = 25,
lat_min = 5,
tz = 5)
)
```### United State Place Names
#### Raw Sunrise/set```{r place coordinates raw}
head(
sunsetrise_yr(year = 2015,
state = "FL",
city = "Key Largo")
)```
#### Day Length
```{r place day length}
head(
tw_daylength(year = 2015,
state = "FL",
city = "Key Largo")
)
```## Contributors
Contributions welcome in the form of pull requests and issues!