Giter Site home page Giter Site logo

bspborg / smartbirds-server Goto Github PK

View Code? Open in Web Editor NEW
8.0 8.0 0.0 27.05 MB

Home Page: https://smartbirds.org

License: GNU Affero General Public License v3.0

JavaScript 98.37% HTML 0.52% Shell 0.34% Dockerfile 0.13% EJS 0.64% Procfile 0.01%
actionhero angularjs api-server backend data-entry frontend herpetology invertebrates nodejs ornithology species-monitoring

smartbirds-server's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar dnikolov123 avatar gpopgeorgiev avatar groupsky avatar onyxvd avatar tobradex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

smartbirds-server's Issues

[bgatlas] get cell info

  • Method: GET
  • Route: /bgatlas/cell/:utm_code
  • Inputs: utm_code
  • Requires: authenticated user
  • Returns: list of species and if species was observed or part of bgatlas2008_species
    [{ species: String, known: Boolean, observed: Boolean}]

Test cases:

  • a species from atlas but not observed by user is returned with {known: true, observed: false}
  • a species observed by user but not in atlas is returned with {known: false, observed: true}
  • a species observed by user and in atlas is returned with {known: true, observed: true}
  • a species observed by other user but not in atlas is not returned
  • a species observed by other user and in atlas is returned with {known: true, observed: false}
  • a species observed in another cell is not returned
  • a species from atlas in another cell is not returned
  • unauthorized request results in 401
  • unknown utm_code results in 404

[bgatlas] cell stats

  • Method: GET
  • Route: /bgatlas/cell/:utm_code/stats
  • Inputs: utm_code
  • Requires: authenticated user
  • Returns: count of distinct species from monitoring and/or bgatlas2008_species and top 3 users with most distinct species
    data: [{ user: {firstName: String, lastName: String}, species: Number}],
    count: Number

Test cases:

  • a cell with no observations and no species in bgatlas2008_species results in count: 0, data: []
  • a cell with no observation and one species in bgatlas2008_species results in count: 1, data: []
  • a cell with one observation and no species in bgatlas2008_species results in count: 1, data: [{user: ..., species: 1}]
  • a cell with two users each having one observation on the same species and no species in bgatlas2008_species results in count: 1, data: [{user: ..., species: 1}, {user: ..., species: 1}]
  • a cell with one observation and the same species in bgatlas2008_species results in count: 1, data: [{user: ..., species: 1}]
  • a cell with one observation and the different species in bgatlas2008_species results in count: 2, data: [{user: ..., species: 1}]
  • a cell with two users each having one observation on different species and a third species in bgatlas2008_species results in count: 3, data: [{user: ..., species: 1}, {user: ..., species: 1}]
  • a cell with four users each having one observation results in data.length = 3
  • an observation in a different cell results in count: 0, data: []
  • unauthorized request results in 401
  • unknown utm_code results in 404

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.