Giter VIP home page Giter VIP logo

space-station's People

Contributors

arienzo avatar beautah avatar dcraaybeek avatar dlhogan97 avatar ibrahim-ola avatar jordanmbeer avatar micah-prime avatar micahjohnson150 avatar rpalomaki avatar

Watchers

 avatar  avatar  avatar

space-station's Issues

function to return nearest met sites to snow Ex sites

as a developer I need to know what n # of met sites are closest to any given snow ex sites.

The function should take a lat/long of a snow ex site, a input geojson (mostly snotels, but any sites) and a n # of sites and return a geojson representation of the n # of snotels that are closest to that snow ex site. The calculation does not need to be exact but should be accurate enough to be trusted and with low computational overhead.

A snippet which may help taken from another project takes a input gdf and returns other sites within that gdf that are closest to a given site. Just need to modify it to use a lat and long as input rather than a reference to another site

def nearest_sites(df_meta, resp_site=None, pred_sites=None, num_sites=10):
    try:
        num_sites = int(num_sites)
    except ValueError:
        num_sites = 10
    tx = df_meta[df_meta["triplet"] == resp_site]["latitude"]
    ty = df_meta[df_meta["triplet"] == resp_site]["longitude"]

    def calc_dist(row, tx=tx, ty=ty):
        return (row["latitude"] - tx) ** 2 + (row["longitude"] - ty) ** 2

    df_meta["proximity"] = df_meta.apply(calc_dist, axis=1)
    df_meta.sort_values(by="proximity", inplace=True)
    df_nearest = df_meta.head(num_sites + 1).copy()
    triplets_in_use = tuple(set([i for i in (resp_site,) + pred_sites if i]))
    df_in_use = df_meta[df_meta["triplet"].isin(triplets_in_use)]
    df = pd.concat([df_nearest, df_in_use]).drop_duplicates(ignore_index=True)
    return df

Content for final jupyter book

  • Spatial plot of difference
  • Map of what datasources are included colored by distance to snotel site
  • Histogram of depth differences on log scale
  • box and whisker for each snotel
  • Flow chart figure of the pipeline

Ground Truth Shapefile

Need a shape file with pertinent site meta data for all SNOTELs and SnowEx Sites - create a gist (geojson) and export a binary .shp as zip. This can then be handed off to @arienzo to manipulate in arcGIS

Dataloaders

As a developer I need a dataloader for both snowEx, AWDB, and metloom data (and any other sources that are identified). The methods or classes should take a site_id, date range and sensor/element type and return a datetime indexed dataframe with the data. Perhaps all data sources should be called from a single method and return all data sources in a single dataframe.

@Ibrahim-Ola

Max distance from site

max distance from site should change depending on different parameters such as vegetative cover, elevation, aspect, etc...

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.