fishcharlie / airportstatusbot Goto Github PK
View Code? Open in Web Editor NEWThis is a social media bot that will post delay information for airports in the United States.
License: MIT License
This is a social media bot that will post delay information for airports in the United States.
License: MIT License
The README says "our data" comes from the FAA, but some of the data comes from OurAirports via https://github.com/davidmegginson/ourairports-data
If this is your biggest problem you're in splendid shape!
Currently if we restart the service (for deploying an update) and during that restart (normally only takes a few seconds or so), the FAA posts a new delay, we will miss it.
This is because when the service starts, it gets the delays from the FAA, and that first request won't generate any posts.
We should check to see if we already have a (recent) cached version of the delays from the FAA, and use that on first run instead. If it's not recent, we will have to revert to that slight delay (as to not post duplicate messages).
For some reason every once in a while the system will just stop logging anything, and stop working. My guess is that it's not making requests anymore. Maybe an await
statement is getting stuck or something??
We need to investigate this and fix the bug.
When a delay has ended we should reply to the original post stating that the delay has ended.
Currently if a request fails (either to FAA's API or the GitHub OurAirports file) the entire system will crash.
Luckily this hasn't happened so far.
But we should add some extra resiliency to that code, like retry logic and such.
Currently the hashtags being used are fairly limited. It'd be great to come up with a better strategy for how to use hashtags. For example it might be beneficial to include a hashtag of the state that the airport is located in. Or if it's a weather related delay saying #weather
instead of weather.
Currently if the service goes down, there is no way to know other than posts not showing up. We should have some type of alert that will ping someone if the service goes down.
In the event the delay information has updated, we should reply to the original post with that updated information.
Some people might just want to follow a specific airport (ie. ATL
). The bot should be able to have accounts that are specific for a single airport.
Currently this project only supports US airports. We should try to find data sources for foreign airports and add support for that.
Wikipedia maintains a list of hub airports in the U.S. here:
https://en.wikipedia.org/wiki/List_of_hub_airports#United_States
If it'd help and there's interest I could maybe build a scraper for that and linked subpages to periodically update a list of airline names and ICAO codes, e.g.:
Inbound aircraft to Los Angeles / Tom Bradley International Airport (LAX) are currently being delayed at their origin airport due to wind. Delays are currently averaging 1 hour and 14 minutes and are up to 2 hours and 21 minutes. AirportStatusBot
Perhaps followed by something like:
Delays at LAX may affect hub operations of as many as seven airlines:
Allegiant Air (AAY)
Alaska Airlines (ASA)
American Airlines (AAL)
Delta Air Lines (DAL)
JetBlue Airways (JBU)
Southwest Airlines (SWA)
United Airlines (UAL)
Alternately:
LAX delays may affect hub operations for as many as seven airlines: AAY ASA AAL DAL JBU SWA UAL
That could have some value in searches, with someone looking for "lax delay american airlines" or "dal 1234 delay".
A lower lift might be to simply write words like "Large airport delay!" where the CSV's "type" field is "large_airport" ... ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.