Using IUCN-Data, ArcMap 9.3 in addition to R to Map Species Diversity

0
10

..I’m overwhelmed past times the ever-growing loads of information that’s made available via the web. I.e., IUCN collects together with hosts spatial species information which is gratis for download. I’m itching to play amongst all this data… And, inward the destination at that topographic point may arise unopen to valuable outcome:

In the below examples I made a map for amphibian species richness – without much effort. I used a 5×5 km grid (constant areas, provided past times Statistik Austria) together with amphibian species ranges together with intersected this information to yield species numbers per grid-cell. For aggregation of the tables from the polygons produced past times the intersection I needed to switch from ArcMap to R because ESRI’s “Summary Statistics” entirely encompass MIN, MAX, MEAN, FIRST/LAST… together with at that topographic point is no slow means to apply custom functions. So, I merely accessed the dbf that I wanted to aggregate amongst R together with did the calculations there.. thus reloaded the layer inward ArcMap together with was done..

Workflow-documentation:

(1) add together downloaded data:

kickoff add together “L005000_LB.shp” (5000 1000 grid, zip-folder: l005000_lb.zip), this volition brand arcmap to pick out this shp’s GCS equally custom,
which is “MGI”.

thus add together “SPECIES1109_DBO_VIEW_AMPHIBIANS” (distribution ranges equally polygons for each species, multipart, inward illustration a species’ areal is fragmented, zipped gdb-folder: ALL_AMPHIBIANS_Oct2010.zip).

when the alert nearly the GCS pops up, pick out transformation from “GCS_WGS_1984” to “GCS_MGI”
using “MGI_to_WGS1984_3”.

(2) intersect the two:

input featuters are “L005000_LB.shp” & “SPECIES1109_DBO_VIEW_AMPHIBIANS”,
the resulting shp volition hold upwards called “Amph_Sp_R5000_inters.shp”.

pick out the grid first, because this is used to defines the GCS for the output,
which nosotros desire to hold upwards “MGI”!

the grid quadrats are intersect amongst all species’ polygons at a time, producing several “pieces”
of on grid cell, ofttimes to a greater extent than than 1 for a given species..
examine this past times going to the attribute tabular array together with sorting past times FID_L00500.

this is because ArcMap patently intersects the to features at once, rather than 1 species
polygon later unopen to other – this would yield entirely 1 intersection per gridcell together with species..

so, to eventually larn species numbers nosotros take to calculate unique species values per gridcell.
ArcMap’s Summary Statistics render a express laid of functions: SUM, MEAN, MAX, MIN, COUNT, FIRST, LAST
but nosotros take no. of unique values –

we’ll switch to R, together with R volition easily practise this:

# for dbf import you'll need: require(foreign)  # read data, take heed to alter to your download-path: dat <- read.dbf("C:\\Gis_Daten\\Amphibians\\Amph_Sp_R5000_inters.dbf")  # depository fiscal establishment gibe data: str(dat)  # "FID_L00500" holds the identifier for each gridcell # "BINOMIAL" holds the names of species # the intersection produced polygons for each gridcell together with species.. # so, aggregating    # gear upwards custom business office that calculates no. of unique values: x <- c(1,1,2,3,3,3,4) n.unique <- function(x) {length(unique(x))} n.unique(x)  # the next chip volition give the species no. per gridcell: grid.no.sp <- aggregate(BINOMIAL   FID_L00500, FUN = n.unique, information = dat)  # alter column lift "BINOMIAL" to "Sp.No.": names(grid.no.sp)[2] <- "Sp.No."  # add together ID column together with re-order columns: grid.no.sp$OID <- row.names(grid.no.sp) grid.no.sp <- grid.no.sp[, c(3,1,2)]  # write file: write.csv(grid.no.sp, file = "C:\\Gis_Daten\\Amphibians\\grid.no.sp.CSV",           row.names = FALSE) 

(3) bring together this CSV to your grid shp-file together with your done! (!) i noticed that ArcMap ofttimes makes problem when trying to usage txt or csv files for joins & relates. if yous sense the same: skip the write.csv() together with alternatively add together the below lines to your R script: (you'll take to take the grid-layer from your ArcMap Session, otherwise it may non hold upwards writeable..)

# doing the bring together inward R: grid <- read.dbf("C:\\Gis_Daten\\Raster_Österr\\l005000_lb\\l005000_LB.dbf") str(grid)  # convey into same gild earlier joining:  grid <- grid[order(as.character(grid$NAME)), ] grid.no.sp <- grid.no.sp[order(as.character(grid.no.sp$NAME)), ]  # bring together & depository fiscal establishment gibe if they are properly aligned: print(join <- data.frame(grid, grid.no.sp)) str(join)  write.dbf(join, file = "C:\\Gis_Daten\\Raster_Österr\\l005000_lb\\l005000_LB.dbf") 

(4) thus add together the grid-file 1 time to a greater extent than together with depository fiscal establishment gibe the attribute tabular array - sp.no. should hold upwards there. apply symbology together with you're done!!

Note: Data is courtesy of STATISTIK AUSTRIA together with IUCN
Sumber http://thebiobucket.blogspot.com