Comments (5)
Also, just wanted to give an early thanks for this package! I've done some areal interpolation in R before, but it makes a lot of sense to turn it into a package.
from areal.
Thanks @mfherman!
This might be a bit of an edge case - the only reference I can find to the error from sf::st_cast()
, which was the root case, is here.
Your intersection is creating geometry collections, which our test data has not done. Reading between the lines of the sf
issue, it seems like you might be creating slivers with the intersection but I didn't verify that. I've added a line to aw_intersect()
that gets a version of your code working correctly.
I'm going to leave this open until we merge the PR - we've got a backlog since the package is under CRAN review. What we'll do is wait until we hear back from the initial review. If we have to resubmit, will merge the multipolygon
branch before we do.
Otherwise, will merge into master
after CRAN acceptance and then submit a patch to CRAN in January.
from areal.
Thanks, @chris-prener! aw_intersect()
on the multipolygon
branch is working for my sf objects now.
from areal.
Glad to hear it @mfherman!
from areal.
@chris-prener -- I think the fix to this issue might be causing some performance issues when it isn't really needed.
A little back of the envelope profiling of my areal
function vs a non-areal
function gives me ~9 minutes for areal and ~30 seconds for non-areal. I dug into the function calls I'm making and found that this line is the killer. I also get the warning:
Warning message:
In st_collection_extract.sf(intersection) : x is already of type POLYGON.
Reproduce with: big_test.rda.zip
load("big_test.rda")
int <- areal::aw_intersect(target_polygons, data_source_cells, "area")
I'm not really sure what the consequences of not calling that are or what the best check would be to see if you don't need it... will do some research and get back to you.
from areal.
Related Issues (20)
- Oddity with aw_intersects and adding up areas? HOT 4
- aw_area assumes geometry column is named "geometry" HOT 3
- Tibble Output Missing Other Variables HOT 1
- install error HOT 4
- Namespaces in Imports field not imported from HOT 4
- Grammatical suggestions for the paper HOT 3
- Interpolating Average (Gaussian) Data HOT 2
- Grid Interpolation HOT 3
- Intelligent Dasymetric Mapping
- dplyr 1.0.0 HOT 4
- Add polygon checks to ar_validate() HOT 1
- Transition to Github Actions HOT 1
- Test Data
- Upcoming sf release breaks areal HOT 5
- Missing packages in vignette HOT 1
- Implement Inverse Distance Weighting Algorithm HOT 1
- GitHub Actions
- weight and output arguments of aw_interpolate not picking up defaults? HOT 3
- `_pkgdown.yml` issue
- Suggested approach for estimating interpolated margins of error with census data? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from areal.