dali-lab / pine-beetle-backend

Visualizing data and predicting outbreaks of Southern Pine Beetles across twenty US states. Built in the DALI Lab.
https://spbpredict.com
0 stars 0 forks source link

Data rewrite #110

Closed tmonfre closed 2 years ago

tmonfre commented 2 years ago

Description

Updates database fetching for data rewrite in automation repo (https://github.com/dali-lab/pine-beetle-automation/pull/133).

Only have routers for summarized, unsummarized, and admin user data. Summarized routers support the ability to run aggregation pipelines (MongoDB's version of group by and calculated columns). Added routes for aggregating by year and computing averages/sums/etc. Also support aggregating by state, county, and ranger district. Also added routes for generating list of years, states, counties, and ranger districts represented in data.

All routes support optional startYear, endYear, state, county, and rangerDistrict query params for filtering. State, county, and ranger districts can include multiple locations, comma separated.

Type of Change