This repository provides a comprehensive SAS Viya pipeline for agricultural parcel analysis, crop prediction, and compliance analytics. The solution automates data cleaning, feature engineering, binary and multi-class crop modeling, and delivers ready-to-use tables for advanced reporting and SAS Visual Analytics dashboards.
-
01_data_cleaning_and_categorization.sas
Cleans raw parcel data, handles Turkish characters, and performs initial NVDI and compliance checks. Outputs:final_promoted -
02_urunler_analysis_and_filtering.sas
Analyzes and cleans product declarations, categorizes fallow land, and prepares product frequency tables. Outputs:parcel_analysis_promoted,product_frequency_promoted,analysis_summary_promoted -
03_product_categorization.sas
Categorizes parcels by crop type and economic value, creates model-ready features. Outputs:parcel_model_ready_promoted,category_model_summary_promoted -
04_unregistered_parcels_analysis.sas
Isolates CKS-unregistered parcels for scoring. Output:unregistered_parcels_promoted -
05_unregistered_product_categorization.sas
Adds model-compatible features to unregistered parcels. Outputs:unreg_model_ready,unreg_summary -
Model Studio (Binary Classification)
Trains a model to detect production on unregistered parcels.- Training:
parcel_model_ready_promoted - Scoring:
unreg_model_ready - Output:
unreg_table_scored
- Training:
-
analysis/scored_table_analysis.sas
Analyzes binary model results, risk categories, and prepares scoring outputs. Outputs:scoring_analysis_promoted,mahalle_analysis_promoted,risk_categories_promoted -
isolate_44k.sas
Isolates ~44K parcels predicted to have production and prepares crop prediction training data. Outputs:suspected_44k_promoted,crop_training_data_promoted -
Model Studio (Crop Prediction)
Trains a multi-class model to predict specific crop types.- Training:
crop_training_data_promoted(target:crop_target) - Scoring:
suspected_44k_promoted - Output:
predicted_44k_products_final
- Training:
-
analysis/crop_prediction_analysis.sas
Analyzes crop prediction results, creates summary and neighborhood-level tables. Outputs:crop_analysis_promoted,category_summary_promoted,mahalle_crop_promoted
- final_promoted: Cleaned, feature-rich master parcel table
- parcel_analysis_promoted: CKS-registered parcel details and product analysis
- category_model_summary_promoted: Crop category summary statistics
- scoring_analysis_promoted: Binary model scoring results for unregistered parcels
- mahalle_analysis_promoted: Neighborhood-level risk and production analysis
- risk_categories_promoted: Risk level summaries for dashboarding
- product_frequency_promoted: Product frequency and area analysis
- analysis_summary_promoted: General summary statistics
- parcel_model_ready_promoted: Model-ready CKS-registered parcels
- unreg_model_ready: Model-ready CKS-unregistered parcels
- unreg_summary: Summary for unregistered parcels
- crop_analysis_promoted: Parcel-level crop prediction results (specific crop names)
- category_summary_promoted: Crop frequency and area summaries (for VA frequency charts)
- mahalle_crop_promoted: Neighborhood-level dominant crop analysis
All promoted tables are available in the casuser library and are ready for direct use in SAS Visual Analytics. Recommended visualizations include:
- Bar charts and pie charts for crop frequency (
category_summary_promoted) - Bubble plots for crop frequency vs. area vs. confidence
- List tables for detailed parcel or product analysis
- Geographic maps using
mahalleand crop predictions