Real-time Air Pollution Alerts / / No Comments In February the Copernicus Atmosphere Monitoring Service (CAMS) launched an Aerosol Alerts service to provide warnings about upcoming air pollution. You can view an animated map of today’s alerts on the Aerosol Alerts interactive map.Aerosols are tiny particles that are suspended in the air, which can come from both natural and human-made sources. Natural sources of aerosols include dust Maps Mania… more → Posted in: Interactive Maps Tagged with: Alerts, Pollution, realtime
Not Everyone Commutes by Car / / No Comments In Canada and the United States 95% of journeys to and from work are made by car. Elsewhere in the world people often walk, cycle or use public transport in order to get to work.Cities Moving is a research project by the Complexity Science Hub of the University of Vienna, which analysed the mode of transport most commonly used for commuting to work in 794 cities in 61 countries around the Maps Mania… more → Posted in: Interactive Maps Tagged with: Commutes, everyone
Using Intl.RelativeTimeFormat for Localized Relative Timings / / No Comments I’ve been singing the praises of the web platform’s Intl object for years now, but it still continues to impress me. While I’ve seen it before, today I came across the RelativeTimeFormat API which looks absolutely fabulous. I played with it a bit and thought I’d share some tips. The Basics # The RelativeTimeFormat API works like so: Given a locale… Given a difference (in either a positive or negative value)… And given a unit of time, like ‘hour’ (or ‘hours’) Report the difference in the user’s desired language. So for example: 3 and day, "in 3 days" -1 and day, "one day ago" 18 and hour, "in 18 hours" Also,... more → Posted in: JavaScript Tagged with: Intl.RelativeTimeFormat, Localized, Relative, Timings, using
There are 2,773 stories in the Naked City / / No Comments The 1960’s procedural police series the Naked City used to conclude every episode with the line: “There are eight million stories in the naked city. This has been one of them.” If there are eight million stories in New York then The City has got quite a long way to go before it is finished reporting on them. So far it has managed to find only 2,773 stories in NYC.The City asked ChatGPT to find Maps Mania… more → Posted in: Interactive Maps Tagged with: 2773, City, Naked, Stories, there
Converting a Vue 2 App to Alpine.js / / No Comments A little over two years ago I published an "idle clicker game" built in Vue.js. I called it "IdleFleet" and was heavily inspired by games like A Dark Room, where I relied on simple text graphics and game mechanics that would change as you played. In my last <Code><Br> session, I walked through the process of building a simple text game and brought up IdleFleet as an example. While playing the game to refresh my memory about what I actually built… I discovered I actually really liked it. I decided it would be good to give it some attention with new features and other updates, but before I could do that, I knew I needed to switch from Vue to Alpine.js. Why... more → Posted in: JavaScript Tagged with: Alpine.js, Converting
Solar Symbology / / No Comments The one thing that you are guaranteed to see before a solar eclipse is lots of maps. With just over a month to go before April 8th’s total solar eclipse new solar eclipse maps are being released almost daily. Over on the Esri blog Kenneth Field has introduced his new Total Eclipse map. Kenneth’s map uses small symbols to visualize the extent of the eclipse possible at different locations Maps Mania… more → Posted in: Interactive Maps Tagged with: Solar, Symbology
TIL – submit() versus requestSubmit() / / No Comments Today I learned (well, technically, a few days ago, the week has been a lot), that the web platform supports a requestSubmit method. Since the beginning of time (or the beginning of JavaScript), we’ve been able to submit forms like so: var myForm = document.getElementById('theform');myForm.submit(); I intentionally used getElementById there as a reminder of what we had before jQuery. Given that, why do we need another method? Two important requests. Reason the First # When using submit, any validation of form fields is completely skipped. Consider this form: <form method="post" id="theForm"> <p> <label for="name">Name</label> <input... more → Posted in: JavaScript Tagged with: requestSubmit, submit, versus
Who Deserves a Monument Anyway? / / No Comments Distribution of Confederate monumentsThanks to Geochicas and the Mapping Diversity project there has been quite a lot of data analysis undertaken over the last few years into the lack of diversity in the street names of cities around the world. According to Mapping Diversity in the 32 cities which they have analyzed “More than 90% of the streets named after individuals are dedicated to white Maps Mania… more → Posted in: Interactive Maps Tagged with: Anyway, Deserves, Monument