GithubHelp home page GithubHelp logo

species_survey's Introduction

species_survey

Disclaimer - This was built initially for my personal use specifically for recording moths. Anyone using this is likely to find some rough edges and gotchas. Please let me know and I'll endevour to fix - better yet send me a pull request.

Which branch?

I recommend taking the latest from the deploy branch.

Installation

Very little effort has been spent on making the install process smooth. Having said that I do believe there are only a few steps needed:

  1. clone the repo to your local machine
  2. Install/config a mysql or mariadb server - I use mariadb, so that is recommended. (See notes below about installation). If you would rather use a sqlite3 filebased (and get the app to set this up for you, let me know)
  3. create a file sql_config_local.py to override the values in sql_config.py
  4. Ensure you have installed the dependancies pip install markdown numpy bottle pandas mysql.connector waitress
  5. Install libcblas.lib used by pandas - sudo apt-get install libatlas-base-dev
  6. Populate the tables by running python ./bottle/create_tables.py. This will ask for the root password, which is not stored.
  7. run moth_bottle.py (I run this from a crontab at boot)
  8. point a browser at http://<your machine>:8082

Good luck and let me know how it goes.

Installing and configuring mariadb

There is a good tutorial here: https://raspberrytips.com/install-mariadb-raspberry-pi/

Follow this tutorial to set up root access from the local machine

species_survey's People

Contributors

gadasc avatar

Stargazers

Steve Roughley avatar

Watchers

 avatar

species_survey's Issues

New species

"Riband Wave (non-banded form)"- "Idaea aversata ab. remutata"
"Peppered Moth" 4 variants

Date

Would be nice to be able to change date in other way rather than just clicking on arrows: I want to move from 26th to 14th, that's 12 clicks

Discovery

This "Issue" records questions about moths that we could set out to establish:

  1. What are the weather tolerances of species (e.g. some moths seem to fly even during cold/bad weather, while others seem to sulk very quickly. This should be easy to determine for high catch-rate moths - e,g, Treble lines
  2. Can we find a reliable food plant list, and see if that can predict plants in the area.
  3. What is the range of a moth (e.g. What is the correlation of two traps x metres apart)
  4. What can we tell by the distribution of a moth catches over time for a species (some seem close to normal distributions, while others (LYU) seem to have an early ramp followed by an explosion.
  5. Can we estimate life time of a moth species.

Survey sheet

Going back from 26th I get to 21st, all blank, then on 20th I have one entry: 'nan', with a count of 0. Same on 19th. Then on 18th some more species appear, with 'nan' at the bottom. By 17th 'nan' has gone

Improve species list search

  1. Add highlights to show the letters typed.
  2. Fix tap on touchscreen
  3. Map input punctuation agnostic - input.replace(/[^0-9a-z]/gi, '')

Add fields to download page to set Recorder and Location

Further thoughts on this topic

  1. Decided each entry will need addition fields - initially Lamp, Location and Recorder.
  2. Each will need a name (easy to remember- especially for location)
  3. Lamp and recorder are just names so no additional consideration
  4. Location should be an easy to remember one, such as Home, and have a UKGrid and/or Lat Long
  5. When retrieving the download file we can use SQL to form this file so create a location table.
  6. Each Lamp/Location/Recorder will need means to add/change especially in Location situation
  7. Need to use defaults

Feedback from up the Hill

2020 June 28

1. One thought: when entering a series that is already on the list, it would be nice if the list automatically scrolled down to the right position. Or maybe it could appear in the dropdown, highlighted, and then if it is selected, the list scrolls so it is at the top.
I agree - particularly when the number of species shown is long, I can type in the letters for a new moth to find it missing in the list - which is odd, and then I remember it already exists in the list. I can probably make it behave as you suggest - potential with the option of greying the species already included, so the user isn't surprised when it jumps. 
2. New species turn green and then red as you describe. Had you considered whether the species should return to green if the count is then reduced to zero again? Also, I just accidentally added 3 to Heart & Club instead of Heart & Dart, changed it back to zero, but Heart & Club remains red. Should really go back to black as it was not a species I added.
I was in two minds about this. Going back to black is probably the more natural behaviour.Moving to a different date and back works - data is retained.
3. Moving to a different url and back: initially, count column is blank, although species with non-zero count are still red. Also, date field shows dd/mm/yyyy. Refreshing the page by going back a day then forward again restores everything as it should be.
Good catch - this was  a surprise. Then I realised you probably used the back/previous button in the browser (quite naturally) after thinking about this for a couple of minutes I believe I know the root cause - and hopefully is an easy fix.
4. Having submitted one day’s records, moving on day by day, after 4 days (i.e. submitted for 14th, move to 18th) the list shrinks a lot, but ’nan’ appears in it.
The list shrinking is most likely to do with the species caught prior to that date, so at the start of using the software, scrolling back will reduce the list. However the "nan" (Not a Number) is strange. Can you send me a screen shot or cut and paste the table into an email (don't worry if the formating gets messed up, I will work it out) 
5. I mentioned this before: species column is very wide, making it difficult to read across to the count column.
I've attached a screenshot from my laptop. Is this what you see? Do you have the stripped rows? I'm just wondering what would be the easiest way for you to tell me the column layout that would work for you. Perhaps you could take a screen shot and then overlay some lines in a picture editor to show where you feel the columns should be?
6. Another thought - maybe guilding the lily here, but I have yet to set a challenge you don’t rise to! Wold be nice to see what the last data entry was, at least the species, so for those of us who get interrupted whilst entering a long list days later, and who have what I can only describe as a transient memory, we can remember where we got to. This may not seem that important, but as I am entering data from two traps, I can’t simply look at what is red in the list as I may have the same species in both traps.
I think you've realised I love challenges. From a database point of view, this is really easy - it, what was my last entry (Date, species, count). Would a menu item to go to last entry be of help - this would jump to the date of the last entry. Combining with 1. above it would then be possible to scroll to that entry. Does that work?
7. As  ‘latest catches’ only covers the two weeks prior to the current date, it only contains one day for me as I’m a bit behind. Cold there be an option to change the range covered by this?
Thanks - with me trapping everyday, I don't have the discontinuity of records that shows this kind of thing up. I'm reluctant to put in configurable options if I can avoid it. There are a couple of reasons. a) It's all too easy to use these as get out of jail free cards, and avoids the designer (me) thinking about the use-cases properly. b) It adds more degrees of freedom to break things, c) I have a pathologic hate of system options that get buried in layers of badly designed menus.
I have an open issue to improve the latest catches page, as it looks awful, and I want to augment the table with highlights for FFY, First time, Earliest catch, etc.
As a counter proposal - how about, instead of the last 14 days, I list the last 14 catches, this means no configuration option needed? 

Dropdown lists

species dropdown list: entered 'euc' for eucosma cana, the eucosma species are split up into several chunks in the list, and even within those chunks are not in alphabetic order. In fact this seems to apply to most of the match results. I know you mentioned this yesterday, but I got the impression that it was an infrequent occurrence.

November agg

November Moth agg. appears twice in dropdown list on survey sheet

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.