3 ms·
If anyone wants the raw data, it's available in window._Flourish_data variable on https://flo.uri.sh/visualisation/16818696/embed https://flo.uri.sh/visualisati
by simonw 3y ago
If anyone wants the raw data, it's available in window._Flourish_data variable on https://flo.uri.sh/visualisation/16818696/embed https://flo.uri.sh/visualisation/16818696/embed
Which means you can extract it with my https://shot-scraper.datasette.io/ https://shot-scraper.datasette.io/ tool like this:
shot-scraper javascript \
'https://flo.uri.sh/visualisation/16818696/embed' _Flourish_data \
> /tmp/data.json
That's a 25MB file.
I loaded it into SQLite like this:
cat /tmp/data.json | jq .events | \
sqlite-utils insert /tmp/shots.db locations -
Then opened it up in Datasette with https://datasette.io/plugins/datasette-cluster-map https://datasette.io/plugins/datasette-cluster-map to see them on a map.
- wferrell 3y agoThank you!
- prophesi 3y agoThanks! And alternatively you can create an anchor element in the console with `href` set as a JSON stringified representation of `window._Flourish_data`. Then set a download attribute with the filename you'd like, and simulate a click to download it. To use it in leaflet, you'll need to iterate over the `events` array and change `lon` to `lng` before adding each point to the leaflet map.
- blatherard 3y agoAn even simpler option to get the data, at least in firefox, is to open the console, enter `window._Flourish_data` then right-click the result and select "Copy Object" which will put the json in your paste buffer and you can then paste it into a file.