Restructure of Merow analysis
timcdlucas opened this issue · comments
I can't remember if I explained this somewhere.
I decided it was easier to use LocalOccurrenceData
and LocalRaster
rather than defining new modules for these two data sets.
Part of that was that I couldn't get Bioclim from the Bioclim module to align with the occurrence data (see #7).
Furthermore we're going to be defining a few new modules for this analysis anyway.
MaxLike
, PointBiserialCorr
and Transform
.
Perhaps MaxLike
is the best one to include the code for in the paper.
Finally, with respect to the code, there the "plan" workflow in chunk merowworkflow
.
This is no evaluated as it doesn't work.
Then I was trying to bring the workflow in merowWorkingCopy
up to date with the plan.
This chunk is evaluated.
Hope that all makes sense!
Cool, thanks Tim.
I was avoiding doing the maxlike module in the paper because I actually had to rewrite the model from scratch (annoyingly the package only handles raster/coordinate data and does it all in one big function), so it's a pretty long module.
Will have a look at tjose data tomorrow and see what's up and what the best compromise is.
I also realise I never pushed the maxlike module to the repo. Will do that too.
After a lot of digging around, I managed to work out the coordinate reference system for these data.
The lat/longs are a red herring. They use those as covariates so they've been centred and scaled against something. The X and Y give projected coordinates (in metres). Through a lot of trial and error and googling possible coordinate systems, I stumbled upon this metadata for a derivative data version
which implies this proj4 code: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs
(A version of the Albers Equal Area projection, with datum near the southernmost point of Texas)
Setting that as the initial CRS, and converting into lat/longs gives us something that lines up with the USA. Phew.
I'll work that into the module code for these data and upload - I'd rather have all modules for the paper, it's more zoony.
Thanks! I'm so glad I don't have to deal with this again.
fixed, as in #7