<jupyter_start><jupyter_text>Papua New Guinea case study- BLM calibration (There is no grid)- Solutions clustering- Gap Analysis- Unmet targtes pipeline- FPF calibration (Targets met)- Difference Map (There is no grid)Date: 20 April 2021  Author: <EMAIL>  1. Requirements<jupyter_code>%run marxan_utils.ipynb<jupyter_output><empty_output><jupyter_text>2. MARXAN folder<jupyter_code>MARXAN_FOLDER = '/home/jovyan/work/datasets/raw/demo_Papua_New_Guinea/marxan_Papua_New_Guinea'
MARXAN_INPUTDATA = 'input.dat'<jupyter_output><empty_output><jupyter_text>3. BLM calibration (no grid file, can't calculate area to apply rule of thumb)<jupyter_code>grid_file_path = f'{MARXAN_FOLDER}/pulayer/pu_base.shp'
BLM_calibration(MARXAN_FOLDER,'input.dat',grid_file_path )
plotClumping(MARXAN_FOLDER,'input.dat',grid_file_path)<jupyter_output><empty_output><jupyter_text>Execute marxan<jupyter_code>#execute marxan
userInputFile = readInput(MARXAN_FOLDER, MARXAN_INPUTDATA)
userInputFile.VERBOSITY = 3
saveInput(MARXAN_FOLDER, MARXAN_INPUTDATA,userInputFile)
execute_marxan(MARXAN_FOLDER) ### Runs with the old algorithm but fails with the new one<jupyter_output><empty_output><jupyter_text>SCENARIO OUTPUTS  3) Solutions clustering<jupyter_code>bestsols= clusterSolutions(MARXAN_FOLDER,'input.dat',k=5)
bestsols<jupyter_output>Overall best solution is 1<jupyter_text>Summary info 5 most different solutions<jupyter_code>summary = validateFile(MARXAN_FOLDER,'input.dat',OutputSum)
sum_diff =summary[summary['Run_Number'].isin(bestsols)]
sum_diff<jupyter_output><empty_output><jupyter_text>4) Gap Analysis<jupyter_code>df = gapAnalysis(MARXAN_FOLDER, 'input.dat')
fig, anx = plt.subplots(nrows=1, ncols=2,figsize=(10,10), constrained_layout=True)
plotGap(df, 'Pre-Marxan', anx[0], post_marxan=False)
plotGap(df, 'Post-Marxan', anx[1], post_marxan=True)<jupyter_output><empty_output><jupyter_text>5) Unmet targets pipeline<jupyter_code>unmetDecisionTree(MARXAN_FOLDER, 'input.dat',
                      lock_out_limit=50, 
                      high_cost_quantile= 0.7, 
                      hcost_limit=20)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10744580584354382, 'fraction_numerical': 0.01413760603204524, 'mean_word_length': 7.995762711864407, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '235766', 'license': 'MIT', 'n_tokens_mistral': 857, 'n_tokens_neox': 807, 'n_words': 122, 'path': 'data/notebooks/Lab/marxan_demo_Papua.ipynb', 'repo_name': 'tnc-css/marxan-cloud', 'size': '2142'}