private static void MapSpatialUnits(Sitplugin sitplugin, JToken mappingConfig)
        {
            if (!Enum.TryParse((string)mappingConfig["mapping_mode"], out SpatialUnitClassifierMode mode))
            {
                throw new ArgumentException("expected one of the SpatialUnitClassifierMode enum values");
            }
            switch (mode)
            {
            case SpatialUnitClassifierMode.JoinedAdminEcoClassifier:
                sitplugin.SetSPUMapping((string)mappingConfig["spu_classifier"]);
                foreach (var item in mappingConfig["spu_mapping"])
                {
                    sitplugin.MapSpatialUnit(
                        (string)item["user_spatial_unit"],
                        (string)item["default_spatial_unit"]["admin_boundary"],
                        (string)item["default_spatial_unit"]["eco_boundary"]);
                }
                break;

            case SpatialUnitClassifierMode.SeperateAdminEcoClassifiers:
                sitplugin.SetAdminEcoMapping(
                    (string)mappingConfig["admin_classifier"],
                    (string)mappingConfig["eco_classifier"]);
                if (mappingConfig["admin_mapping"] != null)
                {
                    foreach (var item in mappingConfig["admin_mapping"])
                    {
                        sitplugin.MapAdminBoundary(
                            (string)item["user_admin_boundary"],
                            (string)item["default_admin_boundary"]);
                    }
                }
                if (mappingConfig["eco_mapping"] != null)
                {
                    foreach (var item in mappingConfig["eco_mapping"])
                    {
                        sitplugin.MapEcoBoundary(
                            (string)item["user_eco_boundary"],
                            (string)item["default_eco_boundary"]);
                    }
                }
                break;

            case SpatialUnitClassifierMode.SingleDefaultSpatialUnit:
                sitplugin.SetSingleSpatialUnit((int)mappingConfig["default_spuid"]);
                break;
            }
        }
        /// <summary>
        /// Import an SIT formatted dataset.
        /// mdb, accdb, xls, or xlsx are supported
        /// </summary>
        private static void Method1()
        {
            string excelPath   = @"C:\Program Files (x86)\Operational-Scale CBM-CFS3\Tutorials\Tutorial 6\Tutorial6.xls";
            string projectPath = @"C:\Program Files (x86)\Operational-Scale CBM-CFS3\Projects\tutorial6\tutorial6.mdb";

            var data = Sitplugin.ParseSITData(
                path: excelPath,
                AgeClassTableName: "AgeClasses$",
                ClassifiersTableName: "Classifiers$",
                DisturbanceEventsTableName: "DistEvents$",
                DisturbanceTypesTableName: "DistType$",
                InventoryTableName: "Inventory$",
                TransitionRulesTableName: "Transitions$",
                YieldTableName: "Growth$");

            Sitplugin sitplugin = new Sitplugin(
                outputPath: projectPath,
                initializeMapping: false,
                dataset: data);

            sitplugin.SetSingleSpatialUnit(42);
            //see archive index tblSPUDefault/tblAdminBoundaryDefault/tblEcoBoundaryDefault for code definitions

            sitplugin.SetSpeciesClassifier("Species");//the classifier name as defined in the spreadsheet
            sitplugin.SetNonForestClassifier("Forest type");

            // in the following mappings, the left value is something that appears in the import data,
            // and the right value is something that appears in the archive index database.
            sitplugin.MapSpecies("Hispaniolan pine", "Pine");
            sitplugin.MapSpecies("Nonforest", "Not stocked");
            sitplugin.MapSpecies("Improved pine stock", "Pine");

            sitplugin.MapNonForest("Afforestation", "Gleysolic");
            sitplugin.MapNonForest("Natural forest", Sitplugin.ForestOnly);
            sitplugin.MapNonForest("Control", Sitplugin.ForestOnly);

            sitplugin.MapDisturbanceType("Fire", "Wildfire");
            sitplugin.MapDisturbanceType("Firewood collection", "Firewood Collection - post logging");
            sitplugin.MapDisturbanceType("Clearcut", "Clear-cut with slash-burn");
            sitplugin.MapDisturbanceType("Afforestation", "Afforestation");
            sitplugin.MapDisturbanceType("Hurricane", "Generic 50% mortality");


            sitplugin.Import();
        }