Skip to content

Commit

Permalink
Merge branch 'release-0.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Levia committed Dec 5, 2018
2 parents c1f8359 + 40a5a8f commit f88bbc9
Show file tree
Hide file tree
Showing 112 changed files with 4,240 additions and 347 deletions.
Binary file removed .DS_Store
Binary file not shown.
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
MAPBOX_TOKEN=XXXXXXXXXX
CARTO_USERNAME=XXXXXXXXXX
WDPA_POLY_TABLE=XXXXXXXXXX
WDPA_POINT_TABLE=XXXXXXXXXX
CARTO_API_KEY=XXXXXXXXXX
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@
yarn-debug.log*
.yarn-integrity

.DS_Store
**/.DS_Store
.DS_Store

.env
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## 0.0.1

**Ocean+ Habitats first release**

* Full user journey implementation
* Dyanimic charts
* Mapbox map with WDPA Carto layer and ArcGIS habitats layers
* Import static stats from file
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ git_source(:github) do |repo_name|
"https://github.com/#{repo_name}.git"
end


# prefix rails c commands with ap for pretty results
gem 'awesome_print'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.5'
# Use postgresql as the database for Active Record
Expand Down Expand Up @@ -38,6 +39,7 @@ gem 'jbuilder', '~> 2.5'

gem 'dotenv-rails', '~> 2.2', '>= 2.2.1'

gem 'httparty', '~> 0.16.2'

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
Expand Down
6 changes: 6 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ GEM
airbrussh (1.3.0)
sshkit (>= 1.6.1, != 1.7.0)
arel (8.0.0)
awesome_print (1.8.0)
bindex (0.5.0)
builder (3.2.3)
byebug (10.0.2)
Expand Down Expand Up @@ -89,6 +90,8 @@ GEM
ffi (1.9.25)
globalid (0.4.1)
activesupport (>= 4.2.0)
httparty (0.16.2)
multi_xml (>= 0.5.2)
i18n (1.1.0)
concurrent-ruby (~> 1.0)
jbuilder (2.7.0)
Expand All @@ -108,6 +111,7 @@ GEM
mini_portile2 (2.3.0)
minitest (5.11.3)
multi_json (1.13.1)
multi_xml (0.6.0)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (5.0.2)
Expand Down Expand Up @@ -209,6 +213,7 @@ PLATFORMS
ruby

DEPENDENCIES
awesome_print
byebug
capistrano (~> 3.11.0)
capistrano-bundler (~> 1.1)
Expand All @@ -218,6 +223,7 @@ DEPENDENCIES
capybara (~> 2.13)
coffee-rails (~> 4.2)
dotenv-rails (~> 2.2, >= 2.2.1)
httparty (~> 0.16.2)
jbuilder (~> 2.5)
listen (>= 3.0.5, < 3.2)
pg (>= 0.18, < 2.0)
Expand Down
36 changes: 21 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
# README
# Ocean+ Habitats

This README would normally document whatever steps are necessary to get the
application up and running.
## Setup

Things you may want to cover:
* Install and configure dependencies
- `bundle install`
- `yarn install`
- Please ask for latest `.env` file

* Ruby version
* Setup database
- `bundle exec rake db:drop db:create db:migrate`
- `bundle exec rake db:seed`

* System dependencies
* Import the static CSV data
- `bundle exec rake import:staticstats`

* Configuration
## Data

* Database creation
We are still trying to see if it is feasible to generate map tiles and data dynamically using Carto and in the meantime we are using static data.

* Database initialization
Data is fetched from CartoDB using the `Carto` module defined in `lib/modules`.
Some details about the layers in Carto are in `config/habitats.yml`.

* How to run the test suite
At the moment static data is provided related to the protected areas coverage.
Ideally, the protected areas coverage data should always be dynamically generated, as this depends on the WDPA release
which is updated every month.

* Services (job queues, cache servers, search engines, etc.)

* Deployment instructions

* ...
Habitats data changes less often, so the coverage calculations are stored in the `Habitat` object.
When the data changes, a new calculation process should be performed using the `calculate_global_coverage` method in
the `Habiat` model.
Binary file modified app/assets/.DS_Store
Binary file not shown.
Binary file removed app/assets/images/.DS_Store
Binary file not shown.
Binary file added app/assets/images/hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/assets/images/icons/aichi-10.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/assets/images/icons/aichi-11.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/assets/images/icons/aichi-14.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f88bbc9

Please sign in to comment.