tnris / flood Goto Github PK
View Code? Open in Web Editor NEWReactJS frontend web application for monitoring USGS/NWS flood gauges and river levels with SMS subscription availability
Home Page: http://map.texasflood.org
ReactJS frontend web application for monitoring USGS/NWS flood gauges and river levels with SMS subscription availability
Home Page: http://map.texasflood.org
Will ask once GetFeatureInfo request is ready for their review
A continuous map layer of precipitation (measured from doppler radar). Preferably Animated.
Real-time road closure information maintained by TxDOT for DriveTexas
Lake conditions
shouldn't be too hard, but there might be weird interactions with external map layers if they don't support it
This depends on #71 so we can figure out what we need to get from where.
Need proper attribution for the Texas Google Imagery base layer. I've emailed tnrisdatasupport asking for the proper language.
This morning the nws_ahps_gagues_texas auto-sync table was completely empty. I clicked the "Sync now" link in the CartoDB web UI and it successfully grabbed the data.
Obviously a big part of this project is going to be managing these types of sync problems.
Would be good to order the point rendering by flood severity, with most severe dots rendering on top of less sever.
If the async call in the AnimatedWeaterLayer's update()
method has not finished by the time addTo(map)
is called, an error will be thrown during this line: this.layers[i++].setOpacity(0.8)
(because layers[0]
will be undefined)
Where possible, use 2x resolution tiles for high DPI screens (retina devices, 4k monitors, fancy phones and tablets). Maybe we shouldn't do this for mobile devices, where bandwidth matters.
CartoDB layers directly support the common '@2x' pattern. Basemaps are tricky and only some have will support high resolutions. Strictly aerial layers can be tricked into rendering one z level deeper and that'll work fine but probably not worth the complexity. Non-photo rendered maps generally look weird when trying to do this.
We need to purchase an Aeris subscription. Until then advisory layers and api queries (like for flood alerts) won't be available.
will work better for any size of screen / device
A service that pushes updates to CartoDB when new data is available.
After displaying the AnimatedWeatherMaps everything else becomes a bit sluggish.
Trying to nail down exactly where the memory/perf leak is, but I think it has to do with the browser hanging on to 20 layers worth of images.
Will need to experiment with where exactly that goes. It could go in with the map selector or somewhere on top of the map itself.
This issue is to track high level data pipeline and service architecture discussion
IE has no support for Object.assign
: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
We should make sure to always use the object-assign
package.
This issue splits out discussion of what others have called the data service.
To rephrase what others have said (corrections welcome), the data service is a simple HTTP JSON API which the front end can use to get data about gauges, e.g.
I believe these two queries imply certain capabilities
Data service should handle heavy, bursty read loads, and it should not go down very much. That defines these dependencies, partly concerning where the API itself runs but mostly the datastore:
To be available by May 1.
Needs to have a few live (near-realtime) data layers:
I'm making this issue for discussion of the interface that will be provided from DynamoDB to Data Service.
This could be worked out starting from higher-level considerations like what kinds of data will be stored, and what kinds of access patterns are expected. Or it could be implied by some code. Or the schema could just be given directly. Whatever. It just needs to be worked out somehow.
Dependencies of this issue include both the Data Service API itself and also the pipeline code which puts the data for Data Service into DynamoDB, and therefore needs to know about things like hash keys and range keys.
Slightly hard to understand, but we might to display the Aeris logo on the page.
http://www.aerisweather.com/support/docs/credit/ says:
While some of our products and services can be used commercially without requiring attribution, most products including the AerisWeather API and Aeris Maps require proper attribution by using any one or a combination of the allowed AerisWeather marks as described below.
This issue tracks progress on implementing gauges for the National Weather Service (NWS) Advanced Hydrologic Prediction Service (AHPS)
curl 'http://water.weather.gov/ahps/get_map_points.php' --data 'key=tx&fcst_type=obs&percent=50¤t_type=all&populate_viewport=1&timeframe=0' —compressed
<disclaimers>
are the XML version of “for entertainment purposes only” messages. We don’t need to worry about these<sigstages>
contains the set of Flood Stages defined for the gauge. These are important, we need these to associate observed and forecast values to flood stages.<sigflows>
is the analog with stages defined by streamflow, but seem to be incorrect sometimes. Probably should ignore<zerodatum>
TL;DR is “its kind of complicated and we don’t need to worry about it for this application”. Longer version is that it defines in a semi-precise way what “10 ft” of stage means. It references a more or less consistent model of the earth, so “235.49 above Mean Sea Level” means that a stage of 0ft is 235.49 ft above MSL and a flood stage of 5ft is 240.49 ft above MSL. It gets more complicated than that because "Sea Level" is a weird construct, but I’ll stop there.<rating>
is the rating curve for the gauge. We don’t need to worry about this, because the values will be contain both Stage and Streamflow with the conversion automatically applied.<alt_rating>
an alternate version of the rating curve? Again, feel free to ignore.<observed>
Observed values that were measured by the gauge. These have already happened.<forecast>
The modeled forecast of what is predicted to happen. These will not always be available - NWS only runs forecasts when they have determined that there will be some flood risk.<observed>
and <forecast>
(when available) and stage needs to be correlated it with to assign a flood stage category.something like a spinner or progress bar to indicate when a layer is not quite ready to be added to the map yet
A map layer containing active Watches and Warnings from the National Weather Service
absolute garbage at the moment, mostly due to a combination of S3 being slow and a single large scripts.js file that includes a bunch of vendor'd code:
Some time before launch this needs to be fixed with some combination of:
A map layer containing active Watches and Warnings from the National Weather Service
Aggregated set of weather stations
Map layer showing forecast precipitation
It always causes a page refresh.
CartoDB layers should re-request their layerids (via post to https://tnris.cartodb.com/api/v1/map/
) on a timer. Probably a 2 to 4 hour timer would work to ensure that the tile layers don't start to error out after long periods of user inactivity.
Streamflow data from the USGS National Water Information System
The animated frames switch before all tiles load, causing a weird patch-work for the first few iterations before each layer has finished loading. Doesn't look good.
A simple-ish solution would be to wait for each timestamp layer to finish loading before moving on. Should also have a few second timeout so that a dropped tile request doesn't hang up the whole app
To implement #46, we need an API token tied to the TNRIS CartoDB account.
For security, we should create a limited user only for use in this project. Ideally, I'd like this user (and likewise, this user's token) to only have UPDATE/INSERT access to the table(s) used in this project. We can use an admin user to create & delete table(s) as needed.
Multiuser access is only available to Enterprise CartoDB accounts, so this may not be possible on the current TNRIS account. The alternative just means we have a singleuser account, with one god-token that allows R/W access to all tables. That technically would still work, but we might want to avoid distributing said god-token across production servers.
Road closure data from https://www.atxfloods.com/
set up deployment for front-end code -> S3 with proper DNS records
Windows 10, Chrome
Clicking the fullscreen button on the leads to a fullscreen black box (and also showing the browser's "Press ESC to exit fullscreen" message). No errors appear to be thrown.
If the dev console is open, the fullscreen button works as expected.
Fullscreen button works as expected in Windows 10 Firefox.
Come up with a way of doing stress testing, to ensure high availability under heavy load.
Possible options:
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.