Skip to content

A Python script that sends Italian flu updates to Mastodon

License

Notifications You must be signed in to change notification settings

emmecola/influbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

influbot

This script retrieves the ISS data on flu from the Influnet repository.

Then, it extracts relevant information about national incidence, most affected region and age class and draws two plots and a choropleth map using the shapefiles available on ISTAT website.

Finally, it sends a toot using the Toot CLI and the Mastodon profile @influbot@sociale.network.

Instructions

If you want to try influbot on your computer, please follow these steps:

  1. Install toot and pandas, matplotlib, seaborn and geopandas Python packages.

    pip3 install -r requirements.txt

  2. Configure toot with your own Mastodon account, following these instructions.

  3. Download from the ISTAT website the zip archive with the shapefiles, and extract it in the script folder.

  4. The plotting functions use a custom font, FigTree, which was downloaded from Google Fonts. If you want, you can install a different font or use one of the default matplotlib fonts. Edit the script accordingly.

  5. Create an archive.txt file that will keep track of the weeks already processed by the script.

  6. Run influbot!

    python3 influbot.py

About

A Python script that sends Italian flu updates to Mastodon

Topics

Resources

License

Stars

Watchers

Forks

Languages