{"id":20898,"name":"rwlts","description":"Support governments in making decisions about the impact of human activities on the environment, planning the use of natural resources, conserving biodiversity and monitoring climate change.","url":"https://github.com/brazil-data-cube/rwlts","last_synced_at":"2026-04-14T18:01:28.144Z","repository":{"id":46561486,"uuid":"312371558","full_name":"brazil-data-cube/rwlts","owner":"brazil-data-cube","description":"R Client Library for Web Land Trajectory Service ","archived":false,"fork":false,"pushed_at":"2021-10-05T19:59:19.000Z","size":323,"stargazers_count":8,"open_issues_count":5,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-12-24T23:18:33.888Z","etag":null,"topics":["earth-observation","earth-science","geoinformatics","geoscience","geospatial","land-cover","r","trajectory"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brazil-data-cube.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-12T19:08:53.000Z","updated_at":"2023-04-14T20:54:52.000Z","dependencies_parsed_at":"2022-09-02T21:11:20.068Z","dependency_job_id":null,"html_url":"https://github.com/brazil-data-cube/rwlts","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/brazil-data-cube/rwlts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brazil-data-cube%2Frwlts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brazil-data-cube%2Frwlts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brazil-data-cube%2Frwlts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brazil-data-cube%2Frwlts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brazil-data-cube","download_url":"https://codeload.github.com/brazil-data-cube/rwlts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brazil-data-cube%2Frwlts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28121449,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-29T02:00:07.021Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"owner":{"login":"brazil-data-cube","name":"Brazil Data Cube","uuid":"51197879","kind":"organization","description":"Brazil Data Cube is a subproject of the project “Environmental Monitoring of Brazilian Biomes“, funded by the The Amazon Fund in BNDES financial collaboration","email":"brazildatacube@dpi.inpe.br","website":"brazildatacube.org","location":"São José dos Campos, SP, BR","twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/51197879?v=4","repositories_count":48,"last_synced_at":"2023-03-03T01:22:59.195Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/brazil-data-cube","funding_links":[],"total_stars":null,"followers":null,"following":null,"created_at":"2022-11-13T14:46:09.893Z","updated_at":"2023-03-03T01:22:59.226Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brazil-data-cube","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brazil-data-cube/repositories"},"packages":[{"id":11729303,"name":"github.com/brazil-data-cube/rwlts","ecosystem":"go","description":null,"homepage":null,"licenses":"other","normalized_licenses":["Other"],"repository_url":"https://github.com/brazil-data-cube/rwlts","keywords_array":[],"namespace":null,"versions_count":3,"first_release_published_at":"2020-12-14T21:50:16.000Z","latest_release_published_at":"2021-10-05T19:55:22.000Z","latest_release_number":"v0.8.0","last_synced_at":"2026-03-12T04:48:56.482Z","created_at":"2025-06-04T10:54:30.374Z","updated_at":"2026-03-12T04:48:56.482Z","registry_url":"https://pkg.go.dev/github.com/brazil-data-cube/rwlts","install_command":"go get github.com/brazil-data-cube/rwlts","documentation_url":"https://pkg.go.dev/github.com/brazil-data-cube/rwlts#section-documentation","metadata":{},"repo_metadata":{"id":46561486,"uuid":"312371558","full_name":"brazil-data-cube/rwlts","owner":"brazil-data-cube","description":"R Client Library for Web Land Trajectory Service ","archived":false,"fork":false,"pushed_at":"2021-10-05T19:59:19.000Z","size":323,"stargazers_count":8,"open_issues_count":5,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-02T15:36:57.417Z","etag":null,"topics":["earth-observation","earth-science","geoinformatics","geoscience","geospatial","land-cover","r","trajectory"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brazil-data-cube.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-12T19:08:53.000Z","updated_at":"2023-04-14T20:54:52.000Z","dependencies_parsed_at":"2022-09-02T21:11:20.068Z","dependency_job_id":null,"html_url":"https://github.com/brazil-data-cube/rwlts","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brazil-data-cube%2Frwlts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brazil-data-cube%2Frwlts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brazil-data-cube%2Frwlts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brazil-data-cube%2Frwlts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brazil-data-cube","download_url":"https://codeload.github.com/brazil-data-cube/rwlts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brazil-data-cube%2Frwlts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":257702004,"owners_count":22588532,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"repo_metadata_updated_at":"2025-06-04T11:05:10.361Z","dependent_packages_count":0,"downloads":null,"downloads_period":null,"dependent_repos_count":0,"rankings":{"downloads":null,"dependent_repos_count":5.764254255794306,"dependent_packages_count":5.401293307900869,"stargazers_count":null,"forks_count":null,"docker_downloads_count":null,"average":5.582773781847587},"purl":"pkg:golang/github.com/brazil-data-cube/rwlts","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/go/github.com/brazil-data-cube/rwlts","docker_dependents_count":null,"docker_downloads_count":null,"usage_url":"https://repos.ecosyste.ms/usage/go/github.com/brazil-data-cube/rwlts","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/go/github.com/brazil-data-cube/rwlts/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":{"last_synced_at":"2025-06-04T07:33:25.462Z","issues_count":15,"pull_requests_count":10,"avg_time_to_close_issue":8766068.1,"avg_time_to_close_pull_request":1318578.1,"issues_closed_count":10,"pull_requests_closed_count":10,"pull_request_authors_count":4,"issue_authors_count":3,"avg_comments_per_issue":0.2,"avg_comments_per_pull_request":0.2,"merged_pull_requests_count":9,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":0,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":null,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0,"issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/brazil-data-cube%2Frwlts/issues","maintainers":[],"active_maintainers":[]},"versions_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fbrazil-data-cube%2Frwlts/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fbrazil-data-cube%2Frwlts/version_numbers","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fbrazil-data-cube%2Frwlts/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fbrazil-data-cube%2Frwlts/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fbrazil-data-cube%2Frwlts/codemeta","maintainers":[],"registry":{"name":"proxy.golang.org","url":"https://proxy.golang.org","ecosystem":"go","default":true,"packages_count":2075222,"maintainers_count":0,"namespaces_count":776220,"keywords_count":0,"github":"golang","metadata":{"funded_packages_count":53272},"icon_url":"https://github.com/golang.png","created_at":"2022-04-04T15:19:22.939Z","updated_at":"2026-03-20T05:39:13.001Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages","maintainers_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/maintainers","namespaces_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/namespaces"}}],"commits":{"id":1254661,"full_name":"brazil-data-cube/rwlts","default_branch":"main","total_commits":79,"total_committers":6,"total_bot_commits":0,"total_bot_committers":0,"mean_commits":13.166666666666666,"dds":0.26582278481012656,"past_year_total_commits":0,"past_year_total_committers":0,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":0.0,"past_year_dds":0.0,"last_synced_at":"2026-03-16T01:47:29.525Z","last_synced_commit":"caa116e7fb54218d5ce9d6b2820b3e6e7cece7e3","created_at":"2023-03-27T11:50:33.445Z","updated_at":"2026-03-16T01:47:29.516Z","committers":[{"name":"Felipe","email":"lipecaso@gmail.com","login":"OldLipe","count":58},{"name":"Felipe Menino","email":"felipe.carlos@fatec.sp.gov.br","login":"M3nin0","count":11},{"name":"Fabiana Zioti","email":"fabi_zioti@hotmail.com","login":"fabianazioti","count":4},{"name":"Raphael Willian","email":"raphael.wcosta@gmail.com","login":"raphaelrpl","count":3},{"name":"repl.it user","email":"replituser@example.com","login":"ttury","count":2},{"name":"Carlos Alberto Noronha","email":"beto_noronha@live.com","login":"betonr","count":1}],"past_year_committers":[],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/brazil-data-cube%2Frwlts/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-03-21T00:00:06.680Z","repositories_count":6201763,"commits_count":935901880,"contributors_count":36155213,"owners_count":1145752,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"brazil-data-cube/rwlts","html_url":"https://github.com/brazil-data-cube/rwlts","last_synced_at":"2025-09-01T03:33:23.188Z","status":"error","issues_count":15,"pull_requests_count":10,"avg_time_to_close_issue":8766068.1,"avg_time_to_close_pull_request":1318578.1,"issues_closed_count":10,"pull_requests_closed_count":10,"pull_request_authors_count":4,"issue_authors_count":3,"avg_comments_per_issue":0.2,"avg_comments_per_pull_request":0.2,"merged_pull_requests_count":9,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":0,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":null,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0,"created_at":"2023-05-09T10:39:10.504Z","updated_at":"2025-09-01T03:33:23.188Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/brazil-data-cube%2Frwlts","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/brazil-data-cube%2Frwlts/issues","issue_labels_count":{"enhancement":9,"documentation":5},"pull_request_labels_count":{"documentation":6,"enhancement":5,"release":2},"issue_author_associations_count":{"CONTRIBUTOR":13,"NONE":1},"pull_request_author_associations_count":{"CONTRIBUTOR":10},"issue_authors":{"OldLipe":10,"M3nin0":3,"souza-eab":1},"pull_request_authors":{"OldLipe":6,"fabianazioti":2,"M3nin0":1,"raphaelrpl":1},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-03-21T00:00:06.750Z","repositories_count":13837930,"issues_count":34767421,"pull_requests_count":113513031,"authors_count":11207947,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{},"past_year_pull_request_labels_count":{},"past_year_issue_author_associations_count":{},"past_year_pull_request_author_associations_count":{},"past_year_issue_authors":{},"past_year_pull_request_authors":{},"maintainers":[],"active_maintainers":[]},"events":{"total":{},"last_year":{}},"keywords":["earth-observation","earth-science","geoinformatics","geoscience","geospatial","land-cover","r","trajectory"],"dependencies":[{"ecosystem":"cran","filepath":"DESCRIPTION","sha":null,"kind":"manifest","created_at":"2022-09-02T21:11:19.861Z","updated_at":"2022-09-02T21:11:19.861Z","repository_link":"https://github.com/brazil-data-cube/rwlts/blob/main/DESCRIPTION","dependencies":[{"id":3630452640,"package_name":"R","ecosystem":"cran","requirements":"\u003e= 3.5.0","direct":true,"kind":"depends","optional":false},{"id":3630452641,"package_name":"httr","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":3630452642,"package_name":"tibble","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":3630452643,"package_name":"magrittr","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":3630452644,"package_name":"dplyr","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":3630452645,"package_name":"ggplot2","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":3630452646,"package_name":"ggalluvial","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":3630452647,"package_name":"covr","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":3630452648,"package_name":"vcr","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":3630452649,"package_name":"testthat","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false}]}],"score":null,"created_at":"2023-09-11T14:52:16.262Z","updated_at":"2026-04-14T18:01:28.165Z","avatar_url":"https://github.com/brazil-data-cube.png","language":"R","category":"Climate Change","sub_category":"Integrated Assessment and Climate Policy","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"---\noutput: github_document\neditor_options: \n  markdown: \n    wrap: 72\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  out.width = \"100%\",\n  fig.path = \"inst/extdata/img/README-\"\n)\nlibrary(tibble)\n```\n\n# rwlts \u003cimg src=\"inst/extdata/img/logo.png\" align=\"right\" width=\"120\"/\u003e\n\nR Client Library for Web Land Trajectory Service (WLTS)\n\n\u003c!-- badges: start --\u003e\n\n[![Software\nLicense](https://img.shields.io/badge/license-MIT-green)](https://github.com/brazil-data-cube/rstac/blob/master/LICENSE)\n\u003c!-- [![Build Status](https://drone.dpi.inpe.br/api/badges/brazil-data-cube/rwlts/status.svg)](https://drone.dpi.inpe.br/brazil-data-cube/rwlts) --\u003e\n[![codecov](https://codecov.io/gh/brazil-data-cube/rwlts/branch/main/graph/badge.svg?token=6WTJI6K93Y)](https://codecov.io/gh/brazil-data-cube/rwlts)\n[![Software Life\nCycle](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html)\n[![Join us at\nDiscord](https://img.shields.io/discord/689541907621085198?logo=discord\u0026logoColor=ffffff\u0026color=7389D8)](https://discord.com/channels/689541907621085198#)\n\n\u003c!-- badges: end --\u003e\n\n# About\n\nInformation on Land Use and Land Cover (LULC) is essential to support\ngovernments in making decisions about the impact of human activities on\nthe environment, planning the use of natural resources, conserving\nbiodiversity and monitoring climate change.\n\nCurrently, several projects systematically provide information on the\ndynamics of land use and cover. Well known projects include PRODES,\nDETER and TerraClass. These projects are developed by INPE and they\nproduce information on land use and coverage used by the Brazilian\nGovernment to make public policy decisions. Besides these projects there\nare other initiatives from universities and space agencies devoted to\nthe creation of national and global maps.\n\nAlthough these projects follow open data policies and provide a rich\ncollection of data, there is still a gap in tools that facilitate the\nintegrated use of these collections. Each project adopts its own land\nuse and land cover classification system, providing different class\nnames and meanings for the elements of these collections. The forms of\ndistribution of project data can be carried out in different ways,\nthrough files or web services. In addition, the data has different\nspatial and temporal resolutions and storage systems (raster or vector).\n\nIn this context, the **W**eb **L**and **T**rajectory **S**ervice (WLTS)\nis a service that aims to facilitate the access to these approach\nconsists of using a data model that defines a minimum set of temporal\nand spatial information to represent different sources and types of\ndata, but with a focus on land use and land cover.\n\nWLTS can be used in a variety of applications, such as validating land\ncover data sets, selecting training samples to support Machine Learning\nalgorithms used in the generation of new classification maps.\n\nIf you want to know more about WLTS service, please, take a look at its\n[specification](https://github.com/brazil-data-cube/wlts-spec).\n\n## Installation\n\nTo install the development version of `rwlts`, run the following\ncommands:\n\n```{R, eval=FALSE}\n# load necessary libraries\nlibrary(devtools)\ndevtools::install_github(\"brazil-data-cube/rwlts\")\n```\n\nImporting `rwlts` package:\n\n```{R, echo=TRUE, warning=FALSE, message=FALSE}\nlibrary(rwlts)\n```\n\n## Usage\n\n`rwlts` implements the following WLTS operations:\n\n```{R, echo=FALSE}\ntribble(\n  ~\"**WLTS** operations\", ~\"`rwlts` functions\",\n  \"`/list_collections`\", \"`list_collections(URL,)`\",\n  \"`/describe_collections`\", \"`describe_collection(URL, collection_id)`\",\n  \"`/trajectory`\", \"`get_trajectory(URL, latitude, longitude)`\"\n) %\u003e% as.data.frame() %\u003e% knitr::kable(format = \"markdown\")\n```\n\nThese functions can be used to retrieve information from a WLTS API\nservice. The code bellow creates a `wlts` object and list the available\ncollections of the WLTS API of the Brazil Data Cube project of the\nBrazilian National Institute for Space Research INPE.\n\n### List Collections\n\nThe first operation, `list_collections`, retrieves all available\ncollections in WLTS service.\n\n```{R, echo=TRUE}\nwlts_bdc \u003c- \"https://brazildatacube.dpi.inpe.br/wlts/\"\n\nlist_collections(wlts_bdc)\n```\n\n### Describe Collection\n\nEach collection returned by the WLTS service can be used for retrieving\nLULC trajectories. To get information about the collections, we use the\n`describe_collection` function. This function returns the metadata of a\ngiven collection, which includes the description and specific details.\nThe metadata also describes the spatio-temporal extent of the\ncollection.\n\nIn the code below, we retrieve the metadata from the\n`deter_amazonia_legal` collection using the `describe_collection`\nfunction.\n\n```{R, echo=TRUE}\ndescribe_collection(wlts_bdc, \"deter_amazonia_legal\")\n```\n\n### Trajectory\n\nLULC trajectories can be extracted from collections. These LULC\ntrajectories in WLTS services are associated with a point (lat, long) in\ngeographic space. In `rwlts`, we can use the `get_trajectory` function\nto retrieve trajectories. For example, in the code below, the point\n`(-54, -12)` trajectory is retrieved from the `mapbiomas_amazonia-v5`\ncollection.\n\n```{r}\nget_trajectory(wlts_bdc, \n               latitude = -12, \n               longitude = -54, \n               collections = \"mapbiomas_amazonia-v5\",\n               config = httr::add_headers(\"x-api-key\" = \"change-me\"))\n```\n\nThe `get_trajectory` function returns a `list` of class `wlts`. This\nobject contains the `query` and `result` attributes. The `query`\nattribute stores the query performed to retrieve the data. By default,\nit will be `NULL`. For this information to be stored, the\n`query_info = TRUE` parameter is required. For example:\n\n```{r, eval=FALSE}\nget_trajectory(wlts_bdc, \n               latitude = -12, \n               longitude = -54, \n               collections = \"mapbiomas_amazonia-v5\",\n               query_info = TRUE,\n               config = httr::add_headers(\"x-api-key\" = \"change-me\"))\n```\n\nThe `result` attribute stores the retrieved trajectories. The data is\nstored in a `tibble` for easy manipulation, which has the columns:\n\n-   `class`: LULC class;\n-   `collection`: Data Collection;\n-   `date`: Time instants of the trajectory;\n-   `point_id`: ID of the point that was queried.\n\nThe `point_id` column of the result `tibble` is used in `rwlts` to\nidentify the entry point. This ID is necessary since the\n`get_trajectory` function can be used with vectors as input. For\nexample, the code below retrieves the trajectory of data from the\n`mapbiomas_amazonia-v5` collection for two points `(-54, -12)` and\n`(-54, -11.01)`.\n\n```{r}\nget_trajectory(wlts_bdc, \n               latitude = c(-12, -11.01), \n               longitude = c(-54, -54), \n               collections = \"mapbiomas_amazonia-v5\",\n               config = httr::add_headers(\"x-api-key\" = \"change-me\"))\n```\n\nIn this case, the point `(-54, -12)` will have `point_id` equal to 1,\nwhile `(-54, -11.01)` will have `point_id` equal to 2.\n\nIn addition to multiple point retrieval, the `get_trajectory` function\nallows multiple collections to be queried for the composition of the\ntrajectory. To do this, in the `collections` parameter, the collections\nmust be assigned. For example, data from the collections\n`mapbiomas_amazonia-v5` and `terraclass_amazonia-v2` are retrieved in\nthe code below.\n\n```{r}\nget_trajectory(wlts_bdc, \n               latitude = c(-12, -11.01), \n               longitude = c(-54, -54), \n               collections = c(\"mapbiomas_amazonia-v5\", \"terraclass_amazonia-v2\"),\n               config = httr::add_headers(\"x-api-key\" = \"change-me\"))\n```\n\nFinally, the `get_trajectory` function, through the `start_date` and\n`end_date` parameters, allows you to specify the time intervals used in\nthe trajectory. To exemplify its use, in the code below, trajectories\nare retrieved for the points `(-54, -12)` and `(-54, -11.01)`, from the\n`mapbiomas_amazonia-v5` and `terraclass_amazonia-v2` collections in the\ntime interval `[2003-01-01, 2004-01-01]`.\n\n```{r}\nget_trajectory(wlts_bdc, \n               latitude = c(-12, -11.01), \n               longitude = c(-54, -54), \n               start_date = \"2003-01-01\",\n               end_date = \"2004-01-01\",\n               collections = c(\"mapbiomas_amazonia-v5\",\"terraclass_amazonia-v2\"),\n               config = httr::add_headers(\"x-api-key\" = \"change-me\"))\n```\n\n### Alluvial plot\n\nTo visualize the trajectories and fully understand their time dynamics,\nthe `rwlts` package implements the Alluvial-based visualization method.\nTo create this plot, use the `plot` function, as shown in the example\nbelow:\n\n```{r, fig.width = 9, fig.height = 4}\n# import data from package\ndata(\"mt_500_mapbiomas_cerrado\")\n\nplot(mt_500_mapbiomas_cerrado)\n```\n\nBesides, you can fully customize the returned plot. This customization\nis possible since the `plot` function returns a ggplot2 object.\n\n```{r, fig.width = 10}\nlibrary(ggplot2)\nlibrary(ggalluvial) # use to create plot\nlibrary(cowplot)    # use different theme\n\nplot(mt_500_mapbiomas_cerrado, show_count = TRUE) + \n  cowplot::theme_minimal_hgrid() + \n  labs(title = \"Changes in Primavera do Leste (2004-2014)\",\n       x = \"Timeline\",\n       y = \"Number of points\",\n       fill = \"Class\") + \n  theme(legend.position = \"bottom\",\n        plot.title = element_text(hjust = 0.5)) + \n  scale_fill_manual(values = c(\"#129912\",\n                               \"#32CD32\",\n                               \"#BDB76B\",\n                               \"#FFD966\",\n                               \"#FFFFB2\"),\n                    labels = c(\"Formação Florestal\",\n                               \"Formação Savânica\",\n                               \"Outras Lavouras Temporárias\",\n                               \"Pastagem\",\n                               \"Soja\"))\n```\n\n\u003e The numbers inside each bar correspond to the quantity of points\n\u003e extracted in each year. You can see that according to the change of\n\u003e LULC classes, the quantity of points in each class also changes.\n\n# License\n\nCopyright (C) 2021 INPE.\n\nR client for WLTS is free software; you can redistribute it and/or\nmodify it under the terms of the MIT License; see LICENSE file for more\ndetails.\n","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":["cbers","stac","land-use","spatiotemporal-asset-catalog","land-cover-classification","sentinel-2","giscience","sits"],"project_url":"https://ost.ecosyste.ms/api/v1/projects/20898","html_url":"https://ost.ecosyste.ms/projects/20898"}