hobuinc / silvimetric

Apache License 2.0
8 stars 4 forks source link

Switch to DataFrames and add Metrics Filters #84

Closed kylemann16 closed 6 months ago

kylemann16 commented 7 months ago

This pull request makes a couple of major changes:

  1. Convert from using mostly numpy ndarrays to pandas DataFrames

    • Dataframes are easier to work with, and easier to manipulate overall
    • Dataframes make it easier to implement the filters feature, as it's easier to pass around DataFrames with select attributes
  2. Add Filters to Metrics

    • Filters will act as a list of functions that manipulate a DataFrame before it arrives at the Metric's main method.
    • This will allow for users to add thresholds, like an elevation threshold for a specific metric
  3. Split up methods a bit more in Shatter so that computationally heavy pieces have more room to operate.

  4. Add Attribute dependencies for a Metric so we can be sure that the database and any ingested data has that attribute

  5. Change Extract to be using pandas DataFrames as well.

    • Added better filtering and overlap detection