Git Product home page Git Product logo

filter-day-or-night's Introduction

Filter/Annotate Day or Night

MoveApps

Github repository: github.com/movestore/Filter-Day-or-Night

Description

This App assigns location records as occurring during day or night, and can then filter the dataset to only daytime or nighttime records. The time of sunset and sunrise can be adapted by a user-specified time interval to adjust the day/night assignments, for example to account for the behavior of the animal(s) in the dataset. The resulting dataset with added values is provided as output and can be downloaded as a .csv artefact.

Documentation

This App calculates the time of sunrise and sunset for the timestamp and location of each record in your dataset, using the getSunlightTimes function in the suncalc package. Based on these results, it then defines each record as "day" or "night", using an optional user-defined adjustment to the sunrise and sunset times, for example, to account for behavioral patterns of the animal(s) in your dataset or local site conditions. All calculations assume that the input data provide timestamp in UTC and locations in the WGS85 coordinate reference system.

By default, the start and end of day and night are defined by the time of local sunrise and sunset. Optionally, adaptation times can be defined in the settings to adjust the time of sunrise and/or sunset by a fixed number of minutes. This adjustment will affect the reported sunrise and sunset times, as well as the day/night assignment.

You can choose to extract only daytime or nighttime locations from the dataset, or leave the selection empty to retain the full dataset. The time of sunrise and sunset (adjusted according to the adaptation time if specified), a day/night assignment, the year and Julian day are added to the final dataset.

Note that if the dataset contains records at high latitudes (Arctic/Antarctic) during periods when there are no sunrise and sunset, it is possible that all locations will be retained or deleted, depending on settings.

Input data

move2 location object

Output data

move2 location object

Artefacts

data_selectedTime_night_day.csv: csv file containing the original dataset, filtered for daytime or nighttime location if specified, with the calculated time of sunrise, time of sunset, day/night assignment, year and Julian day, based on the selected settings. Times of local sunrise and sunset are reported in the format yyyy-MM-dd HH:mm:ss (UTC).

Settings

Day or night selection (window): Optional selection to indicate whether to extract only nighttime (between sunset and sunrise, 'sundownup') or daytime (between sunrise and sunset, 'sunupdown') locations, or to retain the full dataset (no selection).

Sunrise adaption time (upX): Sunrise adaption time to define how many minutes before (negative values) or after (positive values) sunrise you want to define the transition between night and day. This is 0 by default.

Sunset adaption time (downX): Sunset adaption time how many minutes before (negative values) or after (positive values) sunset you want to define the transition between day and night. This is 0 by default.

Null or error handling:

Setting window: The default value (NULL, i.e., no selection of radio button) will return the input data set.

Setting upX: The default value here is '0', indicating that no adaption time is necessary. If the value gets too large, the calculations might become difficult to understand.

Setting downX: The default value here is '0', indicating that no adaption time is necessary. If the value gets too large, the calculations might become difficult to understand.

Data: If there are no day/night locations in the dataset, NULL is returned, likely leading to an error.

filter-day-or-night's People

Contributors

andreakoelzsch avatar robinmov avatar

Watchers

 avatar  avatar  avatar

Forkers

sarahcd robinmov

filter-day-or-night's Issues

consider renaming

This and other filter apps can/could be used to annotate categories to the full dataset (rather than filter/remove data). This makes them more generally useful. We have gotten some requests that indicate people don't realize this annotation feature is available using this app. Is there a better app name to explain these two tasks?

add option to split track or keep as one track

As is now, all night (or day) locations of an animal/a track are kept as a combined night/day track. This leads to unrealistic track segments between the last night/day location and the first one of the next night/day. This can lead to error in subsequent calculations as e.g. Distance Moved.
It can be solved by adding the option to either keep it as one track or split into tracks by day/night.
TBD at transition to move2

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.