Code Monkey home page Code Monkey logo

Comments (4)

dblodgett-usgs avatar dblodgett-usgs commented on September 17, 2024

Also, FYI, I've got a second version of that function that uses areal here: https://github.com/dblodgett-usgs/intersectr/blob/areal/R/calculate_area_intersection_weights_2.R

from areal.

chris-prener avatar chris-prener commented on September 17, 2024

Thanks for following up @dblodgett-usgs!

This behavior (and the total and sum approaches to calculating weights) is explained (I hope!) here. The weight = "total" approach for aw_total() would use the total area of the source polygons.

The calculate_area_intersection_weights_2 function makes sense - and I see where the value is used here.

Can you tell me a bit about the use case here and what your plans were for intersectr?

from areal.

dblodgett-usgs avatar dblodgett-usgs commented on September 17, 2024

I see. I guess I misunderstood the distinction between intensive and extensive.

Quantities like mean-areal precip per time step are actually extensive? A little googling and a basic definition clarifies it for me.

Extensive properties, such as mass and volume, depend on the amount of matter being measured. Intensive properties, such as density and color, do not depend on the amount of the substance present.

I switched over to intensive and "total" and things are looking better.

Re: intersectr, we work with a lot of very large spatio-temporal array datasets. The worst case right now is hourly X 1km from 1979-present but more typical is 4km X daily data is common. This is primarily historical weather and downscaled climate projections.

I've implemented various workflows that take such grid X/Y/T grids and convert them to other grids or to spatial geometries over the years. The big heavy-lift system we use is here: https://cida.usgs.gov/gdp/

intersectr has been a little side project that's outside my day to day during the government shutdown to move some code I had sitting around into something formal and hopefully find a home for some of the kernels in there or replace it with other people's stuff!

I'll close this issue for now. Will submit another when I get a little further testing areal.

from areal.

chris-prener avatar chris-prener commented on September 17, 2024

OK - glad the weights are working better. FYI the weight = "total" argument is being ignored - the intensive approach uses weight = "sum" (as sf::st_intersect_as() does). If you have a use case for weight = "total" with the intensive option we can experiment with that as well.

Thanks for describing the more general use - makes sense - happy to think about how parts fit into areal if you want to go that route. Like I said on Twitter, creating grids is of particular interest to me, as are expanding the number of interpolation tools.

from areal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.