Skip to content

Commit

Permalink
Finish paragraph
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemahoney218 committed Mar 29, 2024
1 parent 2393ac8 commit 77c1a81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"hash": "d74b8e92f06ae72eaebef43f5c880e29",
"hash": "f7a240c07c3d4686a920720f5aec5645",
"result": {
"engine": "knitr",
"markdown": "---\ntitle: \"rsi 0.2.0 is now on CRAN!\"\ndescription: \"More data products, fewer bugs, less time wasted on data management slop.\"\nauthor:\n - name: Mike Mahoney\n url: {}\ndate: \"2024-03-29\"\ncategories: [R, Spatial, geospatial data, R packages]\nimage: banner.jpg\nformat: \n html:\n toc: true\nengine: knitr\n---\n\n\nI'm deligted to announce that version 0.2.0 of rsi, my package for handling common spatial ML data pre-processing tasks, is [now officially on CRAN](https://cran.r-project.org/package=rsi). rsi aims to handle downloading, masking, rescaling, and compositing data from STAC endpoints, computing spectral indices from that same data, amd wrangling the outputs into bricks ready for modeling workflows -- and to do so in a user-friendly and extensible way. This release adds wrappers for more data sources, makes it easier to download high-quality water data from Landsat, and fixes some bugs while simplifying the internals of the package.\n\nYou can install rsi from CRAN via:\n\n```r\ninstall.packages(\"rsi\")\n```\n\nThis post will walk through a few of the most user-visible changes, starting with...\n\n## Downloading water data\n\nIn older versions of rsi, the default `landsat_mask_function()` would mask your data so that your final files (and composites) only contained the highest quality observations over land. That meant that waterbodies (like the large area in the top left of this image) would always be empty:\n\n\n::: {.cell}\n\n```{.r .cell-code}\nlibrary(rsi)\nfuture::plan(\"multisession\")\n\naoi <- sf::st_point(c(-76.1376841, 43.0351335))\naoi <- sf::st_set_crs(sf::st_sfc(aoi), 4326)\naoi <- sf::st_buffer(sf::st_transform(aoi, 5070), 10000)\n\nlandsat <- get_landsat_imagery(\n aoi,\n start_date = \"2021-06-01\",\n end_date = \"2021-08-31\",\n output_filename = tempfile(fileext = \".tif\")\n)\n\nterra::plot(terra::rast(landsat))\n```\n\n::: {.cell-output-display}\n![](index_files/figure-html/unnamed-chunk-1-1.png){width=672}\n:::\n:::\n\n\nThis works great if you only care about land observations, but has an obvious flaw otherwise. Thanks to @mateuszrydzik, `landsat_mask_function()` starting in version 0.2.0 now has an argument, `include`, which you can use to also include high quality observations over water in your final outputs:\n\n\n::: {.cell}\n\n```{.r .cell-code}\nlandsat <- get_landsat_imagery(\n aoi,\n start_date = \"2021-06-01\",\n end_date = \"2021-08-31\",\n mask_function = \\(r) landsat_mask_function(r, include = \"both\"),\n output_filename = tempfile(fileext = \".tif\")\n)\n\nterra::plot(terra::rast(landsat))\n```\n\n::: {.cell-output-display}\n![](index_files/figure-html/unnamed-chunk-2-1.png){width=672}\n:::\n:::\n\n\nYou can also set `include = \"water\"` to _only_ include data over waterbodies, and exclude all data over land.\n\n## Downloading even more data\n\nTwo new functions \n\nFirst, thanks to @h-a-graham, the new `get_alos_palsar_imagery()` function provides a wrapper for accessing data from ALOS PALSAR:\n\n\n::: {.cell}\n\n```{.r .cell-code}\nalos <- get_alos_palsar_imagery(\n aoi,\n \"2021-06-01\",\n \"2021-09-01\"\n)\n\nterra::plot(terra::rast(alos))\n```\n\n::: {.cell-output-display}\n![](index_files/figure-html/unnamed-chunk-3-1.png){width=672}\n:::\n:::\n\n\nAnd separately, the new `get_naip_imagery()` function provides access to data from the National Agricultural Imagery Program across the United States:\n\n\n::: {.cell}\n\n```{.r .cell-code}\nnaip <- get_naip_imagery(\n aoi,\n \"2018-01-01\",\n \"2021-01-01\",\n pixel_x_size = 30,\n pixel_y_size = 30\n)\n\nterra::plotRGB(terra::rast(naip))\n```\n\n::: {.cell-output-display}\n![](index_files/figure-html/unnamed-chunk-4-1.png){width=672}\n:::\n:::\n\n\n\n## New vignette\n\nOne of the last significant user-facing changes is the addition of [a new vignette, called \"How can I...?\"](https://permian-global-research.github.io/rsi/articles/How-can-I-.html). This vignette is meant to collect common use-cases into a single document, providing users with a \"cookbook\" containing methods they might use to approach their current problems. If you've got a use-case that took you a moment to figure out, or a problem that you think rsi _should_ be able to solve, let me know through an issue on GitHub so I can incorporate it into this vignette!\n\nThe other improvements in this release focus mostly on bug squashing -- including a nasty bug where downloading multiple tiles using `composite_function = NULL` could fail -- and simplifying the internals of `get_stac_data()` to make it more maintainable and extensible into the future.\n\n## Acknowledgments\n\nAs always, huge thanks to the folks who have been involved in testing and improving this package since our last release: [&#x0040;agronomofiorentini](https://github.com/agronomofiorentini), [&#x0040;h-a-graham](https://github.com/h-a-graham), and [&#x0040;mateuszrydzik](https://github.com/mateuszrydzik). It's extremely appreciated.\n",
"markdown": "---\ntitle: \"rsi 0.2.0 is now on CRAN!\"\ndescription: \"More data products, fewer bugs, less time wasted on data management slop.\"\nauthor:\n - name: Mike Mahoney\n url: {}\ndate: \"2024-03-29\"\ncategories: [R, Spatial, geospatial data, R packages]\nimage: banner.jpg\nformat: \n html:\n toc: true\nengine: knitr\n---\n\n\nI'm deligted to announce that version 0.2.0 of rsi, my package for handling common spatial ML data pre-processing tasks, is [now officially on CRAN](https://cran.r-project.org/package=rsi). rsi aims to handle downloading, masking, rescaling, and compositing data from STAC endpoints, computing spectral indices from that same data, amd wrangling the outputs into bricks ready for modeling workflows -- and to do so in a user-friendly and extensible way. This release adds wrappers for more data sources, makes it easier to download high-quality water data from Landsat, and fixes some bugs while simplifying the internals of the package.\n\nYou can install rsi from CRAN via:\n\n```r\ninstall.packages(\"rsi\")\n```\n\nThis post will walk through a few of the most user-visible changes, starting with...\n\n## Downloading water data\n\nIn older versions of rsi, the default `landsat_mask_function()` would mask your data so that your final files (and composites) only contained the highest quality observations over land. That meant that waterbodies (like the large area in the top left of this image) would always be empty:\n\n\n::: {.cell}\n\n```{.r .cell-code}\nlibrary(rsi)\nfuture::plan(\"multisession\")\n\naoi <- sf::st_point(c(-76.1376841, 43.0351335))\naoi <- sf::st_set_crs(sf::st_sfc(aoi), 4326)\naoi <- sf::st_buffer(sf::st_transform(aoi, 5070), 10000)\n\nlandsat <- get_landsat_imagery(\n aoi,\n start_date = \"2021-06-01\",\n end_date = \"2021-08-31\",\n output_filename = tempfile(fileext = \".tif\")\n)\n\nterra::plot(terra::rast(landsat))\n```\n\n::: {.cell-output-display}\n![](index_files/figure-html/unnamed-chunk-1-1.png){width=672}\n:::\n:::\n\n\nThis works great if you only care about land observations, but has an obvious flaw otherwise. Thanks to @mateuszrydzik, `landsat_mask_function()` starting in version 0.2.0 now has an argument, `include`, which you can use to also include high quality observations over water in your final outputs:\n\n\n::: {.cell}\n\n```{.r .cell-code}\nlandsat <- get_landsat_imagery(\n aoi,\n start_date = \"2021-06-01\",\n end_date = \"2021-08-31\",\n mask_function = \\(r) landsat_mask_function(r, include = \"both\"),\n output_filename = tempfile(fileext = \".tif\")\n)\n\nterra::plot(terra::rast(landsat))\n```\n\n::: {.cell-output-display}\n![](index_files/figure-html/unnamed-chunk-2-1.png){width=672}\n:::\n:::\n\n\nYou can also set `include = \"water\"` to _only_ include data over waterbodies, and exclude all data over land.\n\n## Downloading even more data\n\nTwo new functions in this release provide friendly wrappers around `get_stac_data()` to help you access specific data sources.\n\nFirst, thanks to @h-a-graham, the new `get_alos_palsar_imagery()` function provides a wrapper for accessing data from ALOS PALSAR:\n\n\n::: {.cell}\n\n```{.r .cell-code}\nalos <- get_alos_palsar_imagery(\n aoi,\n \"2021-06-01\",\n \"2021-09-01\"\n)\n\nterra::plot(terra::rast(alos))\n```\n\n::: {.cell-output-display}\n![](index_files/figure-html/unnamed-chunk-3-1.png){width=672}\n:::\n:::\n\n\nAnd separately, the new `get_naip_imagery()` function provides access to data from the National Agricultural Imagery Program across the United States:\n\n\n::: {.cell}\n\n```{.r .cell-code}\nnaip <- get_naip_imagery(\n aoi,\n \"2018-01-01\",\n \"2021-01-01\",\n pixel_x_size = 30,\n pixel_y_size = 30\n)\n\nterra::plotRGB(terra::rast(naip))\n```\n\n::: {.cell-output-display}\n![](index_files/figure-html/unnamed-chunk-4-1.png){width=672}\n:::\n:::\n\n\n\n## New vignette\n\nOne of the last significant user-facing changes is the addition of [a new vignette, called \"How can I...?\"](https://permian-global-research.github.io/rsi/articles/How-can-I-.html). This vignette is meant to collect common use-cases into a single document, providing users with a \"cookbook\" containing methods they might use to approach their current problems. If you've got a use-case that took you a moment to figure out, or a problem that you think rsi _should_ be able to solve, let me know through an issue on GitHub so I can incorporate it into this vignette!\n\nThe other improvements in this release focus mostly on bug squashing -- including a nasty bug where downloading multiple tiles using `composite_function = NULL` could fail -- and simplifying the internals of `get_stac_data()` to make it more maintainable and extensible into the future.\n\n## Acknowledgments\n\nAs always, huge thanks to the folks who have been involved in testing and improving this package since our last release: [&#x0040;agronomofiorentini](https://github.com/agronomofiorentini), [&#x0040;h-a-graham](https://github.com/h-a-graham), and [&#x0040;mateuszrydzik](https://github.com/mateuszrydzik). It's extremely appreciated.\n",
"supporting": [
"index_files"
],
Expand Down
2 changes: 1 addition & 1 deletion posts/2024-03-29-rsi-020/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ You can also set `include = "water"` to _only_ include data over waterbodies, an

## Downloading even more data

Two new functions
Two new functions in this release provide friendly wrappers around `get_stac_data()` to help you access specific data sources.

First, thanks to @h-a-graham, the new `get_alos_palsar_imagery()` function provides a wrapper for accessing data from ALOS PALSAR:

Expand Down

0 comments on commit 77c1a81

Please sign in to comment.