-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
83 lines (57 loc) · 3.38 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# feltr <a href="https://elipousson.github.io/feltr/"><img src="man/figures/logo.png" align="right" height="124" alt="feltr website" /></a>
<!-- badges: start -->
[![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)
<!-- badges: end -->
The goal of feltr is to read maps from Felt as simple feature or `SpatRaster` objects.
:::{.callout-note collapse=false appearance='default' icon=true}
## Package does not support the Felt API v2
This package does not support the Felt API and, as of December 2024, I have no specific timeline for when the package will be updated to restore functionality. Please use [the feltr package](https://christophertkenny.com/feltr/index.html) (identical name but a different developer) for API access or follow [this GitHub issue for updates](https://github.com/elipousson/feltr/issues/2).
:::
## 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, eval=FALSE}
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, eval=FALSE}
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, eval=FALSE}
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://developers.felt.com/rest-api/getting-started) or the [Felt API reference](https://developers.felt.com/rest-api/api-reference).
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.