quantified-uncertainty / metaforecast

Fetch forecasts from prediction markets/forecasting platforms to make them searchable. Integrate these forecasts into other services.
https://metaforecast.org/
MIT License
56 stars 5 forks source link

Question pages and charts #74

Closed berekuk closed 2 years ago

berekuk commented 2 years ago

Since I had to merge #71 urgently, this is a new PR for finishing question pages and implementing history/charts.

I'll merge the code from #63 into this branch too.

Also, suggestions on a question page layout are very welcome!

vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
metaforecast ✅ Ready (Inspect) Visit Preview May 9, 2022 at 2:27PM (UTC)
berekuk commented 2 years ago

Checklist by @NunoSempere from #63 (easier to continue here than there but see #63 for relevant comments):

To do:

  • [x] Use real rather than fake data. I'm hoping the graphql interface can be used for this, rather than having to interact with it directly
  • [ ] Reduce the chart size. Take https://manifold.markets/ or https://polymarket.com/ as reference points
    • As a sidenote, I think I'm accustomed to much bigger fonts than normal, so my personal preference shouldn't really be a guiding factor here.
  • [ ] Add functionality so that charts can be embedded
  • [x] Only display the yes in the case of a binary question
  • [ ] Add the ability to combine many questions at once, maybe with shorthand labels in the url query
  • [ ] Add bells and whistles: Different options, allow one to consider different time periods, show quality indicators, add zoom ability, add other functionality in https://polymarket.com/ (they recently did a really nice chart refactoring)
  • [ ] Incorporate some feedback from twitter, and generally from @ClayGraubard or @uvafan
  • [ ] Embed into EA Forum/LessWrong
berekuk commented 2 years ago

It's alive! See e.g. https://metaforecast-git-questions-page-2-quantified-uncertainty.vercel.app/questions/predictit-7595

NunoSempere commented 2 years ago

It's alive! See e.g. https://metaforecast-git-questions-page-2-quantified-uncertainty.vercel.app/questions/predictit-7595

Omg, this is beautiful

NunoSempere commented 2 years ago

Some suggestions:

NunoSempere commented 2 years ago

Maybe something like

metaforecast-charts

berekuk commented 2 years ago

I think we should also incorporate capture functionality on question pages. It doesn't make much sense to me to keep it separate.

berekuk commented 2 years ago

Note to self: figure out what to do with guesstimate questions. They are currently broken since they're not stored in the database. Maybe they should just be fetched and stored in questions like everything else?

NunoSempere commented 2 years ago

Maybe they should just be fetched and stored in questions like everything else?

This would be in principle fine, but there are too many of them. But we can get a hq preview to display? Or else we can embed them as an iframe?

berekuk commented 2 years ago

Turns out history entries weren't sorted and charts didn't display the full history because of this, should be better now.

NunoSempere commented 2 years ago

Note: Display first 5 candidates by current probability, e.g., https://metaforecast-55a1k0bby-quantified-uncertainty.vercel.app/questions/predictit-7667 doesn't display the recent candidate in https://www.predictit.org/markets/detail/7667/Who-will-win-the-2022-Michigan-Republican-gubernatorial-nomination

berekuk commented 2 years ago

One thing I don't like in the current version is how it looks on mobile, it'd be better to display the legend below the chart to allow for more width.

Other stuff:

berekuk commented 2 years ago

Except for guesstimate, which this branch still doesn't handle, I think this almost ready for prod.

NunoSempere commented 2 years ago

date-low

I've noticed that the dates in the x-axis are cropped off ^

berekuk commented 2 years ago

Ok, now I think it's ready.

Changes since my previous comments: 1) Handle guesstimate:

OAGr commented 2 years ago

This is really neat, happy to see this in!