Code Monkey home page Code Monkey logo

mosquito_alert's People

Contributors

aescobarr avatar christiangarciago avatar dani-guerrero avatar epou avatar johnpalmer avatar npmcdn-to-unpkg-bot avatar pablogalve avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mosquito_alert's Issues

Improve reverse_geo query performance using hierarchy

Scenario: we want to get all boundaries that contain a point.

Current strategy:
Using a queryset that queries all boundaries in DB and get those that contains the desired point.

Proposed strategy:
Query first only boundaries from the highest boundary_level (aka: countries), which contains less objects, and get the/those boundaries that contain the point. Then, query the boundaries from the next boundary_level and filter only that are children from the previous result... And so on until reaching the last boundary_level

Transfer this repo to Mosquito-Alert organization

We are trying to consolidate all of the Mosquito Alert repositories in the Mosquito-Alert organization. This is low-priority, but at some point we should transfer this one after double-checking that doing so will not break anything. My experience so far is that this is very easy: Just transferring ownership under Settings will move the repository and also create redirects such that all of the existing URLs continue to work (both the GithHub URLs for anyone clicking an old link to the MoveLab/tigaserver repository, and the git remotes on our local machines and servers for pulling and pushing code).

Propagate to parent/children when Boundary is add/removed from/to Location

Example:

polygon = Polygon.from_bbox(bbox=(0,0,10,10))
polygon_children = Polygon.from_bbox(bbox=(1,1,5,5))

point_in_children = Point(2,2)

boundary_a = Boundary(geometry=polygon)
boundary_a_child = Boundary(parent=boundary_a, geometry=polygon_children)

loc = Location(point=point_in_children)

assert frozenset(loc.boundaries.all()) == frozenset([boundary_a, boundary_a_child])

# Unlink parent boundary
boundary_a.locations.remove(loc)

# HERE: child should have been removed to

assert loc.boundaries.all() == []

LINKING PARENT -> SHOULD TRY TO LINK ALL THE DESCENDANTS
UNLINKING PARENT -> UNLINK ALL THE DESCENDANTS

LINKING CHILDREN -> MUST LINK ALL PARENTS
UNLINKING CHILDREN -> Do nothing

Add time to/from sunset/sunrise in reports

Data source candidates:

Benchmarks:

Conclusion: use https://rhodesmill.org/skyfield/

Take into account places where the sun never reaches certain degrees below the horizon (e.g: northern Sweden)

Report type: IndividualReport & BiteReport

ACHTUNG: Use local datetime (TZ) as reference

Interesting info:

  • Daylight duration
  • Sun elevation
  • Category
  • Sunset.datetime
  • Diff between created time and sunset event
    • report.datetime - sunset.datetime (or NULL, if the sun is never below 6deg that day, e.g: Northern Norway)
    • after 00h00 difference with tomorrow.sunset.datetime
  • moon phase

To be read: https://besjournals.onlinelibrary.wiley.com/doi/10.1111/2041-210X.13290

Speed up geo import_boundaries command

Start transaction.atomic when objects are saved in db.
Check if transaction.atomic is needed... Not sure if import_export is already guaranteeing it

Ensure transaction lock is as short as possible

Save which individuals has reviewed a user

If a user creates and identificationsuggestion:

  • Create identification suggestion
  • Mark individual as reviewed by that user

If a user doesn't how to identify the individual and want to forget about it:

  • Mark it as reviewed + do not show

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.