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

Major update #12

Open
wants to merge 87 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
e0a4978
Added target_uid to TEMP file names
p-schaefer May 10, 2022
b83fc31
fixed a target_uid name
p-schaefer May 10, 2022
8c2f230
Merge pull request #1 from p-schaefer/p-schaefer-patch-1
p-schaefer May 10, 2022
2505d04
added target_uid to raster::raster temp files
p-schaefer May 12, 2022
1079a4f
fixed issue when clip_region was .tif
p-schaefer May 12, 2022
81a2d25
Added _ prefix to TEMP files, and minor edit to readme to load DEM da…
p-schaefer May 12, 2022
2630916
Changed raster functions to terra. Added a restart patameter to hydro…
p-schaefer Jul 11, 2022
26ee282
Update hydroweight.R
p-schaefer Jul 11, 2022
8033425
Update hydroweight.R
p-schaefer Jul 11, 2022
ccdf6b9
Update hydroweight.R
p-schaefer Jul 11, 2022
3acf32c
Update hydroweight.R
p-schaefer Jul 11, 2022
8133735
Update hydroweight.R
p-schaefer Jul 11, 2022
71ed427
Update hydroweight.R
p-schaefer Jul 11, 2022
52335b6
Update hydroweight.R
p-schaefer Jul 11, 2022
9691b3d
Update hydroweight.R
p-schaefer Jul 11, 2022
d1ad357
Update hydroweight.R
p-schaefer Jul 11, 2022
5ec733e
Update hydroweight.R
p-schaefer Jul 11, 2022
c82b6f9
Update hydroweight.R
p-schaefer Jul 11, 2022
5869744
Update hydroweight.R
p-schaefer Jul 11, 2022
a20998d
Update hydroweight.R
p-schaefer Jul 11, 2022
17aa45f
Fixed an issue when target_o and target_s
p-schaefer Jul 14, 2022
5e408aa
Update hydroweight.R
p-schaefer Jul 14, 2022
c9a24e1
Update hydroweight.R
p-schaefer Jul 14, 2022
38f6a9f
Update hydroweight.R
p-schaefer Jul 14, 2022
ffe5d2d
Minor update to how lumped is calculated
p-schaefer Jul 14, 2022
8b26ef1
updated how lumped is calculated
p-schaefer Jul 14, 2022
3a8650c
added terra::wrap() to output of hydroweight for saving as .rds file
p-schaefer Jul 14, 2022
1ec3822
Added filenames to terra::project
p-schaefer Jul 14, 2022
0a5f7f4
Add overwrite=T
p-schaefer Jul 14, 2022
58e63bd
Missed an overwrite = TRUE
p-schaefer Jul 15, 2022
a6bf2d7
changed filename parameter in terra::project to be unique from writeR…
p-schaefer Jul 15, 2022
acd329d
Major update to hydroweight_attributes to switch to terra
p-schaefer Jul 18, 2022
ef2806d
Added support for packaged rasters and vectors
p-schaefer Jul 18, 2022
31f47c9
minor fix
p-schaefer Jul 18, 2022
d59eda9
finor fix
p-schaefer Jul 18, 2022
ce25d95
minor fix
p-schaefer Jul 18, 2022
38c6329
changed output of hydroweight to .zip
p-schaefer Jul 19, 2022
ad0cc82
fix to zip filenames
p-schaefer Jul 19, 2022
69c55ca
update to zip file storage
p-schaefer Jul 19, 2022
f3b8c3f
nearly done vsrion 2 commit
p-schaefer Jul 21, 2022
7c3fcbb
set crop override to T
p-schaefer Jul 21, 2022
6e3fe46
Update hydroweight_uitility.R
p-schaefer Jul 25, 2022
b8c0467
Fixed names when polygons convert to rasters
p-schaefer Jul 25, 2022
972d0f5
Added an early extent crop to see if it speeds things up
p-schaefer Jul 25, 2022
15fc511
Added save for intermediate SpatVector layers when resample_type=="near"
p-schaefer Jul 25, 2022
e3827e0
bug fix from previous commit
p-schaefer Jul 25, 2022
8cf7f06
minor fix
p-schaefer Jul 25, 2022
3fbb939
Fix spatVect names
p-schaefer Jul 25, 2022
a455910
added check to see if reprojection is needed
p-schaefer Jul 25, 2022
0c14fbe
Removed forcing raster stack when only single unique value
p-schaefer Jul 25, 2022
c1a7a2d
Minor tweaks
p-schaefer Jul 27, 2022
d45d82a
Better cleaning of temporary files
p-schaefer Jul 28, 2022
8e25e55
Changed clip_region back to polygon internally
p-schaefer Jul 28, 2022
688cfcd
minor tweak
p-schaefer Jul 28, 2022
3247954
Edits to readme
p-schaefer Jul 29, 2022
e062852
minor edits
p-schaefer Jul 29, 2022
d8d1fcf
minor tweaks to speed up functions
p-schaefer Aug 11, 2022
8ed3dc0
switched clip_region to interval vector
p-schaefer Aug 11, 2022
2e351b8
Minor tweaks to hide some warning messages
p-schaefer Aug 11, 2022
3b47a17
fix issue with target_O and _S
p-schaefer Aug 11, 2022
ed1a6c5
Adjusted package dependencies. Modified readme. Minor safety tweaks i…
p-schaefer Aug 12, 2022
f56cb97
updated some function help files
p-schaefer Aug 12, 2022
566696b
fixed minor bug in parse_input
p-schaefer Aug 19, 2022
208fca9
Added option to return products to hydroweight function
p-schaefer Aug 20, 2022
41d66c8
minor edits
p-schaefer Aug 21, 2022
05f69ba
dont break this time
p-schaefer Aug 22, 2022
c4474ba
minor changes updated readme
p-schaefer Aug 22, 2022
8c78dd1
fixed loi_numeric_stats not being respected
p-schaefer Aug 22, 2022
b41bf96
Fixed some issues in readme and help files
p-schaefer Aug 22, 2022
f7f6da9
Added an earlier terra::project when target is raster, and input is a…
p-schaefer Aug 25, 2022
d4e489c
changed .shp file reading in in process_input to sf from terra becaus…
p-schaefer Aug 25, 2022
15c6d90
Updated readme
p-schaefer Aug 30, 2022
a6333c4
removed sf::read_sf() from process_input()
p-schaefer Sep 15, 2022
6525aca
Added support for distance_weights to be specified as a list of file …
p-schaefer Sep 22, 2022
254a4ad
Changed order of roi processing for improved performance. Distance we…
p-schaefer Sep 22, 2022
9909bcb
Fixed roi subsetting when length>1
p-schaefer Sep 22, 2022
f50b1fe
Replaced NAs for missing proportions with 0s.
p-schaefer Sep 22, 2022
d11e2db
Fixed hydroweight_attributes being exported as characters
p-schaefer Sep 23, 2022
032a84d
Fixed roi subselection and added lumped rasters back into returned pr…
p-schaefer Sep 23, 2022
4a3aeeb
updated readme
p-schaefer Sep 23, 2022
52afa1a
added options for different outputs to hydroweight
p-schaefer Sep 25, 2022
7a2df5f
fixed file cleanup
p-schaefer Sep 25, 2022
f732dff
added 'lumped' weights back to hydroweight output, after accidentally…
p-schaefer Sep 27, 2022
408111a
corrected raster names
p-schaefer Sep 27, 2022
01eee66
fixed lumped proportions not being returned
p-schaefer Sep 30, 2022
83f2cbc
super important bug fix!
p-schaefer Oct 24, 2022
5b6b692
.
p-schaefer Dec 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed hydroweight_attributes being exported as characters
  • Loading branch information
p-schaefer committed Sep 23, 2022
commit d11e2dbe8610a683872d57fd4405da9620093583
1 change: 1 addition & 0 deletions R/hydroweight_attributes.R
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ hydroweight_attributes <- function(loi,

final_out_table<-tibble::enframe(unlist(final_out_table)) %>%
tidyr::pivot_wider() %>%
mutate(across(c(everything(),-any_of(roi_uid_col)),as.numeric)) %>%
mutate(across(ends_with("_prop"),~ifelse(is.na(.),0,.)))

colnames(final_out_table)<-final_out_table_nms
Expand Down