Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New as_distr() converts rasters and points to distributions #133

Merged
merged 1 commit into from
Sep 9, 2023

Conversation

ethanplunkett
Copy link
Contributor

  • New function as_distr() converts raster (terra::SpatRaster) and point
    (sf::sfor data frames) data into distributions. Rasters will be projected
    into cells that align with the BirdFlow object's cells and then cropped
    and masked. With default settings the resulting values will be
    normalized to sum to 1 and any NA values will be replaced with 0. POints are
    converted into a distribution for each point in which all the
    density is placed in the cell corresponding to the point. Projection of sf
    and SpatRasters is done automatically. Data in dataframes is assumed to
    match the coordinate reference system (CRS) of the BirdFlow object unless
    the crs argument is used to define the CRS.
    Closes Facilitate users running predict on points #116.

  • bug fix in xy_to_latlon() that caused it to fail when y was omitted.

@ethanplunkett ethanplunkett linked an issue Sep 8, 2023 that may be closed by this pull request
@ethanplunkett ethanplunkett merged commit 3cc9f75 into main Sep 9, 2023
7 checks passed
@ethanplunkett ethanplunkett deleted the 116-facilitate-users-running-predict-on-points branch September 9, 2023 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Facilitate users running predict on points
1 participant