Making a Bezier Spline, and Updates
It’s been awhile since I’ve written a blog entry here, and when I say awhile, I mean almost two months. There are a few reasons for this absence:
These past two months have been full of wins and challenges preparing for life after graduation. My senior quote is by Audre Lorde: “I am my best work - a series of road maps, reports, recipes, doodles and prayers from the front lines.”.
GIS and ERA I’ve been collaborating with Nhamo Mtetewa on furthering the GIS side of things and finally converting geoTIFF files to geoJSON in a convenient way once and for all. In his day job Nhamp is a Data Science Engineering Manager at Barclays Bank, and but on his own time he recently began collaborating in various initiatives of Xalgorithims Foundation.
Nhamo showed me how to accomplish the data conversion through a python library, Rasterio. https://rasterio.readthedocs.io/en/latest/intro.html With the contining help of Ted Kim, our next plans are to run the files through his script [which does what?], and go from there. More about this and its importance will be in a separate blog.
I’ve been working on a mock-up of Joseph's 'Earth Reserve Index Policy Curve' in a Jupyter Notebook! I’m pretty excited about this because, although in practise it's as mundane as plotting points, it's a signal to me that my familiarity with this platform has improved since my last blog. Xalgorithms Foundation has a work culture that balances doing what are you already good at, with what would you like an opportunity to learn your way into. While makng my first Jupyer Notebook the hardest part was figuring out how to insert my own data and create data frames properly, but I did it. Now I have a couple graphs, albeit I am still working and toggling with them.
A bit of background
Okay so now I’ll try to relate what this Earth Reserve Policy Curve means. At Xalgorithims, I focus on the Earth Reserve Assurance Framework, and this curve is just one component.
Based on Joseph's description, this method is used to simulaneously transcribe multiple indicator values, each in its original units of measure, into a common index. This is done with a [-100]——[+100] scale, where the [-100] is the worst scenario to be avoided for each indicator, and [+100] is the optimal feasible scenario to be pursued, for each indicator.
This is done with a because
The “Bézier Spline” (named after its designer, Renault engineer Pierre Bézier) is a useful way to draw continuous curves by using a few simple equations. It provides a convenient way to adjust all aspects of slope and curvature by placing two endpoints and control points. Here is an accessible intro to "splines" https://www.drububu.com/animation/beziercurves/index.html Potentially any shape of curve could be used, but the policy intent of the shape we want for the Earth Reserve Index is that it should extend asymptotically the closer any component indicator gets to a worst case scenario level, creating a disincentive by accelerating the closer an indicator level gets to some declared worse case scenario, never reaching [-100]. That creates a gradual but impassable deterrence. And it should curve gently in the other direction the closer any component indicator gets to its best feasible scenario, to incentivize innovation to reach [+100]. The shape also is sloped in the middle to provide a moderate incentive. The precise shape of this curve would be updated over time, and this is which Joseph called it the Earth Reserve Policy Curve.
Where is this leading? The “Earth Reserve Assurance (ERA) is a framework for the determination of monetary value and quantity in a multi-currency system with no central reference unit of account.”
[THIS PART TO BE REVISED...] Part of the framework operates by assigning each physical area of the earth a value that can be used to determine its deposit receipt amount. A geographical area’s value is determined by its amount of water, minerals, topsoil, metals, species populations, etc. available. The value of these areas can then be reflected in their ERA Deposit Receipts that are bought by investors looking to build new projects and improve ecosystem integrity.
Changes in the value of these areas is indexed by looking at geographical distribution of resources (soil temperature, vegetation, topsoil, minerals, metals, etc.) and weighting that by currency-of-transaction data. This index is reflected in a Bezier Curve. The curve has two endpoints and two shaping vectors that disincentivize reaching an investors worst case-scenario, and incentivising reaching the middle, an ‘impassable deterrence’. The Bezier Spline
Figure 1. Indicators are aligned to the graph. Currency is determined by changes in distribution of these indicators between a set period of time and then weighted by currency-of-transaction data in that period.
Below you can see a curve. The numbers on the Y-axis are representative of the Resource & Ecosystem Degradation Index, and the X-axis is a Percentage Each Indicator Has Changed from Base Year Level to Worst/Best Case Scenario. You can toggle zoom in and out to certain values on the index and x axis to see the values close up. On the next plot you can see the percentage indicators moving as one cohesive point across the graph over the degradation index with the ability to slide the point over different percentages. This is helpful to see the shape of the curve over time.
Things I am still working on
There needs to be a way for readers to choose the endpoints on the graph, like a continuous curve. I am currently using plotly, and still trying to figure out how to add an equation to plot rather than just a table. If users can’t choose the endpoints, I would at least like to add a scale that can be toggled. I would also like them to be able to zoom and out of the graph just like the ones you see above.
The plots are important not only for visualizing the degradation index but also for my own learning and understanding. I do feel like my familiarity with python has gotten better these past couple months and I am interested in continuing to make plots, and find new ways to toggle and tweak them and improve their interactivity.