RaadsTalk
March 12, 2020 ยท View on GitHub
A webapplication that uses Open Raadsinformatie to show which topics are being discussed in Dutch municipalities. Uses the WeighWords library / Parsimonius algorithm to calculate which words are trending.
Check it out at VNG Realisatie or at raadstalk.nl!
Use as widget
Add this iFrame to your webpage:
<iframe src="https://raadstalk.nl/widget" height="100%" width="100%" frameborder="o" scrolling="no">
Raadstalk kan niet worden geladen. Bezoek <a href="https://raadstalk.nl">raadstalk.nl</a>
</iframe>
Put it inside a wrapping element that constrains its width (about 250px) and height (about 400px).
See an example HTML file here.
Managing Topics
- Visit
admin.localhost(oradmin.raadstalk.nlin production) and login using your credentials. The password is set with thesecret.envfile. - Manage months and their items by adjusting
raadstalk.YYYY-MM. You can remove items from the lists. - Blacklist words / words to ignore can be set by adding items to
raadstalk.stupid_words. Be aware that the/opt/trends/es_dumpfolder within the container should be flushed when new words are added. - Create backups by exporting the redis data and pasting the content to a new .redis file in the
./backupsfolder. You can import these using the same interface.
Setup
- Get docker and docker-compose
- Setup the secret
cp secret_template.env secret.env - Change the password
vim secret.env - Setup the environment variables in server folder
cd server && cp template.env .env - Add blacklisted words using redis admin
admin.localhost. Import thestupid_words.redisfile.
Local development
./dev.sh- Visit
http://localhost - Redis admin is available at
http://localhost:8888orhttp://admin.localhost - If you use VSCode, you can use the
Debug serverbuild task
Tasks
docker-compose up -d nginxfor running the server.- Adjust
variables.envto set start date. docker-compose up --build trendsfor running trends task to update the wordsdocker-compose up --build countallfor updating trends task to update all countsdocker-compose up --build countlastmonthfor updating trends task to update last months counts
Deployment & devops
- Follow steps from setup
- For HTTPS, use
./init-letsencrypt.sh. Check this tutorial for more information. - Download the latest version and restart docker-compose
./renew.sh - Don't forget to periodically run trends
crontab ./cronjob
Credits
Funded by VNG Realisatie B.V.
Development by Joep Meindertsma (@joepio) & Jurrian Trom (@jurrian) from Ontola / Argu B.V.
License
MIT