Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2016 Land Use Data for Model #6

Open
nickrsan opened this issue May 16, 2017 · 5 comments
Open

2016 Land Use Data for Model #6

nickrsan opened this issue May 16, 2017 · 5 comments
Assignees

Comments

@nickrsan
Copy link
Member

@josue-medellin @andybell This thread is for reproducing the land use data for DWR. After spending a while wondering just what units DWR was using, I realized how to reproduce their land use units. Using the modified 2015 data Quinn published, I'm able to reproduce his values per DAU/County to within a reasonable margin (eg: Morrie's copy has 6779 acres of alfalfa, and the data I generated has 6787 acres) for all land use types except Riparian and Wet Herbaceous. However, the total of those two in the copy sent by Morrie and the data I generated comes out very close. I suspect that maybe the data Morrie had was generated with older land use info, but haven't investigated yet.

Currently, I'm planning to produce the 2016 data with this method, but won't send it unless you two agree this is sufficient. I can also investigate the sources of error before sending, but suspect most of the variation except the Riparian/Wet Herbaceous issue is due to methodology differences between Quinn's summary and min.

@nickrsan nickrsan self-assigned this May 16, 2017
@josue-medellin
Copy link

josue-medellin commented May 17, 2017 via email

@nickrsan
Copy link
Member Author

OK, here's the summary table, Andy, once we discuss tomorrow, I'll send it to Morrie. 2016_land_use_summary.xlsx

@andybell
Copy link
Collaborator

Looks good to me. Not sure when the initial area totals were calculated but it seems plausible that the totals were from the initial release of the LandIQ 2015 data which would result in slight discrepancies.

@nickrsan
Copy link
Member Author

OK, new info:

I'm attaching a new version of the spreadsheet - the data hasn't changed, but I've included a new sheet that shows a comparison of the values for the 2015 data between the method used last year and the method I used this year on the 2016 data. I included percent errors, which are quite small, with two caveats:

  • Land uses with very few acres have higher errors, which makes sense - more subject to edge effects in the analysis
  • Wet Herbaceous and Riparian are very far off, but when you sum them together and compare (see last line in sheet), they have very low errors. I'm using Quinn's latest land use file from last year, and I suspect that it had different assignments for those categories than what was used in the model, but I haven't verified by checking an earlier version.

2016_land_use_summary.xlsx

As for the methodology, I used Polygon to Raster in ArcGIS to convert the 2015 land use data to raster, using the 2016 land use data Andy produced as the snap raster. I then used Tabulate Area to get the values, exported the table to Excel and added the crop categories and Pivot Table.

@andybell
Copy link
Collaborator

@nickrsan I ran the following query in postgis to get the level 2 area in sq meters per crop.

create or replace view level_2_ct_wy2016 as 
select * from crosstab(
    'select level_2,dauco,sum(sum)::integer from calsimetaw.dau_landuse_wy2016 group by 1,2 order by 1,2',
    'select distinct dauco from calsimetaw.dau_landuse_wy2016 order by 1'
) as ( 
    level_2 text,
    "DAUCo18501GA" integer,
    "DAUCo18507GA" integer,
    "DAUCo18539GA" integer,
    "DAUCo18634GA" integer,
    "DAUCo18648GA" integer,
    "DAUCo18657GA" integer
);

I'm getting slightly different numbers than the values calculated in ArcGIS. There are a few new crop categories in 2016 that are missing from the spreadsheet (Asparagus, Carrots, Eucalyptus, etc).

level_2_ct_2016_comparison_TabArea.xlsx

@andybell andybell reopened this May 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants