Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dieghernan/spain-munic-bot

πŸ€– Twitter bot: random municipalities of Spain πŸ‡ͺπŸ‡Έ with {CatastRo} posted with {rtweet} via a GitHub Action
https://github.com/dieghernan/spain-munic-bot

bot maps r spain twitter twitter-bot

Last synced: about 2 months ago
JSON representation

πŸ€– Twitter bot: random municipalities of Spain πŸ‡ͺπŸ‡Έ with {CatastRo} posted with {rtweet} via a GitHub Action

Awesome Lists containing this project

README

        

# spain-munic-bot :es::robot:

![tweet-maps](https://github.com/dieghernan/spain-munic-bot/workflows/last-tweet/badge.svg)
![](https://img.shields.io/badge/active-since%202021%E2%80%9302%E2%80%9328-brightgreen)
![progress](https://img.shields.io/badge/dynamic/json?label=progress&query=progress&url=https://dieghernan.github.io/spain-munic-bot/assets/lasttweet.json)
![last-visited](https://img.shields.io/badge/dynamic/json?label=last%20visited&query=lastseen&url=https://dieghernan.github.io/spain-munic-bot/assets/lasttweet.json&style=social)
![last-tweet](https://img.shields.io/badge/dynamic/json?label=last%20tweet&query=lasttweet&url=https://dieghernan.github.io/spain-munic-bot/assets/lasttweet.json&style=social&logo=twitter)
![Followers](https://img.shields.io/twitter/follow/spainmunic?label=Followers&style=social)
[![ko-fi](https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg)](https://ko-fi.com/dieghernan)

## A Twitter bot written in R


β€œFollow

I tweet a random map of a Spanish town together with its name, province, and
autonomous community (and a inset map of Spain showing the region and the
community). The bot is set to run every 20 minutes.

## [I have a website!!](https://dieghernan.github.io/spain-munic-bot/)

## **:house: Buildings**

I create a map of the Urban Growth of Spanish cities, based on the works of
**Dominic RoyΓ©:** [Visualize urban
growth](https://dominicroye.github.io/en/2019/visualize-urban-growth/)

![sample](assets/img/sample.png)

Find
[here](https://github.com/dieghernan/spain-munic-bot/blob/main/assets/datalog.csv)
all the maps generated by the bot.

## :airplane: The journey

![journey](assets/img/journey.png)

## :package: R packages

Core packages used in the project are:

- [{CatastRo}](https://ropenspain.github.io/CatastRo/) for the buildings.
- [{mapSpain}](https://ropenspain.github.io/mapSpain/) for the location of the
municipalities.
- [{ggplot2}](https://ggplot2.tidyverse.org/) for plotting,
- [{rtweet}](https://docs.ropensci.org/rtweet/) for posting,

Other packages used are {sf}, {dplyr} and another common supporting packages.

This project uses {renv} for ensuring fully reproducibility across platforms.

## πŸ™ŒπŸ» Credits

- Based on

- [italiancomuni](https://twitter.com/italiancomuni), by \@espinielli.

- Automation:

- GitHub Actions as per \@espinielli's [GitHub
Repo](https://github.com/espinielli/italian-comuni-bot).

- sources:

- [mapSpain](https://ropenspain.github.io/mapSpain/) R package.
- [osmdata](https://docs.ropensci.org/osmdata/) for the streets.

## :grey_question: How to run it

From the command line it is enough to run the following command:

$ Rscript R/trigger.R

This will trigger `R/01_create_map.R` and compose the tweet.