Code Monkey home page Code Monkey logo

seismic-explorer's Introduction

Seismic Explorer

Latest stable version:

https://seismic-explorer.concord.org

Latest development version:

https://seismic-explorer.concord.org/branch/master/index.html

Old versions can be accessed via /version/<tag> path, e.g.:

https://seismic-explorer.concord.org/version/1.1.0/index.html

Configuration

Take a look at the authoring page.

Some options can be set using URL parameters, for example:

Data layer presets:

  1. https://seismic-explorer.concord.org/?exclusiveDataLayers&plateBoundariesAvailable=false&volcanoesAvailable=false&plateMovementAvailable=false
  2. https://seismic-explorer.concord.org/?exclusiveDataLayers&volcanoesAvailable=false&plateMovementAvailable=false
  3. https://seismic-explorer.concord.org/?exclusiveDataLayers&volcanoesAvailable=false&volcanoesVisible&plateMovementAvailable=false
  4. https://seismic-explorer.concord.org/?exclusiveDataLayers
  5. https://seismic-explorer.concord.org/
  6. https://seismic-explorer.concord.org/?exclusiveDataLayers&plateBoundariesAvailable=false&earthquakesAvailable=false&earthquakesVisible=false&volcanoesVisible&plateMovementAvailable=false
  7. https://seismic-explorer.concord.org/?plateBoundariesAvailable=false&volcanoesVisible&plateMovementAvailable=false
  8. https://seismic-explorer.concord.org/?volcanoesVisible&plateMovementAvailable=false
  9. https://seismic-explorer.concord.org/?plateBoundariesAvailable=false&earthquakesAvailable=false&earthquakesVisible=false&volcanoesVisible&plateMovementAvailable=false
  10. https://seismic-explorer.concord.org/?plateBoundariesVisible&volcanoesVisible&plateMovementVisible

Development

First, you need to make sure that webpack is installed and all the NPM packages required by this project are available:

npm install -g webpack
npm install

Then you can build the project files using:

webpack

or start webpack dev server:

npm install -g webpack-dev-server
webpack-dev-server

and open http://localhost:8080/ or http://localhost:8080/webpack-dev-server/ (auto-reload after each code change).

The back-end API is maintained separately here: https://github.com/concord-consortium/seismic-explorer-api

Frameworks, conventions

This app is built using React, Redux and ImmutableJS. If you are not familiar with one of these, take a look at this great tutorial. It also uses lots of ES6 syntax, so it might be good to review it first. Semicolons are discussable, but I've decided to follow Redux examples style.

Some things that may be confusing when you start working with Redux (or at least they had been confusing for me):

  • Should I create component or container? A good article and the most important part:

When you notice that some components don’t use the props they receive but merely forward them down and you have to rewire all those intermediate components any time the children need more data, it’s a good time to introduce some container components. This way you can get the data and the behavior props to the leaf components without burdening the unrelated components in the middle of the tree.

  • Is it okay to still use React's state? I think so, and so does Redux's author.

Additional, useful resources:

CSS styles

  • Browser specific prefixes are not necessary, as this project uses autoprefixer, which will add them automatically.
  • Webpack parses URLs in CSS too, so it will either copy resources automatically to /dist or inline them in CSS file. That applies to images and fonts (take a look at webpack config).
  • All the styles are included by related components in JS files. Please make sure that those styles are scoped to the top-level component class, so we don't pollute the whole page. It's not very important right now, but might become important if this page becomes part of the larger UI. And I believe it's a good practice anyway.
  • I would try to make sure that each component specifies all its necessary styles to look reasonably good and it doesn't depend on styles defined somewhere else (e.g. in parent components). Parent components or global styles could be used to theme components, but they should work just fine without them too.

License

MIT

seismic-explorer's People

Contributors

pjanik avatar dstrawberrygirl avatar blarfnip avatar spryputniewicz avatar ddamelin avatar 433eros avatar

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.