This website was designed by the Winton Centre for Risk & Evidence Communication at the University of Cambridge, funded by Horizon 2020, as part of the Work Package 5 (on Society) of the European project RISE. It aims to display Operational Earthquake Forecasts in a way that is most helpful to a variety of audiences, and was the result of iterative design and testing with over 100 people, in Iceland, Switzerland, and Italy, ranging from seismologists to the general public, journalists to civil protection. The way that the numbers are displayed is the result of quantitative testing with many thousands of members of the general public in California, Switzerland and Iceland. The full reports of the testing and good practice recommendations are found as deliverables of WP5 on the RISE website.
This is a single page web application written in clojurescript. The clojurescript compiler generates javascript which runs in an HTML5 capable browser (Chrome, Safari, Firefox, Opera, IE11, Edge). It uses Bootstrap styling (via react-bootstrap) to achieve a responsive display that adapts to desktop or mobile screen sizes.
You can quickly get this project running on your local machine.
Show installation instructions
To run the configuration tool, start a shadow-cljs dashboard and start a development build:
npm run watch-allOpen localhost:9630 for the shadow-cljs dashboard. The :app will be served on localhost:3000 and the :test-browser on localhost:3021.
To stop your local build:
npm run stopInstall the Calva extension in VSCode.
Run VSCode command Calva: Start a Project REPL and Connect (aka Jack-in) and select shadow-cljs.
Check both :app and test-browser to start both. Connect to the :app build on the next prompt. Enable notifications on port 3021.
To inspect values in code, it is often more convenient to use
tap>rather thanprintln. Results will appear in the dashboard inspectors which allow navigation of run-time data.
Requiring
shadow.debugwill provide a slightly higher level interface totap>with useful snapshotting utilities that calltap>. See the comment at the end of this file for usage: shadow.debug
You can build a production ready version of the code using:
npm run build
# This command runs shadow-cljs release app under the hoodYou only need to host the public/ folder on your servers or
on a platforms like Netlify or surge.sh.
Improving mobile layout is a key area for future developers of the project to take into account. The necessary building blocks are already in the code like react-bootstrap, but the way the views are currently structured doesn't make for the best experience on mobile.
You might have noticed that on refresh, the language is lost and reverted to English. This is because the init function is called on refresh, and the database is reinitialized. One might want to use localStorage for instance to persist this type of parameters in the database not to lose them on refresh.
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.
