Giter VIP home page Giter VIP logo

ukis-migrationdetectr's Introduction

UKIS UKIS - MigrationDetectR

Implementation of Migration detection algorithm, published by Chi et al. (2020) in A general approach to detecting migration events in digital trace data

Installation

The package can be installed as follows:

install.packages("MigrationDetectR")

Example

Input data

First, make sure your data into the format required by the package: Two aligned vectors for each individual, one with locations and one with timestamps.

library(MigrationDetectR)
# Load an example trace
trace <- example_trace

# a vector of `POSIXct` timestamps
timestamps = example_trace$timestamp
tail(timestamps)

# a vector of `character` locations
locations = example_trace$location
tail(locations)

The basic usage consists of two steps:

Identifying segments of continuous residence

First, use the detect_segments function to identify segments of continuous residence.

# Detect segments
segments <-
  detect_segments(
      locs = locations,
      times = timestamps,
      param_min_days = 3,
      param_prop_days = 0.06,
      param_window_size_days = 7)
 nrow(segments) # check the number of detected segments

Identifying segments of continuous residence

Second, use the identify_migrations function on the segments to detect migrations. To optionally determine the best split time, pass the original locations and timestamps vectors. Note that this increases the computational load substantially.

 migrations <-
 identify_migrations(
  segs = segments$segments,
  locs = segments$locs,
  min_res_length = 90,
  occurrence_locs = trace$location,
  occurrence_times = trace$timestamp
  )
  nrow(migrations) # check the number of identified migrations
  head(migrations) # check the detected migrations

Multiple users

The functions process one user at a time. Datasets with multiple users need to be split. For very large datasets, we recommend to apply the function with some degree of parallelization.

Alternatively, consider the Python implementation.

Contributors

The UKIS team creates and adapts libraries which simplify the usage of satellite data:

  • Mast, Johannes

German Aerospace Center (DLR)

Licenses

This software is licensed under the Apache 2.0 License.

Copyright (c) 2023 German Aerospace Center (DLR) * German Remote Sensing Data Center * Department: Geo-Risks and Civil Security

Changelog

See NEWS.

Contributing

The UKIS team welcomes contributions from the community. For more detailed information, see our guide on contributing if you're interested in getting involved.

What is UKIS?

The DLR project Environmental and Crisis Information System (the German abbreviation is UKIS, standing for Umwelt- und Kriseninformationssysteme aims at harmonizing the development of information systems at the German Remote Sensing Data Center (DFD) and setting up a framework of modularized and generalized software components.

UKIS is intended to ease and standardize the process of setting up specific information systems and thus bridging the gap from EO product generation and information fusion to the delivery of products and information to end users.

Furthermore, the intention is to save and broaden know-how that was and is invested and earned in the development of information systems and components in several ongoing and future DFD projects.

ukis-migrationdetectr's People

Contributors

johmast 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.