Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/elipousson/feltr

A R package to read Felt maps to simple feature data πŸ—ΊοΈ
https://github.com/elipousson/feltr

felt r-package rspatial rstats

Last synced: 27 days ago
JSON representation

A R package to read Felt maps to simple feature data πŸ—ΊοΈ

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# feltr feltr website

[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Codecov test coverage](https://codecov.io/gh/elipousson/feltr/branch/main/graph/badge.svg)](https://app.codecov.io/gh/elipousson/feltr?branch=main)

The goal of feltr is to read maps from Felt as simple feature or `SpatRaster` objects.

## Installation

You can install the development version of feltr like so:

``` r
pak::pkg_install("elipousson/feltr")
```

## Example

```{r example}
library(feltr)
```

You can use `read_felt_map()` to create an sf object with features from a map URL.

```{r read}
url <- "https://felt.com/map/Site-Plan-Example-PGTipS2mT8CYBIVlyAm9BkD"

site_plan <- read_felt_map(url)

plot(site_plan)
```

`get_felt_map()` returns a list with basic information about a map (set `read = TRUE` to read map elements and layers at the same time):

```{r}
get_felt_map(url)
```

You can also use `read_felt_raster()` (a wrapper for `rasterpic::rasterpic_img()`) to create a `SpatRaster` object from a "Image" type feature in Felt.

```{r}
image_map <- read_felt_raster(
"https://felt.com/map/feltr-sample-map-read-felt-raster-oiinodTbT79BEueYdGp1aND",
"https://tile.loc.gov/image-services/iiif/service:gmd:gmd370:g3700:g3700:ct003955/full/pct:12.5/0/default.jpg"
)

image_map
```

For more information on the Felt Public API check out the guide to [Getting Started with the Felt API](https://feltmaps.notion.site/Getting-Started-With-The-Felt-API-69c8b02b7d8e436daa657a04a2dbaffa) or the [Felt Public API reference](https://feltmaps.notion.site/Felt-Public-API-reference-c01e0e6b0d954a678c608131b894e8e1#1e9d31b9ef6c4b23be41938f93aa46ad).

Note, in July 2024, Felt [announced the pricing for subscription plans](https://felt.com/blog/introducing-pricing) that are expected to limit API access to paid accounts starting in January 2024. Educators can also apply for free accounts to retain API access after January 2024.

## Related Projects

- [{feltr}](https://christophertkenny.com/feltr/): A R package with the same name that provide very similar functionality to this package.
- [felt-upload](https://pypi.org/project/felt-upload/): A Python package to upload data to Felt.
- [Add to Felt QGIS Plugin](https://plugins.qgis.org/plugins/felt/): A QGIS plugin for uploading data to Felt.
- [feltpy](https://github.com/moss-xyz/feltpy): A lightweight Python package to interact with the public API of Felt.com.