semvec/pypi-packages huggingface dataset:
ll-land-analyzer 2.1.0
LL Land Analyzer tool for converting maps to data.
Requires Python: <4.0,>=3.11

To install the land analyzer, run the following:
```
pip install ll_land_analyzer
```

The Land Analyzer depends on WhiteBoxTools. WhiteBoxTools might not be downloaded correctly the first time on Linux. This can be fixed by setting the environment
variable:
`WBT_LINUX=MUSL` before running `pip install ll_land_analyzer`

### How to run locally

Either import one of the pre-defined Generators

```python
from ll_land_analyzer.generators import SoilPyramidGenerator, EsaGenerator, ElevationGenerator, BioclimateGenerator, YearlyClimateGenerator, MonthlyClimateGenerator, FutureClimateGenerator, FireGenerator, PlantableAreaGenerator, WRBGenerator
from ll_land_analyzer.data_handling import PlantingManager

# Initialize one of the Generators with a PlantingManager that manages your geojson.
elevation_generator = ElevationGenerator(PlantingManager("example.geojson"))
elevation_generator.generate_plots(output_folder="example-output")  # Generate plots with this generator
elevation_generator.get_rsd_data()  # Get all data in json-format for displaying in front-end
elevation_generator.get_nfi_data()  # Get all data in json-format for nfi-filtering
```

Or create your own Generator

```python
from pathlib import Path
from typing import Mapping
from ll_land_analyzer.helpers import GeneratorProtocol, RSDKeyContent
from ll_land_analyzer.data_handling import PlantingManager, HyphenDataSource, MapLayerTable


class CustomGenerator(GeneratorProtocol):
    def __init__(self, planting_manager: PlantingManager, map_layer_table: MapLayerTable):
        self._ds = HyphenDataSource(planting_manager=planting_manager,
                                    url=map_layer_table.get_url_by_tag("example_tag"))
                                    
    def generate_plots(self, output_folder: Path | str) -> None:
        raster = self._ds.get_raster(buffer=200, clip=False)
        ... # Plot raster
    
    def get_rsd_data(self) -> Mapping[str, RSDKeyContent]:
        ...
    
    def get_nfi_data(self) -> dict:
        ...
    

# Call your own generator
elevation_generator = CustomGenerator(PlantingManager("spain.geojson"), MapLayerTable())
elevation_generator.generate_plots(output_folder="example-output")  # Generate plots with this generator
elevation_generator.get_rsd_data()  # Get all data in json-format for displaying in front-end
elevation_generator.get_nfi_data()  # Get all data in json-format for nfi-filtering
```

To run the Land Analyzer locally environment variables will be needed. The Land Analyzer will automatically search global variables and variables defined in a `.env` file in the root of the project you are running the Land Analyzer from. Ask the developer for the correct environment variables to run your scripts.
lw-menu 1.0.8
A short description of your package
Requires Python: >=3.6


# lw_menu

[![Downloads](https://static.pepy.tech/badge/dumb-menu)](https://pepy.tech/project/dumb-menu)

simple_term_menu don't support windows, so I made dumb_menu.

dumb_menu is not as powerful as simple_term_menu , but this a **GOOD OLD MENU** .

dumb_menu is a light weight command line menu that supports **Windows**, **MacOS**, and **Linux**.


## Installation

```
pip install lw-menu
```

https://pypi.org/project/dumb-menu/

https://github.com/cornradio/dumb_menu (I want stars ⭐ uwu)

## Usage

example:

```python
import lw_menu
options = ["[1]Option 1", "[2]Option 2", "[3]Option 3","[q]quit"]
index = lw_menu.get_menu_choice(options)
print(f"You selected option {index + 1}: {options[index]}")
```


![png](https://raw.githubusercontent.com/cornradio/imgs/main/20230214163952.png)

another example:

```python
import os
import lw_menu

def loopmenu():
    options = ["[1]happy",
            "[2]sad",
            "[3]give me a cookie",
            "[q]quit"]
    index = lw_menu.get_menu_choice(options,isclean = True)
    # clear screen, cls for windows, clear for linux
    os.system('cls') 
    # Python 3.10+ only,old version could use if-else
    match index:
        case 0:
            print(":)")
        case 1:
            print(":(")
        case 2:
            print("🍪ヾ(•ω•`)o")
        case 3:
            exit()
    input('Press ENTER to continue...')

if __name__ == "__main__":
    while True:
        loopmenu()
```
![Imgur](https://i.imgur.com/7zjLt8g.png)


## Get help

Get help ➡️ [Github issue](https://github.com/cornradio/dumb_menu/issues)

## Update log


`1.0.8` add "return key string" option , add `demo.py`  As a straightforward example

```python
lw_menu.get_menu_choice(options,give_key_str = True)
```

`1.0.7` fix "flickering on mac zsh" 

`1.0.6` forget write log in 1.0.5

`1.0.5` fix bug in 1.0.4

`1.0.4` support "clean mode" 

`1.0.3` show selected index also when using hotkey  

`1.0.2` first useable version

`1.0.1` fix bug

`1.0.0` first release

## how to upload a new version (for me)

en: https://packaging.python.org/tutorials/packaging-projects/ 

zh: https://python-packaging-zh.readthedocs.io/zh_CN/latest/minimal.html#id2

> make sure have twine installed first

1. change `setup.py`
2. testing `python3 setup.py develop`
3. `python3 setup.py sdist`
4. `twine upload dist/*`

test code :
```
python3

import dumb_menu
dumb_menu.demo()
```