Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 4 months ago
JSON representation
π€ Twitter bot: random municipalities of Spain πͺπΈ with {CatastRo} posted with {rtweet} via a GitHub Action
- Host: GitHub
- URL: https://github.com/dieghernan/spain-munic-bot
- Owner: dieghernan
- License: mit
- Created: 2021-01-27T18:00:50.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-06T06:49:01.000Z (about 2 years ago)
- Last Synced: 2024-08-06T03:03:57.584Z (6 months ago)
- Topics: bot, maps, r, spain, twitter, twitter-bot
- Language: R
- Homepage: https://dieghernan.github.io/spain-munic-bot/
- Size: 2.32 GB
- Stars: 7
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
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
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.