Implementing Radio Buttons in an Observable Framework for Data Filtering

How to implement radio buttons in an observable framework, and when the value changes, how to retrieve the value in the console to further use it for filtering data based on the returned value from the radio button?

You could use Inputs.radio, as documented here:
https://observablehq.com/framework/inputs/radio