Building a crypto weed app: Part 9 - Streamlining weed price data collection
Like most development projects, after weeks of delays, it feels like just one more week away from release.
recap
Part 1 - Working Anonymously (first paid post, WIP)
Part 2 - Barebones API: Set up a bare bones Rails server
Part 3 - Going Live: Deploy site to Herkou
Part 4 - Pretty Things: Make site look good and SEO optimized
Part 5 - But Really, How Much: Prices in specific locations
Part 6 - Is Augur the best oracle for cluutch: Crypto oracle comparison
Part 7 - To mTurk, or not to mTurk: Assessing options for crowdsourcing prices
Part 8 - Getting stuck with Augur: Learned a lot, but…
By the end of this week’s post, I was hoping to have an end-to-end implementation that included:
mTurk used to collect weed prices on cluutch.io
price collections occurs at least three times per week
an endpoint that calculates daily price by location
an Augur market that uses the above endpoint for the resolution of weed prices
Unfortunately the boring Rails work to update the weed price input form took the entire week to complete. In fact, there are still two more features that aren’t quite done yet.
user stories
Writing user stories is like writing tests. They might be annoying to finish but the world is always a better place when you have gone through the motions. I’m entering this week pretty confident that I have eliminated most unknowns. This week I will focus on output and enumerate the user stories needed to get to a MVP.
To not waste words, links to the Github issues corresponding to each story have been provided. There, you can find the PRs with more details about how each was solved. The numbers correspond to the order which we are tackling them.
data entry
(1) As someone who records weed prices on cluutch, I should be able to follow a link to a quote form that is prefilled with all necessary information except for the price, so that it doesn’t take so long. [Completed: Github]
(2) As someone who records weed prices on cluutch, I should be able to fill out a single form with nine price fields corresponding to nine different US websites, so that I don’t have to click around a lot and get confused. [Completed: Github]
(6) As someone who records weed prices on cluutch, I should only be allowed to submit my form if my request includes a one-time-use token, so that I can accurately be paid for my work. [In progress: Github]
(7) As a cluutch admin, I should be able to pregenerate many one-time-use tokens, so that they can be uploaded to crowdsourcing services like mTurk. [In progress: Github]
And here is a Figma mock up of what it should look like when its done.
Through tests with my friends and mTurk, Trulieve has proven to be very difficult to work with. Its not possible to link to the Pensacola location and navigation appears to behave differently for different people. Instead, Curaleaf St Petersburg will be used from the backup list.
api improvements
(3) As a cluutch API consumer, I should get the average weed price by day when I send a request to /v2/daily, so that I don’t have to compute averages client side. [Completed: Github]
(4) As a cluutch API consumer, I should receive the price of weed on the day closest to the queried date — without going over when I query /v2/daily, so that a consistent and valid response can always be expected. [Completed: Github]
(5) As a cluutch API consumer, I should optionally be able to group daily prices by jurisdiction, so that I can have a more granular understanding of prices. [Completed: Github]
data improvements
One small change I’m making to the dataset is to stop using Truleaf for Florida prices. There has been a lot of confusion with it during mTurk and the few times I have had a friend try. Truleaf won’t let you link directly to a specific store. It also has really weird and inconsistent navigation. Will use a second Curaleaf listing instead.
next steps
I was really disappointed not to finish with the webapp sooner. The last pieces to finish are the authorization of form submission and operational work to connect the authorization codes generated by the app to mTurk.
Once that is done, it should just be a few clicks to generate the actual market. I will try to finish the app stuff before Wednesday next week so that I can have some sample data with the new process before opening the market on Augur.