How is the source code in the Github repo used?


I will do a project on a topic linked to what the Invest software does.

I have looked at the GitHub repo for the Natcap project and I am wondering how the repo is structured. With the source python codes, functions are only declared and I don’t if there another file in the repo calling for these functions in the different models. How should I use the sources files of the repo? Also I’ve looked at the README files without finding any answer to my question. Is there some documentation I should look up for?

Thanks in advance.

Hi @marine.manche , thank you for posting your question. There is more documentation of the natcap.invest API and how to setup a scripting environment linked below. The general steps are:

  1. setup a python environment where you can install the natcap.invest python package. Installing the InVEST Python Package — InVEST 3.9.2.post3+g3d115d4d.d20211103 documentation
  2. create a python script that defines the input data as python dictionary and passes that dict to the models execute function. Tutorial: Batch Processing on Windows — InVEST 3.9.2.post3+g3d115d4d.d20211103 documentation

Please let us know if you have more questions as you go,

1 Like