Giter Site home page Giter Site logo

watmildon / smallcitymastodonbot Goto Github PK

View Code? Open in Web Editor NEW
11.0 3.0 2.0 1.2 MB

Posting towns in the USA with a population less than 1000 that are undermapped on OpenStreetMap.org

Home Page: https://en.osm.town/@SmallTownUSA

License: MIT License

C# 100.00%
openstreetmap mastodon-bot

smallcitymastodonbot's Introduction

SmallCityMastodonBot

The repository for code and data file backing the @[email protected] account. Takes a json file of OpenStreetMap place nodes and a Mastodon token and finds a random unmapped town to post about. The post includes an image that is the current state of Carto rendering at the time of posting.

All of the cool things the bot does have come from community ideas. Please let me know what else you'd like to see!

Mapping

As with all of OSM, map whatever you like! Add buildings, check roadways for alignment to aerial imagery, draw landuse areas, use street side imagery to add detail etc. If you want to make it easier to other folks to collaborate or appreciate your great work feel free to add #UnmappedSmallTownUSA to your changsets.

Bot replies

If you do some mapping and would like the bot to generate an updated screen shot, respond to the top level town post (ex: here) with any message that contains "I mapped it!".

The bot tries to get updated tiles from the OSM tileservers but sometimes may need a little help. If you discover that the bot hasn't managed to pull new tiles you can help it along:

  • navigate to the town on osm.org
  • scroll to zoom 16
  • reload the page without caching (ctrl+f5 on Windows, shift+command+r on Mac)
  • post a new "I mapped it!" reply

Current settings

The bot is set to post a new town once a day around noon PT. It will scan for posts needing replies every hour. If you discover that either of these is not happening, please file a ticket here or ping me on Mastodon.

Development Notes

The overpass query to generate the townsList.json looks like:

[out:json][timeout:60];
{{geocodeArea:"United States"}}->.a;
(
  node["population"]["place"](if:(t["population"]<"1000"))(area.a);
);
out body;
>;

smallcitymastodonbot's People

Contributors

watmildon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

kmpoppe strubbl

smallcitymastodonbot's Issues

Message replies based off notifications feed not full feed

Currently the bot pull the whole feed looking for things to respond to. This is more work than is needed but was simplest to get going. Before the feed gets too big, it'll be nice to get it using the Notifications API and only looking at things since it last run.

Thank you

Hi there,

I just wanted to say thank you for your work making this. I saw it posted on lemmy here and am so impressed. What a great idea for a bot. What a nice following you have that seem to be taking action each day to map these places. I doubt if you'll ever hear it but I'm sure some of these people wake up one day and boom their place is suddenly mapped (on whatever app) and they're surprised and delighted!

I think it would be cool if you did a 1 year review with before and after pics of every place you posted. Show them all on a little webpage or something. I think that would be a hit!

PS: You should add a little short description and link to website on the sidebar of github so is just a tiny bit easier for people to know what it is.
Screenshot 2024-03-28 at 16 05 57

Add query type "ratio"

Taking ratios of two query counts allow a bit of normalization. For example a town may have 50 addresses in it but if it has 1000 buildings, it likely still needs some mapping.

  • Extend the json object to take a new query type with two tag parameters, including a threshold for what counts as "mapped"
  • Add query type to program and handle the ratio comparisons
  • Adjust posting opt out so it looks at all queries that have thresholds
  • Add documentation to readme.md

Refactor bot to serve multiple accounts

  • Move strings post text to a config file.
  • Move queries to config
  • Add config section for Town file generation overpass query
  • Add config section for which Town file to consume
  • Consume api token from separate non-repo file.
  • Write doc into readme about how to properly format a config entry for a new bot.

Add screenshot of current map on OSM

I really love seeing the before + after mapping comparisons, but I never remember to take the before image whenever I map anything. It'd be cool if the bot also posted a screenshot of what it looks like on OSM when it makes the post.

Biggest complexity would probably be getting the right zoom level for the screenshot, but really anything would be helpful.

Post monthly stat updates

It might be fun for the bot to scan all the towns and post updated and combined building/landues/roadway stats for everything on the first of the month.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.