Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
thornoe committed Mar 15, 2024
1 parent 9902743 commit f35877e
Show file tree
Hide file tree
Showing 18 changed files with 9,013 additions and 9,009 deletions.
2 changes: 2 additions & 0 deletions gis/lakes_CV.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,13 @@ def stepwise_selection(subset, dummies, data, dfDummies, years):
# DataFrame for storing accuracy scores by year and calculating weighted average
scores = pd.DataFrame(subset.count(), index=years, columns=["n"]).astype(int)
scores.loc["Total", "n"] = np.nan # row to calculate weighted average of scores
scores_all = scores.copy() # scores for all predictors including inferior ones

# DataFrame for storing ecological status by year and calculating weighted average
status = pd.DataFrame(subset.count(), index=subset.columns, columns=["n"])
status["Obs"] = (subset < 2.5).sum() / status["n"] # ecological status < good
status.loc["Total", "Obs"] = (status["Obs"] * status["n"]).sum() / status["n"].sum()
status_all = status.copy() # eco status for all predictors including inferior ones

while current_score == best_new_score:
names = [] # empty list for storing model names
Expand Down
62 changes: 31 additions & 31 deletions gis/output/all_cost.csv
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
,CWP,CWP,CWP
,coastal,lakes,streams
1990,1810.4036969978185,1168.8618346867954,1606.1265372632233
1991,1734.8500206840552,1198.5116038185013,1656.2001761852368
1992,1779.30229431117,1230.2776215166298,1690.4087794191037
1993,1817.7307138435729,1228.2056655265044,1698.7428653877673
1994,1885.8498237485892,1260.872193890056,1779.787710224958
1995,1866.6274433952535,1276.6616745824729,1814.5549402443544
1996,1899.443153839709,1270.9388915488983,1833.9797617359022
1997,1912.7818883411549,1261.2282360568436,1852.1467624124232
1998,1918.1705049834748,1267.97121805348,1880.0249332738026
1999,1903.3564347340957,1279.940074798907,1864.5751974196096
2000,1891.402451103487,1311.3504137681077,1850.382502338737
2001,1883.5469729895979,1332.2099845105406,1820.4368552932551
2002,1831.3082436283546,1320.7309353577843,1807.7764133475916
2003,1727.8390323753051,1300.6474792427146,1788.2184311311037
2004,1779.6845427146202,1335.2802152286868,1797.9218305638578
2005,1819.1615334729966,1317.9428132225587,1839.5600617151279
2006,1939.3522637163428,1340.1378872169078,1887.3846021748986
2007,1948.663962461828,1323.4162208998537,1926.9077303953907
2008,1992.016197750605,1285.9895418866015,1882.143474493213
2009,1954.130513791412,1214.5235658391596,1856.90253390791
2010,1866.1200084650518,1221.507558388577,1886.6091945389367
2011,1847.0591484711954,1225.9239034132672,1867.3428416031743
2012,1829.5186335138847,1282.7959011295889,1855.2970418941932
2013,1860.584226342725,1295.1485539655364,1856.7374805913896
2014,1884.7635814362334,1309.308852045022,1858.6710053821075
2015,2021.3695949438581,1370.3303611458566,1927.65989412021
2016,2042.6541149025418,1384.2684433112265,1938.1815124373095
2017,2180.1420535822567,1402.5657601890164,1976.0926698533926
2018,2264.8186514244812,1426.2313460060404,1977.624003536699
2019,2320.721014627751,1462.6833800929132,1993.4254608285273
2020,2533.274472235757,1511.2252228897435,2026.5148331584385
1990,1728.677556548168,1163.568366417468,1618.216681585708
1991,1707.8653548294103,1217.8646439122615,1656.1649989514028
1992,1729.06653469826,1268.0116595789013,1690.212851162083
1993,1743.6892032273634,1277.3687122915492,1691.7624283612738
1994,1816.4253057880335,1296.3452449880008,1771.0064254015197
1995,1878.9870113008767,1296.9359259415885,1803.2602490794188
1996,1889.1364981268543,1283.5202220772906,1824.1672336239942
1997,1862.023027095592,1220.8029573783524,1843.079930135958
1998,1863.300133513499,1248.1246290217828,1860.1826843989668
1999,1879.2533842963924,1251.9509065883394,1869.401174194814
2000,1844.9445611557417,1285.7325673011394,1856.6437590739904
2001,1874.8893222671372,1303.3865580925112,1835.4537410892235
2002,1884.3634218153977,1294.1541707004583,1806.0062619209207
2003,1873.4962843169592,1281.7313634453028,1786.6871943443184
2004,1937.9531866973402,1277.4950074131095,1758.2820430458319
2005,1868.1917126415228,1293.0162970155877,1785.2207491259046
2006,2066.65491017422,1262.665078899571,1825.8842690327297
2007,2070.7042717656072,1260.5250491887855,1862.688793154506
2008,2005.0831407385203,1272.8115687815352,1816.1084361304754
2009,2011.1769281659222,1192.5199296690614,1791.2110320782738
2010,1933.8917977737185,1188.3677716161912,1796.6246362087322
2011,1867.890891940023,1182.8940997159204,1776.7572751107311
2012,1873.6312956699758,1267.7126403287498,1771.9490455003458
2013,1851.3124283882596,1259.7530406000888,1776.0738089272973
2014,1837.1369860105558,1276.6294327082937,1805.5713044291554
2015,2042.0773768072945,1317.4793034658505,1884.0403762587541
2016,2145.527546381891,1323.5085193181555,1932.9190541535686
2017,2354.526981672647,1300.4351035044308,1953.4210018752838
2018,2485.260880319477,1324.8354829852144,1964.516820046765
2019,1783.5344911982572,1379.5525295053205,1936.785288888112
2020,2578.505840977929,1437.3766727522393,1960.3679101746748
Binary file modified gis/output/all_cost.pdf
Binary file not shown.
Binary file modified gis/output/all_eco_LessThanGood.xlsx
Binary file not shown.
Loading

0 comments on commit f35877e

Please sign in to comment.