Coder Social home page Coder Social logo

tnris / lake-gallery Goto Github PK

View Code? Open in Web Editor NEW
4.0 8.0 0.0 85.98 MB

Web Map for exploring the history of Texas lakes

Home Page: https://lake-gallery.tnris.org/

License: MIT License

Makefile 0.09% Python 11.93% CSS 11.58% HTML 6.70% JavaScript 69.41% Shell 0.17% Dockerfile 0.12%
django python3 tnris twdb tnris-is texas lakes water javascript texas-lakes

lake-gallery's Introduction

Texas Lake Gallery

Web Map for exploring the history of Texas lakes

cd ./lakegallery as all commands are run from the ~/lake-gallery/lakegallery/ directory

Setup

Built with:

  • Python 3.5 (virtual environment suggested)
  • PostgreSQL 9.5.2
    • Amazon RDS Instance
  • GDAL & GDAL Python & GDAL Devel
  • Django
  • For data scripts, you probably want to use some form of python virtual env manager to maintain an isolated environment. A good run-down of the options can be found in The Hitchiker's Guide to Python. A recommended setup is virtualenv + virtualenvwrapper. Anaconda is an alternative but it has not been successfully tested.
  1. Enable your virtual environment. Example- workon lakegallery (for virtualenv wrapper)
  2. Upgrade pip using pip install --upgrade pip
  3. install python requirements pip install -r requirements.txt
  4. cd into the secrets folder of the repo cd ./lakegallery/lakegallery/secrets/
  5. place a copy vault-password.txt into the secrets folder of the repo (You might need to change spaces to newlines) and run make pull-secrets

or

  1. make a copy of the set_env-SAMPLE.sh, remove the '-SAMPLE' from the name, and manually fill in the values. Then run . set_env.sh from said secrets folder

You will need to use your configured AWS CLI when working locally. If not already set up, you will need to install the AWS CLI and configure it with an access key and secret key.

Develop

  1. Run the app:

run make run-dev to run the app locally and reference local static files. Will be available at localhost:8000. Media files will still be referenced from the production S3 bucket.

or

run make run-dev-local to run the app locally and reference local static files if API (api.tnris.org) is already running locally. Will be available at localhost:8030. Media files will still be referenced from the production S3 bucket. This command is for testing contact forms since they use the API.

  1. run make run-tests to run the unit tests for the map application

Local Production Build

In production, the app pulls/references all static files for all apps from the configured S3 bucket. Run Deployment Prep section's Step 1 to upload/push local static files into S3. VERY DANGEROUS if app is currently deployed as you will be overwriting the production static files!

  1. run make run-prod to run the app locally and reference prod s3 static files. Will be available at localhost:8000.

Deployment Prep

  1. run make push-static to compile all static files and overwrite those in S3. VERY DANGEROUS if app is currently deployed as you will be overwriting the production static files!
  2. pip freeze > requirements.txt to save dependencies
  3. head over to the deployments repo to execute the actual application deployment

Notes

lake-gallery's People

Contributors

dependabot[bot] avatar jwhaney avatar pyup-bot avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lake-gallery's Issues

Modal cuts off at bottom on super wider screen

Intro modal seems to cut off on a super wide screen (it is fine on smaller ones).
WIthin devtools, disabling the .modal-body max-height: 90% for large screens seems to take care of it. probably related to the height-to-width ratio?

screenshot from 2018-02-09 10-33-35

Add point symbols to display lakes at statewide level

Add point symbology over center of for each reservoir. Points will be regular point symbology, blue in color (Hex color #F29D27, polygon and points should be the same blue), scalable and if possible, we would like aggregated points to be proportional. When a user clicks a point or polygon, lakes’ name will appear.

Change time slider default to 'Current' and re-order slider array

Via Friday 5/25 Lake Gallery meeting/discussion.

  • change the label 'OFF' to 'Current' for Google imagery WMTS on historical imagery slider
  • move 'Current' to far right

note: start w/ empty array, populate each lakes historical years available, end with 'Current' and default slider on current's index.

Dark mode enhancement

Potential future enhancement ---> Dark Mode

See color codes in mockup image below

image

Custom Logo and Lake symbol

these are good starting points, ill come up with some ideas

-chris

From: Chelsea Sidenblad [email protected]
Date: Tuesday, January 8, 2019 at 11:01 AM
To: Chris Ledesma [email protected]
Cc: Lauren Kirk [email protected]
Subject: Custom Logo and Symbol for Lake Gallery

Hey Chris,

I was hoping we could get your help with creating a custom logo and a ‘lake’ symbol to be included in the updated version of the Lake Gallery.

Firstly, we would like to create a custom logo for the Lakes of Texas App (formally known as Lake Gallery, aka Lake Atlas, aka Peter Lakes’ Lakes). We haven’t hammered out anything specific but I was thinking a Texas outline placed behind some blue waves might be simple yet professional looking. I really like the aesthetic of this first example.

Secondly, we would also like to have a ‘lake extent’ symbol created to act as a ‘home button’ for the full lake extent. For this we were thinking something more abstract like a meatball with waves.

These images are just example photos I pulled from google to help piece together the vision, I have them saved here, M:\RDC\Staff\Chelsea\Workflows\RequirementsSnipIts, if you need to access them . Please let me know if you have any questions or if there is anything else I can help do to help the process along.
Thank you for your help,

Chelsea

Remove excess layers from map and from data sources section of About page

Remove all additional layers from Layer Table of Contents (boat ramps, hazards, parks, etc…) Only layers that should be available in TOC are the lake polygon layer, dam points layer, Texas Imagery Service (not selectable but contains link to Texas Imagery Service page), and available historical layers.

Data:
i. https://tnris.org/texas-imagery-service/
ii. Base Imagery: Texas Imagery Service source credit should be listed as such.

Replace Regions dropdown with Home "Texas" icon button

“Texas” button will function as a home button to return user to statewide extent. Could be placed on right hand side of Navigation Bar, replacing “regions” dropdown, or add new button, with state silhouette, just below (+/-) zoom buttons.

Beautiful Soup html tests

when html is more complete/solidified, utilize Beautiful Soup to complete more in-depth HTML element tests

Reservoirs will have a .25 mile buffer; set fixed to extent to that buffer

When a user is viewing a Lake story, the maximum extent for the map will be limited to the .25 mile buffer of the lake polygon. Historical imagery layers can be selected at this scale or zoomed in. User can pan and zoom, but only to this designated extent. If user pans away from or zooms past this extent, historical layers should automatically be turned off.

Update splash screen to "how-to"

"When user first visits site, splash screen appears and shown screenshot of home page and is provided with a short set of instructions for navigating the site."

Labels for lakes will include hover labels and static labels

When a user hovers over a dam point/polygon at any scale larger than 20 km, a hover label should appear to show the lake name(s) represented by that point. Once at 20 km the points symbology disappears, and lakes are represented with blue polygon. At 20 km lake name labels should be static. Would like to keep the same font and color of current labels.

Statewide Map change - lakes to clustered points

Function: cluster lakes at statewide view and at certain zoom level, change points to actual polygon lakes. click a polygon or point to view that lake story.

note: related to issue#33; separating because this functionality change is a larger issue than removing regions.

Add hop-to-image-location lat/long

Add an associated lat/long option for each Story Content image which would be populated with the location the image was taken in reality. Then we can add a 'hop-to' button for those images with a lat/long, when clicked will zoom and center the map to that location.

This might be a larger scale change and require restructuring the handling of images in general with association to Story Content. (Currently, the Story Content form feels cumbersome and adding additional 'photo latitude' and 'photo longitude' fields for every image in that form simply doesn't feel right).
Should images be in a separate table?... if so, how are they strategically and deliberately placed in specific places amongst the story text?

Missing Google Imagery

Google imagery is unable to load all tiles when zoomed to 300m.
At 200m and 500m scale, imagery loads completely. Refreshing page does not resolve issue.
Lake Kurth is an example.
image

Null Statistics Populating

There are two values which contain null statistics that are populating on the Lake Gallery website.
I have only encountered this issue with Lake Kurth so far.
The fields that populate the null values are Full Elevation gal: and Dam width:
I deleted original statistics page, resubmitted with same null values and got the same result.
image

Restructure Overlay Attribution Credits

Currently all overlay data supplied by LCRA and the first round of lakes will all be in Region K with overlay data supplied by LCRA so the layer 'attributes' credit is hard coded for LCRA.

Need to update this to a dynamic system when the lake content expands more statewide (outside Region K) and overlay data is sourced from other entities.

Add historical imagery layers to Layer TOC and remove the time slider

Function: Time slider will no longer appear in the bottom right of page, historical imagery layers will now be in the Layer TOC. We would like to add data.tnris.org links to the historical collections in the TOC. Only one layer may be selected and visible at a time. If historic layer is selected, imagery swiper appears for use.

Feedback or Comment link in About page

add a way for public to submit form for corrections, additional content/text/info, or any other info related to a lake; connect to contact app.

  • allows users to provide suggestions, stories, or questions
  • custom form like texas imagery service?

Google Analytics

hook up app to google analytics to track page views etc for each lake story

Lake dropdown search bar

When enough lakes get enabled, add a 'search' input as the first option in the 'Lakes' header dropdown so that the user doesn't have to scroll.

Remove grey polygons for inactive lakes

Lakes that do not have story content created will not be represented on the map. Only ‘active’ lakes with published stories should be represented with blue pin/polygon.

Double Lake - Single Geometry Standardization

Establish and document how to handle 'double lakes' which are related and connected physically, sharing a single geometry, but have separate statistics & narratives. One good example provided by @csidenblad was Lake Tyler. The number of lakes this issue pertains to is unknown (Lake Tyler may be the only one) but a conclusion as to how to handle this scenario should be agreed upon.
Once established, @adambreznicky can create a Wiki page on this repo for formal reference.

Using the Lake Tyler example, the initial solution is to:

  1. Populate the Story and History for the double lake as a single narrative
  2. Ignore the Statistics form (it is not required)
  3. Utilize an 'Additional Page' for one lake, and a separate 'Additional Page' for the other with each's individual narrative and statistics as part of its' own page

AGO Imagery Service issues - default scale and GET tiles 404 error

I noticed that the 1974 imagery service (coming from AGO?) does not always display at the default scale for Lake Athens and maybe other lakes (seems to vary and may or may not be reproducible according to user's device). If you zoom out one level, it displays. My first guess is that this can be resolved with a slight tweak on ArcGIS Online (which is where I believe it is hosted due to the arcgis.com url). I'm not 100% about that fix though.

Additionally, for other years (1968, 1990, and maybe others according to lake), there are errors in the console that look like the GET request returning a 404 error for some tiles:

image

image

Leaflet Overlays & Historical Images Timing

Very very scarcely and randomly, when loading a lake story the overlays layers (including their control box) don't load and the page needs to be refreshed to load properly. Everything else loads fine when this happens.

It seems to me that it's a timing issue like the map finds the lake extent and begins the zoom-n-center too quickly, disrupting the JS loading the overlays and historical aerials.

I will continue to monitor this and attempt to discover a reproducible trigger.

Add "Acknowledge" section to About page

"Users can view the page to see which entities, and how these entities, have contributed or provided feedback that is used to improve the site. This section should be located below the Data Sources Section."

Update Django version

update django version - probably to 2.0.13; vulnerability says to update to at least v1.11.19.

Decade Overlap

Decade years are overlapping on historical slider when too many years are present.
Lake Athens is an example.
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.