Closed astrographer closed 6 years ago
If you know the name of the raster, you can do this in the developer console right now:
Float32Dataset.average(world.displacement) - world.SEALEVEL
world.displacement
stores altitude in meters relative to some arbitrary datum level
Float32Dataset.average()
finds the average value across a raster
world.SEALEVEL
is the sealevel relative to some arbitrary datum level, so taking displacement minus sea level will give you elevation in meters above sealevel.
Most browser consoles have some sort of autocomplete, so you can see a full list of functions provided by the Float32Dataset
namespace, not to mention a full list of rasters provided by world
.
For a while now I've wanted to implement better ways to view data in a nonspatial way: histograms, time series charts, min/max/average statistics, etc. Never got to it because there was no demand and I had other ways to do it, so I'll prioritize this.
I've implemented a chart display with statistics on an experimental branch. I didn't implement mode because it wound up not making a lot of sense for floating point numbers. I'm hoping to move this to prod later this evening.
You mention having an "export" functionality. What sort of export do you have in mind? I'm picturing a csv with columns for lat, long, the currently displayed field, and any other major attributes that are relevant to the user, namely elevation, temperature, precip, and npp. There are other things we could include and it wouldn't be hard to add them, but I'm not sure how useful they'll be to the user - things like plate id, crust age, density, thickness, sima/sial fraction, etc.
There can be a single button for export functionality. We can leverage this for other export functionality - the 3d object export ( issue #4, which I still have yet to get to :\ ) comes to mind. I also think it'd be really cool to export to video game world files, but unless I get help this is really far future stuff (elder scrolls .esp files, KSP mods, minecraft save games, dwarf fortress worlds, etc.)
Charts now out in prod. Should be visible on any non-satellite based display
Generally looking pretty darn good. I'm assuming horizontal axis is value and vertical axis is count. As to export… your csv sounds good. What I would love to see would be a full float(32-bit) export to Virtual Terrains .bt, .hf2/hfz, or geotiff. That might not be well-received by the wider audience, but for gis dweebs like me, it would be a godsend! PlateID would definitely be useful.
Game files might be of pretty limited value, except for things like KSP or flight simulator-type apps. The scale is just too small, I think.
Now that I'm seeing the raw elevation values, I understand why the altitude-based aspect of temperature generation is failing so badly. But that's a whole other issue…
It also might be nice to have the option to limit stats and charting to land areas. Perhaps when the ocean is displayed, stats and charts are created based on land area; when the ocean is hidden, stats and charts cover the full surface.
I'm going to refocus priority on this issue now that #18 is in test. I figure this one is so close to done anyways.
Remaining work to close out the story:
A separate issue will be created for geospatial export formats, #26.
I've implemented a rudimentary csv export and filter based on ocean visibility. Columns for precip, temp, npp etc should be added to the csv after work on #9. Issue #9 will be my next focus.
Going to call it done, if there's no objections
I've been having trouble reconnecting the temperature model to altitude. I'm thinking this might be due to some problems with the values coming out of the altitude model itself. To test this, if it's not possible to export higher-order rasters(16-bit integer with at least min and max recorded, or optimally 32-bit floats…😌), it would be a real boon to have access to minimum, maximum, mean, median, possibly mode, and standard deviation to somewhere accessible(console output, a log record, an exported text file, or just as temporary text labels on the screen). This could perhaps be toggled at startup with a "univar" flag in the url…
I'm thinking of this mainly for altitude, but I'm sure it would be useful for precipitation, temperature, biomass or any other quantitative values(again, toggled perhaps by "alt.univar," "prec.univar," etc.
My preference would simply be an onscreen button menu to export a text file with the univariate stats for the selected parameter, but I'm flexible and overjoyed if you just decide to add this.
Thank you, Colin