okfde / froide-govplan

Basis of FragDenStaat.de's „Koalitionstracker“
https://fragdenstaat.de/koalitionstracker/
MIT License
12 stars 3 forks source link

Idea: Use External APIs For Status Tracking #3

Open hejjoe opened 2 years ago

hejjoe commented 2 years ago

Lots of government plans need to be approved by the legislative. So existing APIs like the DIP API could be used to automatically track ongoing plans. Every law has an ID, which could be tracked easily.

There already some projects that make it easier to use the DIP API like BundestagsAPy by @parobo, pydipapi by @lichtbaer, tidybundestag by @benjaminguinaudeau, bt-dip-sdk by @ManAnRuck and Bundestag-API by @jschibberges.

E.g. this government plan

https://fragdenstaat.de/koalitionstracker/ampelkoalition-2021/vorhaben/wohngeld-und-einmaliger-heizkostenzuschuss/

is equivalent to this procedure

https://dip.bundestag.de/vorgang/gesetz-zur-gewährung-eines-einmaligen-heizkostenzuschusses-aufgrund-stark-gestiegener-energiekosten/284432

DIP API documentation suggests "GET https://search.dip.bundestag.de/api/v1/{ressourcentyp}/{id}"

So in this case the government plan could be tracked here: GET https://search.dip.bundestag.de/api/v1/vorgang/284432?apikey=N64VhW8.yChkBUIJeosGojQ7CSR2xwLf3Qy7Apw464

The status displayed via the DIP API (here "beratungsstand") could be used to track the status of the government plan.

Bonus: If the status for a procedure in the DIP API does not change for a certain amount of time the status of the government plan could automatically changed to "verschoben".