Raspberry Shake Reports!
Alan Sheehan's work at https://github.com/sheeny72/RPiSandB is the basis for this; I've added some things and tidied up the code a bit, but this is all based on Alan's work and would not exist without his generosity. Thank you, Alan!
-
src/usgs.pywill query the USGS feed-
usgs.py querywill fetch the feed, then generate shell commands to generate reports -
usgs.py build_dbwill fetch the feed, then transform the geojson for local use by datasette & save it & save it- it's now ready for
geojson-to-sqlite --alter my.db features 2.5_day.geojson
- it's now ready for
-
-
src/report.pyactually generates the reports -
report.inicontains a few config items for these scripts...too few -
cron_wrapper.shattempts to tie it all together
This is what's in cron_wrapper.sh:
-
make build_dbshould generatelocal.db. Datasette can now run. -
usgs.py queryshould fetch the USGS feed, then spit out shell commands to generate reports. -
That output is captured in a temporary shell script & then run.
-
This should now create reports in the reports dir. Datasette's
report_urlcolumn should now work.
Project based on the cookiecutter data science project template. #cookiecutterdatascience