9 ms·
ASCII Art Weather
- slazaro 10y ago(Meta) Perhaps the link should point to the base URL, apparently it detects your location if available (didn't work for me because I have it disabled).
- d99kris 10y agoLooks like it was submitted 2 days ago https://news.ycombinator.com/item?id=11477365 https://news.ycombinator.com/item?id=11477365 , so maybe it was done to avoid the dupe detection.
- iriche 10y agoNo comments on that submission - so doesn't really matter :)
- NKCSS 10y agoI like their fallback though :P > We were unable to find your location, so we have brought you to Oymyakon, one of the coldest permanently inhabited locales on the planet.
- oneeyedpigeon 10y agoIt's pretty cool, but it doesn't quite line up for me. Unicode characters (but ... "ASCII"?) are the prime culprit, but something also going on with the 'delimitting' header lines too - they're way off.
- d99kris 10y agoAgree it doesn't render well in Chrome for example. In elinks and firefox under Linux it looks fine for me though.
- itcrowd 10y agoWorks fine for me in Chromium, Firefox/Iceweasel and curl..
- cvs268 10y agoBroken for me as well. Looks like certain assumptions about max length of weather numbers causes unnecessary additional padding resulting in misaligned borders. http://imgur.com/vyupGUN http://imgur.com/vyupGUN
- philh 10y agoI think that's a problem with the font, actually - it's supposed to be monospace, but the diagonal arrows (e.g. ↗) are about 1.5 times the width. I have the same problem. (Or maybe not "the" font, but fonts in general - perhaps it's trying to use one font, which doesn't have these arrows, so it falls back to a different one?)
- m_t 10y agoFunny thing is, it aligns properly in the terminal (cygwin here) http://imgur.com/LicBeh3 http://imgur.com/LicBeh3
- hugg 10y agoYeah, because it's not showing the diagonal arrows.
- jayrhynas 10y agoIf you have a font that supports proper monospaced unicode, it works: http://cl.ly/2f410i1k270D http://cl.ly/2f410i1k270D
- cvs268 10y agoThanks for confirming. Can you share the font/fontname you are using? I would like to install it on my PC as well... Update: Looks like they fixed it now. I just re-visited the site after posting this comment and see that there are new monospace arrows rendering in a properly aligned manner.
- benzinschleuder 10y agoIt works in the Terminal, too! curl http://wttr.in/london http://wttr.in/london
- Jaruzel 10y agoBut not as native ANSI though? Unless it's doing some clever useragent detection? (I'm on Windows without curl/wget).
- benzinschleuder 10y agoDunno, tried it on OS X and it's colorful and looks good.
- ajsalminen 10y agoYes, it does return ANSI when you curl/wget the address.
- tsukikage 10y ago"This is a web frontend for a console weather application wego, using it as a backend." https://news.ycombinator.com/item?id=9545180 https://news.ycombinator.com/item?id=9545180
- hultner 10y agoSetting up wego on a raspbian were a bit painful (go in aptitude is 1.3 while wego requires 1.5), the easiest way that works out of the box is simply running curl wttr.in/Localtion ;)
- chrisdew 10y agoWhy does it forecast sunshine at night?
- fabiendem 10y agoNice! :) alias weather="wget -O - http://wttr.in/london http://wttr.in/london -q"
- xupybd 10y agoSlight tweak watch --color "wget -O - http://wttr.in/Palmerston_North http://wttr.in/Palmerston_North -q" Not that its going to need to update that much, its just, well it makes me feel like it's more accurate that way.
- dtzWill 10y agoYou might want to use wego[1] directly if you're interested in weather reports in your terminal, if the dependencies aren't an issue. [1] https://github.com/schachmat/wego https://github.com/schachmat/wego
- tux 10y agoUsing 'watch' 'curl' (refresh every minute) watch --color -n60 'curl -q http://wttr.in/london' http://wttr.in/london'
- cat-dev-null 10y agoBrilliant! Try: curl -sk https://wttr.in/sfo
- masklinn 10y agoIf you use plain http, you don't even need the flags.
- buro9 10y agoI much prefer weather via finger using graph.no: https://news.ycombinator.com/item?id=11106354 https://news.ycombinator.com/item?id=11106354 https://0p.no/2014/12/13/graph_no___weather_forecast_via_finger.html https://0p.no/2014/12/13/graph_no___weather_forecast_via_fin... And the command: finger london@graph.no Which produces this: -= Meteogram for united_kingdom/england/london =- 'C Rain (mm) 17 16 ^^^ ------^^^^^^ 15 ^^^ --- ^^^ 14^^^ ^^^ 13 ^^^ 12 ^^^ 11 ========= === ^^^ 10 ============ === 9 ' | 2 mm 8 | | | | | | | | | 1 mm _11_12_13_14_15_16_17_18 19 20 21 22 23 00 01 02 03 04 05 06_07_08 Hour SE SE S S S S S S S S S S SE S S S S E SE SE S SW Wind dir. 1 2 5 4 4 4 5 4 4 4 3 3 3 2 3 2 1 0 1 2 1 3 Wind(mps) Legend left axis: - Sunny ^ Scattered = Clouded =V= Thunder # Fog Legend right axis: | Rain ! Sleet * Snow So it's 16'c with a light cloud cover until 1pm, clear until 4pm after which it gets a little cloudy again, some rain between 11pm and 7am, which is very light and heaviest around 2am. That is the equivalent of this: https://www.yr.no/place/United_Kingdom/England/London/hour_by_hour_detailed.html https://www.yr.no/place/United_Kingdom/England/London/hour_b... Which has, for me, proven to be the most accurate and informative weather forecast. And if you just want to use the latest meteogram image: https://www.yr.no/place/United_Kingdom/England/London/avansert_meteogram.png https://www.yr.no/place/United_Kingdom/England/London/avanse... Also: Weather available via HTTPS! I dislike how the vast majority of apps on mobile devices use location for reporting local weather but do so over HTTP and leak location data. BBC, I'm looking at you. If you're on Android there's a great widget that makes using any other weather app pretty redundant for most cases: https://play.google.com/store/apps/details?id=widget.weather.no.yr&hl=en_GB https://play.google.com/store/apps/details?id=widget.weather...
- 10y ago
- tsukikage 10y agowttr.in/Cambridge looks completely wrong. Says Cambridge, UK at the top, but -2°C and heavy snow? Really? EDIT: looks like it's using http://www.worldweatheronline.com/cambridge-weather/scottish-borders/gb.aspx http://www.worldweatheronline.com/cambridge-weather/scottish... rather than the one in East Anglia
- jvdh 10y agoThere is no way at all to handle duplicate location names. Another nice example is wttr.in/denhaag which uses the South African city of "Den Haag", which is so small even Google Maps searches for it end up with the South African embassy in the Dutch city of that name.
- wobbleblob 10y ago... which is in a country so small, google maps searches end up with the town in Michigan of that name ;)
- user24 10y agoUse a postcode instead: http://wttr.in/cb1 http://wttr.in/cb1
- jayrhynas 10y agoOr lat/long: http://wttr.in/52.1988,0.0850 http://wttr.in/52.1988,0.0850
- bdz 10y agoI thought this will be something based on METAR codes...
- dredmorbius 10y agoWhat's impressed me about this is how much faster it is than Web pages or Android apps. Really: just transmit the data necessary to convey your information. Your app is in the way. wttr.in on Android using Termux is actually pretty awesome.
- mediumdeviation 10y agoTry looking at the source of the page. There's no way in hell anyone would call that "just" the data necessary to convey the information. The site is also unusable on mobile, because ASCII art unlike proper semantic HTML is not easily rescalable by the browser. And it's inaccessible by users relying on screen readers, ironically because of all the ASCII cruft.
- frobware 10y agoThe inaccessible comment is somewhat ironic. If the display of the ASCII craft is in a terminal at least I have some control over the font size and, in particular, the background colour.
- mediumdeviation 10y agoSorry, I meant cruft - autocorrect didn't recognize the word and corrected it to 'craft'. And the same control extends to users on the Web at the very least. Userstyles/scripts and extensions can modify websites, giving users the ultimate control over website content. My point was in response to the grandparent's statement that most modern apps get in the way of the user - those exact same things are also crucial to, for instance support screen readers and mobile users.
- baldfat 10y ago> in particular, the background colour I use this on my computers at work. Its wego and the ONE frustrating thing is you can't change the colors so that they work well with a light background.
- developer2 10y ago
- aerique 10y agoNice it supports coordinates as well: http://wttr.in/52.1,4.22 http://wttr.in/52.1,4.22
- maze-le 10y agoSadly, the weather on the North Pole is undefined... > http://wttr.in/89.99,0.00 http://wttr.in/89.99,0.00 >> ERROR Well, 85.90,0.00 works... must be a weather-station somewhere near... Greenland or Jan Mayen.
- uberneo 10y agocan't find a way to change fahrenheit to celsius
- jayrhynas 10y agoappend ?u=metric to the URL
- leni536 10y agoNice, looks nice in w3m an lynx too (I wonder if it's possible to enable colors though). I have new alias: alias weather="w3m -dump wttr.in/budapest" Edit: I just found in the comments that it works with plain curl too with color. Nice.
- akerro 10y agoWe were unable to find your location, so we have brought you to Oymyakon, one of the coldest permanently inhabited locales on the planet. >Freezing fog Don't want to know more about this place.
- jason46 10y agoAny idea how to specify a location, I tried the site on a few different browsers and some are correct and others are not. I suppose some browsers are blocking its means for determining the location. edit Looks like the issue is caused by some browsers/settings that hide the public ip prevent it from finding location.. would be nice to specify, i like the page.
- jccc 10y agoEnter your Zip code after the URL (if you're in the U.S.) -- http://wttr.in/65201 http://wttr.in/65201
- jayrhynas 10y agoIt also supports UK postcodes[1], Canadian postal codes[2], and lat/long coordinates[3] 1: http://wttr.in/cb1 http://wttr.in/cb1 2: http://wttr.in/l1v http://wttr.in/l1v 3: http://wttr.in/52.1988,0.0850 http://wttr.in/52.1988,0.0850
- korginator 10y agoThe weather data appears horribly inaccurate. I'm traveling in Vietnam (Hanoi) today and we're seeing temperatures between 25 and 31 deg C, but the site says we're roasting at 34 - 48 deg C. I checked Bangkok where I will go tomorrow, and the site claims we will hit 45 deg C which is ridiculous.
- neic 10y agoI don't think it's an interval. The second temperature seem to be the "Feels Like" temperature from worldweatheronline.com. I'm getting 52°C in Singapore which is ~15°C over the all time record.
- acz 10y agoFor PowerShell: (Invoke-WebRequest wttr.in/Brussels).AllElements | ?{$_.tagname -eq "pre"} | Select-Object -ExpandProperty outerText
- ygra 10y agoOr a bit shorter: ((iwr wttr.in/Brussels).AllElements | ? tagname -eq pre).outerText We could also wrap it into a function: function Get-Weather($Location){((iwr wttr.in/$Location).AllElements | ? tagname -eq pre).outerText}
- masklinn 10y agoOr you could just set/unset all the right headers and get the ASCII art directly (as `curl wttr.in/{location}` does) Although you'll need to interpret or strip the color codes.
- acz 10y agoThere is a hack to make PowerShell print vt100 colours http://www.nivot.org/blog/post/2016/02/04/Windows-10-TH2-%28v1511%29-Console-Host-Enhancements http://www.nivot.org/blog/post/2016/02/04/Windows-10-TH2-%28... Doesn’t work for me, but works for others it seems.
- manuw 10y agoAnd the moon: http://wttr.in/Moon http://wttr.in/Moon
- torgoguys 10y agoThe moon phase visualization takes arbitrary dates too: http://wttr.in/Moon@2016-Mar-23 http://wttr.in/Moon@2016-Mar-23 For the forecast, it also appears you can append "?m" to the URL for metric units or "?u" for USCS units to override the default it uses based on your presumed location.
- djsumdog 10y agoI was looking for that; surprised I didn't see it in the github page/docs anywhere. It's weird looking at London Weather with Imperial units.
- hammerha 10y agoReally good! Now I can see the weather on the command line in addition to a calendar and a clock. I think It'd be better to show the weather of yesterday instead of showing the weather of the day after tomorrow so that I can compare the sensory temperature.
- panic 10y agoNeat idea! The social buttons on the bottom kinda ruin the aesthetic, though (at least for me).
- thecryof 10y agoPlain, cool.
- ninjakeyboard 10y agocool! wind direction causes column alignment issues a bit in chrome.
- cnlwsu 10y agoin safari etc as well. I think its if theres a lot of double digit winds: http://wttr.in/rst http://wttr.in/rst
- yaronn01 10y agoTo visualize weather in the terminal you can also use: $> a=$(curl -Ls "bit.ly/1OuRPDJ"); curl --data "$a" "tty.zone?cols=${COLUMNS}" (via https://github.com/yaronn/wopr https://github.com/yaronn/wopr)
- a3n 10y agoIt even looks good when I turn off CSS, just lose color, and presentation of the badges at the bottom. Looks really nice in the terminal (urxvt/linux).
- edw519 10y ago\/\/\/\/ / \ / \ / \ /\_/ 0 0 \_/\ | | \/ \ |_| / \/ \ / \ \-----/ / ---------- Brilliant! \ / \_______/ | |
- pixelbeat 10y agoOh cool, this is using my ansi -> html conversion script! http://www.pixelbeat.org/scripts/ansi2html.sh http://www.pixelbeat.org/scripts/ansi2html.sh
- tptacek 10y agoI don't know why looking at this makes me so happy, but it does.
- jccc 10y agoI'm in Oxford, Ohio. Thinks I'm in Oxford, England. (Not criticizing, just amused.)
- throw7 10y agoI wish it showed dewpoint. Almost all these weather apps never show dewpoint (or it's hidden away), but instead almost always show the relative humidity percentage which is useless and just takes up space.
- gitaarik 10y agoMade a small bash function for it. You can give the city as an argument and otherwise defaults to the env var $WEATHER_CITY and if that's not set, won't provide any city to the site which will result in the site guessing your location. weather() { if [ "$1" ] ; then city=$1 else city=$WEATHER_CITY fi curl http://wttr.in/$city }
- Tiksi 10y agoAs a quick aside, you can set default variables in bash with ${var-default}, so your function can be condensed to: weather() { curl http://wttr.in/${1-$WEATHER_CITY} }
- tyingq 10y agoRelated, "Forecast Font" takes an interesting approach to this, using a webfont: http://forecastfont.iconvau.lt/ http://forecastfont.iconvau.lt/ Because it uses css to overlay elements, the woff font itself can be just the required pieces, rather than all the combinations. The woff font is 4.6kb. Not as tiny as ascii art, but still pretty small.
- shmerl 10y agoWhat is the source for the weather data?
- deleted 10y ago[deleted]
- edem 10y agoIt says "ERROR".
- geoffry 10y agoNice! I like the aggregation into time blocks people tend to care about. What's the definition of the probability of precip you're using? And how are you aggregating it? I ask because definitions can vary a lot and aggregation may not be straightforward. Another thing to consider is how you interpret/convey wind direction. Usually weather data sources provide the direction the wind is coming from. And people seem split on if the arrow should point to the origin or direction, depending on their background. It's a shame there aren't more characters like ⎋ (with the arrow going the other direction) to better represent origin/direction.
- insulanian 10y agoThis is awesome! But now I get: > Sorry, we are runnig out of queries to the weather service at the moment. Here is the weather report for the default city just to show you, how it works. We will get new queries as soon as possible. Can't you cache the data for an hour to prevent this from happening? Heck, just show me something even if it's fake as I love how the thing looks :)