GithubHelp home page GithubHelp logo

dichotomous-key's Introduction

Python CLI dichotomous key for Pinus genus

What is this?

This program is the result of my flex week self study of Python programming language.

What does it do?

The program is a command line interface that is similar to a text adventure style game. The assumptions for successful use of this tool is that:

You are located in the Eastern Continental United States.

The tree you are trying to identify is in the Pinus genus.

The tree is a native species.

If these things are true, You can run the program using python3 CLI-key.py in your terminal.

The program will prompt you with binary statements, And you enter a or b depending on which is true. When the program leads you to an end node, it provides you with statements about the characteristics of the tree, and provides more information when you enter more. If you have another pine to identify, or the key did not lead to correct result, back will allow you to traverse up the dichotomous key.

Technologies

This app is written completely in python. The list of species came from wikipedia's trees and shrubs page. I spent a decent amount of time seperating this list into a usable dictionary object, as the whole list was provided by the wiki scraping api as a single string. The code that I did this with is in the 'utils/wiki.py' file. This app only uses a small subset of the 'pinaceaeFile.json' file, with the characteristics added to the trees that exist in the program are inserted in 'easternPinusBuilder.py'

The summaries provided upon a more entry are also provided via the wiki api.

The navigation is a binary tree data structure.

Reflection

I like python's direct, simple syntax. Python seemed to constantly be directing me away from variables towards strings, and in some ways I feel like I was fighting it by creating variables that just equal the same thing as a string.

I did not embrace Classes early enough in this project, and thus I typed out alot more than necessary and then refactored, or realized that I could have done more data building programatically. However, it was a good experience to basically have the app working with dictionaries as the species objects, then refactoring them into Classes with json seed data. I think it should be relatively easy to expand into other species to key.

I wish I could have built the binary key programatically instead of typing out the parent/child relationships. The hardest part of this project might actually have been deciding and modelling the branch points for the questions, I am only a citizen naturalist!

I also originally planned to use the whole Pinaceae Family to do some sort of info navigation, but even if this program had been just informational instead a tool, It was too much data to process in one week. the final count for species is 15, instead of the 220+ in Pinaceae . It only covers a subset of the Genus Pinus even, as evidenced in the 'pinaceaeFile.json'

Thank Yous and Resources

Chris Angelico (Rosuav), Mentor and python guide

Peterson Field Guides: Eastern Trees by George A. Petrides/ Janet Wehr

Used to pair down the huge Pinaceae family and provided guidance on the binary options

Wikipedia forever

this guide to building a text adventure game got me started, and makes me want to add a tree combat feature!

dichotomous-key's People

Contributors

mikeymanoguerra avatar

Watchers

James Cloos avatar

dichotomous-key's Issues

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.