In this activity, you'll build an predicate that tells you if you'll need an umbrella today.
But wait, doesn't this block need an input to say where you are? Nope: your IP address contains information about your location!
http://ipinfo.io/72.229.28.185
. What information does that page give you?proxied http
block:The amount of detailed information available from an IP address is pretty amazing (and a little scary), especially when you think about the ways that information can be used.
ipinfo.io
, and you'll find some really nice ways to directly extract the information you need. For example, ipinfo.io/72.229.28.185/loc
returns just a latitude and longitude, instead of an HTML page. Check out ipinfo.io/72.229.28.185/city
, /state
, and /postal
for ideas.