Commit bb8897a1 authored by roelo008's avatar roelo008
Browse files

Lots of new stuff and housekeeping

parent 7e36f4fd
""""
ideeen over data management voor DOREN project
class: EVA
init: alle eva headers
att: requirement 1
att: requirement 2
att: processing log
att: nr of plots
method: rename cols
method: enforce requirement(req_x)
method: enforce requirements(**reqs)
method: add col
method: print processing log
method: generate table of species inventories
method: print EVA to file(txt, csv, shp, pkl)
method: add raster covariable(cov_name)
"""
eva = do.Eva()
eva.basic_prep()
eva.add_col()
eva.apply_requirements(eva.req1, eva.req2, eva.req4)
eva.add_cov("soil")
eva.add_cov("temp")
eva.add_cov("precip")
eva.add_ndep("POSCH")
eva.to_file('shp')
eva.to_file('csv')
eva.print_log()
species = eva.yield_species()
species.to_file('shp')
species.to_file('csv')
from utils import doren_classes as dc
doren = dc.Doren(header_src=r'c:\Users\roelo008\OneDrive - WageningenUR\a_projects\DOREN\a_brondata\EVA\EVA_Doren_header.csv',
sp_src=r'c:\Users\roelo008\OneDrive - WageningenUR\a_projects\DOREN\a_brondata\EVA\EVA_Doren_species.csv',
verbose=True)
doren.initiate(sample=False)
sp_src=r'c:\Users\roelo008\OneDrive - WageningenUR\a_projects\DOREN\a_brondata\EVA\EVA_Doren_species.csv')
doren.initiate()
doren.apply_requirements('req1', 'req2', 'req3', 'req4', 'req8', 'req9', 'req10',
aoi_src=r'c:\Users\roelo008\OneDrive - WageningenUR\a_projects\DOREN\geodata\eva_aoi_fin_3035.shp',
dem_src=r'c:\Users\roelo008\OneDrive - WageningenUR\a_projects\DOREN\a_brondata\covariables\DEM\DTM_3035.tif')
doren.add_posch(posch_src_dir=r'c:\Users\roelo008\OneDrive - WageningenUR\a_projects\DOREN\a_brondata\POSCH_dep\v2')
doren.add_covar(covar_dir=r'c:\Users\roelo008\OneDrive - WageningenUR\a_projects\DOREN\a_brondata\covariables\soil\b_processed',
covar_src='WRBLEV1_laea.tif', covar_name='soil_type', nominal=True)
doren.add_covar(covar_dir=r'c:\Users\roelo008\OneDrive - WageningenUR\a_projects\DOREN\a_brondata\covariables\DEM',
covar_src='DTM_3035.tif', covar_name='elevation')
doren.add_covar(covar_dir=r'c:\Users\roelo008\OneDrive - WageningenUR\b_geodata\eur_cntrs_3035',
covar_src='esri_eur_cntrs_3035.shp', covar_name='country', raster=False, column='CNTRYNAME')
covar_src='esri_eur_cntrs_3035.shp', covar_name='country', raster=False, column='CNTRYNAME',
keep_all=True)
doren.add_yearly_covar(covar_dir=r'c:\Users\roelo008\OneDrive - WageningenUR\a_projects\DOREN\a_brondata\covariables\EObs\2_compiled',
covar_src_basename="EObs_v200e_rr_5yrmean", covar_name='5_yearly_precip')
doren.add_yearly_covar(covar_dir=r'c:\Users\roelo008\OneDrive - WageningenUR\a_projects\DOREN\a_brondata\covariables\EObs\2_compiled',
covar_src_basename="EObs_v200e_tg_5yrmean", covar_name='5_yearly_temp')
doren.filter_by_buffer(species_name='Calluna vulgaris', buffer_size=50000)
doren.write_stuff('buffer_png')
doren.write_stuff('headers_PG')
doren.select_plts_w_species(species_name='Empetrum nigrum')
doren.filter_by_buffer_around_positive_plots(buffer_size=100000)
doren.write_stuff('species_PG')
doren.write_stuff('NDep_PG', covars=True)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Empetrum nigrum", buffer_size=10000)
doren.write_stuff('NDep_PG', covars=True)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Empetrum nigrum", buffer_size=25000)
doren.write_stuff('NDep_PG')
doren.write_stuff('NDep_PG', covars=True)
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Empetrum nigrum", buffer_size=50000)
doren.write_stuff('NDep_PG')
doren.write_stuff('NDep_PG', covars=True)
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Empetrum nigrum", buffer_size=100000)
doren.write_stuff('NDep_PG')
doren.write_stuff('NDep_PG', covars=True)
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Calluna vulgaris", buffer_size=5000)
doren.write_stuff('species_PG')
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Calluna vulgaris", buffer_size=10000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Calluna vulgaris", buffer_size=25000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Calluna vulgaris", buffer_size=50000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Calluna vulgaris", buffer_size=100000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Anemone nemorosa", buffer_size=5000)
doren.write_stuff('species_PG')
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Anemone nemorosa", buffer_size=10000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Anemone nemorosa", buffer_size=25000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Anemone nemorosa", buffer_size=50000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Anemone nemorosa", buffer_size=100000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Briza media", buffer_size=5000)
doren.write_stuff('species_PG')
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Briza media", buffer_size=10000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Briza media", buffer_size=25000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Briza media", buffer_size=50000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Briza media", buffer_size=100000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Vaccinium oxycoccos", buffer_size=5000)
doren.write_stuff('species_PG')
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Vaccinium oxycoccos", buffer_size=10000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Vaccinium oxycoccos", buffer_size=25000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Vaccinium oxycoccos", buffer_size=50000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Vaccinium oxycoccos", buffer_size=100000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Drosera rotundifolia", buffer_size=5000)
doren.write_stuff('species_PG')
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Drosera rotundifolia", buffer_size=10000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Drosera rotundifolia", buffer_size=25000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Drosera rotundifolia", buffer_size=50000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Drosera rotundifolia", buffer_size=100000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Puccinellia fasciculata", buffer_size=5000)
doren.write_stuff('species_PG')
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Puccinellia fasciculata", buffer_size=10000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Puccinellia fasciculata", buffer_size=25000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Puccinellia fasciculata", buffer_size=50000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Puccinellia fasciculata", buffer_size=100000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Centaurium pulchellum", buffer_size=5000)
doren.write_stuff('species_PG')
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Centaurium pulchellum", buffer_size=10000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Centaurium pulchellum", buffer_size=25000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Centaurium pulchellum", buffer_size=50000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Centaurium pulchellum", buffer_size=100000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Calamagrostis epigejos", buffer_size=5000)
doren.write_stuff('species_PG')
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Calamagrostis epigejos", buffer_size=10000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Calamagrostis epigejos", buffer_size=25000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Calamagrostis epigejos", buffer_size=50000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Calamagrostis epigejos", buffer_size=100000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name='Rumex acetosa', buffer_size=25000)
doren.write_stuff('buffer_png')
doren.write_stuff('headers_PG')
doren.filter_by_buffer(species_name="Gentiana cruciata", buffer_size=5000)
doren.write_stuff('species_PG')
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Gentiana cruciata", buffer_size=10000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Gentiana cruciata", buffer_size=25000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Gentiana cruciata", buffer_size=50000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.filter_by_buffer(species_name="Gentiana cruciata", buffer_size=100000)
doren.write_stuff('NDep_PG')
doren.write_stuff("buffer_png")
doren.write_stuff('species_list')
doren.write_stuff('report')
......@@ -45,19 +45,6 @@ def eva_colnames_new():
'latitude', 'location_uncertainty_m', 'dataset']
def eva_colnames_drop():
"""
:return: list of improved colnames from EVA database which can be dropped
"""
return ['slope_deg', 'cover_total_perc', 'cover_tree_layer_perc',
'cover_shrub_layer_perc', 'cover_herb_layer_perc', 'cover_moss_layer_perc', 'cover_lichen_layer_perc',
'cover_algae_layer_perc', 'cover_litter_layer_perc', 'cover_open_water_perc', 'cover_bare_rock_perc',
'height_highest_trees_m', 'height_lowest_trees_m', 'height_highest_shrubs_m', 'height_lowest_shrubs_m',
'avg_height_high_herbs_cm', 'avg_height_lowest_herbs_cm', 'maximum_height_herbs_cm',
'maximum_height_cryptogams_mm', 'mosses_identified_bool', 'lichens_identified_bool', 'remarks',
'locality', 'dataset', 'name_association', 'name_alliance']
def get_aoi(*src):
"""
Read an aoi shapefile from source, return as single ply after dissolving. If no arguments provided, return whole
......
This diff is collapsed.
"""
Class containing several output methods for DOREN objects
"""
import doren_classes as dc
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment