├── apps ├── api │ ├── admin.py │ ├── models.py │ ├── __init__.py │ ├── tests │ │ ├── __init__.py │ │ └── test_api.py │ ├── apps.py │ ├── serializers.py │ ├── urls.py │ ├── views.py │ └── utils.py └── map │ ├── admin.py │ ├── models.py │ ├── __init__.py │ ├── apps.py │ ├── views.py │ ├── urls.py │ └── tests.py ├── core ├── __init__.py ├── urls.py ├── wsgi.py └── settings.py ├── requirements-dev.txt ├── setup.cfg ├── geolocations_service └── service │ ├── brumadinho │ ├── admin.py │ ├── tests.py │ ├── __init__.py │ ├── migrations │ │ ├── __init__.py │ │ ├── 0003_geolocation_radius.py │ │ ├── 0004_auto_20190130_2213.py │ │ ├── 0001_initial.py │ │ └── 0002_auto_20190129_2219.py │ ├── apps.py │ ├── views.py │ ├── serializers.py │ ├── urls.py │ └── models.py │ ├── service │ ├── __init__.py │ ├── requirements.txt │ ├── wsgi.py │ ├── urls.py │ ├── settings.py │ └── original_settings.py │ ├── Makefile │ ├── .gitignore │ ├── manage.py │ └── README.md ├── .DS_Store ├── favicon.ico ├── .env.template ├── brumadinho_heatmap ├── .gitignore ├── public │ ├── js │ │ ├── .DS_Store │ │ └── map.js │ ├── src │ │ ├── imgs │ │ │ ├── .DS_Store │ │ │ └── placeholder.svg │ │ └── favicon_package_v0.16 │ │ │ ├── .DS_Store │ │ │ ├── favicon.ico │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── mstile-70x70.png │ │ │ ├── apple-touch-icon.png │ │ │ ├── mstile-144x144.png │ │ │ ├── mstile-150x150.png │ │ │ ├── mstile-310x150.png │ │ │ ├── mstile-310x310.png │ │ │ ├── android-chrome-192x192.png │ │ │ ├── android-chrome-512x512.png │ │ │ ├── browserconfig.xml │ │ │ ├── site.webmanifest │ │ │ └── safari-pinned-tab.svg │ ├── 404.html │ └── index.html ├── README.md ├── misc │ ├── geojson.py │ ├── input.json │ └── coords.geojson └── LICENSE ├── requirements.txt ├── Makefile ├── static ├── styles │ └── style.css ├── js │ └── script.js └── geodata │ └── hot_area.json ├── manage.py ├── DATA_SOURCES.md ├── LICENSE ├── .gitignore ├── CONTRIBUTING.md ├── templates └── index.html └── README.md /apps/api/admin.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/api/models.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/map/admin.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/map/models.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/api/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/map/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/api/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /requirements-dev.txt: -------------------------------------------------------------------------------- 1 | flake8 2 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [flake8] 2 | ignore = E501 3 | -------------------------------------------------------------------------------- /geolocations_service/service/brumadinho/admin.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /geolocations_service/service/brumadinho/tests.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /geolocations_service/service/service/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /geolocations_service/service/brumadinho/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /geolocations_service/service/brumadinho/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sosbrumadinho/brumadinho_location/HEAD/.DS_Store -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sosbrumadinho/brumadinho_location/HEAD/favicon.ico -------------------------------------------------------------------------------- /geolocations_service/service/Makefile: -------------------------------------------------------------------------------- 1 | run: 2 | python manage.py runserver 0.0.0.0:5002 3 | -------------------------------------------------------------------------------- /.env.template: -------------------------------------------------------------------------------- 1 | DEBUG=TRUE 2 | SECRET_KEY=$fwxolrr&*zds4jlvv74%hquvjvq%!&rad=)g5*=ra5-0 3 | ALLOWED_HOSTS=127.0.0.1 -------------------------------------------------------------------------------- /apps/api/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ApiConfig(AppConfig): 5 | name = 'api' 6 | -------------------------------------------------------------------------------- /apps/map/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class MapConfig(AppConfig): 5 | name = 'map' 6 | -------------------------------------------------------------------------------- /geolocations_service/service/service/requirements.txt: -------------------------------------------------------------------------------- 1 | django==2.1.5 2 | djangorestframework==3.9.0 3 | python-decouple==3.1 4 | -------------------------------------------------------------------------------- /brumadinho_heatmap/.gitignore: -------------------------------------------------------------------------------- 1 | brumadinho_heatmap/.DS_Store 2 | brumadinho_heatmap/src/.DS_Store 3 | .firebaserc 4 | firebase.json 5 | .firebase -------------------------------------------------------------------------------- /brumadinho_heatmap/public/js/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sosbrumadinho/brumadinho_location/HEAD/brumadinho_heatmap/public/js/.DS_Store -------------------------------------------------------------------------------- /brumadinho_heatmap/public/src/imgs/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sosbrumadinho/brumadinho_location/HEAD/brumadinho_heatmap/public/src/imgs/.DS_Store -------------------------------------------------------------------------------- /geolocations_service/service/brumadinho/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class BrumadinhoConfig(AppConfig): 5 | name = 'brumadinho' 6 | -------------------------------------------------------------------------------- /apps/map/views.py: -------------------------------------------------------------------------------- 1 | from django.views.generic import TemplateView 2 | 3 | 4 | class ViewMap(TemplateView): 5 | template_name = 'index.html' 6 | 7 | 8 | viewmap = ViewMap.as_view() 9 | -------------------------------------------------------------------------------- /brumadinho_heatmap/public/src/favicon_package_v0.16/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sosbrumadinho/brumadinho_location/HEAD/brumadinho_heatmap/public/src/favicon_package_v0.16/.DS_Store -------------------------------------------------------------------------------- /brumadinho_heatmap/public/src/favicon_package_v0.16/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sosbrumadinho/brumadinho_location/HEAD/brumadinho_heatmap/public/src/favicon_package_v0.16/favicon.ico -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Django==2.1.5 2 | django-rest-framework==0.1.0 3 | djangorestframework==3.9.1 4 | googlemaps==3.0.2 5 | numpy==1.16.0 6 | python-decouple==3.1 7 | pytz==2018.9 8 | scipy==1.2.0 9 | -------------------------------------------------------------------------------- /apps/map/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from apps.map.views import viewmap 4 | 5 | app_name = 'map' 6 | 7 | urlpatterns = [ 8 | path('', viewmap, name='map'), 9 | ] 10 | -------------------------------------------------------------------------------- /brumadinho_heatmap/public/src/favicon_package_v0.16/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sosbrumadinho/brumadinho_location/HEAD/brumadinho_heatmap/public/src/favicon_package_v0.16/favicon-16x16.png -------------------------------------------------------------------------------- /brumadinho_heatmap/public/src/favicon_package_v0.16/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sosbrumadinho/brumadinho_location/HEAD/brumadinho_heatmap/public/src/favicon_package_v0.16/favicon-32x32.png -------------------------------------------------------------------------------- /brumadinho_heatmap/public/src/favicon_package_v0.16/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sosbrumadinho/brumadinho_location/HEAD/brumadinho_heatmap/public/src/favicon_package_v0.16/mstile-70x70.png -------------------------------------------------------------------------------- /apps/api/serializers.py: -------------------------------------------------------------------------------- 1 | from rest_framework import serializers 2 | 3 | 4 | class CoordinateSerializer(serializers.Serializer): 5 | lat = serializers.FloatField() 6 | lng = serializers.FloatField() 7 | -------------------------------------------------------------------------------- /brumadinho_heatmap/public/src/favicon_package_v0.16/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sosbrumadinho/brumadinho_location/HEAD/brumadinho_heatmap/public/src/favicon_package_v0.16/apple-touch-icon.png -------------------------------------------------------------------------------- /brumadinho_heatmap/public/src/favicon_package_v0.16/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sosbrumadinho/brumadinho_location/HEAD/brumadinho_heatmap/public/src/favicon_package_v0.16/mstile-144x144.png -------------------------------------------------------------------------------- /brumadinho_heatmap/public/src/favicon_package_v0.16/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sosbrumadinho/brumadinho_location/HEAD/brumadinho_heatmap/public/src/favicon_package_v0.16/mstile-150x150.png -------------------------------------------------------------------------------- /brumadinho_heatmap/public/src/favicon_package_v0.16/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sosbrumadinho/brumadinho_location/HEAD/brumadinho_heatmap/public/src/favicon_package_v0.16/mstile-310x150.png -------------------------------------------------------------------------------- /brumadinho_heatmap/public/src/favicon_package_v0.16/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sosbrumadinho/brumadinho_location/HEAD/brumadinho_heatmap/public/src/favicon_package_v0.16/mstile-310x310.png -------------------------------------------------------------------------------- /brumadinho_heatmap/public/src/favicon_package_v0.16/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sosbrumadinho/brumadinho_location/HEAD/brumadinho_heatmap/public/src/favicon_package_v0.16/android-chrome-192x192.png -------------------------------------------------------------------------------- /brumadinho_heatmap/public/src/favicon_package_v0.16/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sosbrumadinho/brumadinho_location/HEAD/brumadinho_heatmap/public/src/favicon_package_v0.16/android-chrome-512x512.png -------------------------------------------------------------------------------- /apps/api/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from apps.api.views import calculatecoordinate 4 | 5 | app_name = 'api' 6 | 7 | urlpatterns = [ 8 | path('calculate', calculatecoordinate, name='coordinate_calculate'), 9 | ] 10 | -------------------------------------------------------------------------------- /core/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path, include 2 | 3 | urlpatterns = [ 4 | # path('admin/', admin.site.urls), 5 | path('api/', include('apps.api.urls', namespace='api')), 6 | path('', include('apps.map.urls', namespace='map')) 7 | ] 8 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | clean: 2 | @find . -name "*.pyc" | xargs rm -rf 3 | @find . -name "*.pyo" | xargs rm -rf 4 | @find . -name "__pycache__" -type d | xargs rm -rf 5 | @rm -f *.log 6 | 7 | flake: 8 | flake8 api map core crawler geolocations_service 9 | 10 | lint: flake 11 | -------------------------------------------------------------------------------- /geolocations_service/service/.gitignore: -------------------------------------------------------------------------------- 1 | *.egg-info 2 | *.py[co] 3 | .tox/ 4 | __pycache__ 5 | MANIFEST 6 | node_modules 7 | tests/coverage_html/ 8 | tests/.coverage 9 | build/ 10 | dist/ 11 | tests/report/ 12 | .idea 13 | *.ini 14 | *venv* 15 | .env 16 | *.sqlite3 17 | .vscode -------------------------------------------------------------------------------- /brumadinho_heatmap/public/src/favicon_package_v0.16/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #da532c 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /apps/map/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase, Client 2 | from django.urls import reverse 3 | 4 | 5 | class TestFrontEnd(TestCase): 6 | def setUp(self): 7 | self.c = Client() 8 | self.response = self.c.get(reverse('map:map')) 9 | 10 | def test_endpoint_result(self): 11 | self.assertEqual(self.response.status_code, 200) 12 | 13 | def test_template_used(self): 14 | self.assertTemplateUsed('index.html') 15 | -------------------------------------------------------------------------------- /core/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for core project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /geolocations_service/service/service/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for service project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'service.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /static/styles/style.css: -------------------------------------------------------------------------------- 1 | [v-cloak] { 2 | display: none; 3 | } 4 | 5 | #map { 6 | width: 100%; 7 | height: 100%; 8 | } 9 | 10 | .container-fluid { 11 | min-height: 100vh; 12 | } 13 | 14 | .repo { 15 | position: fixed; 16 | left: 10px; 17 | bottom: 10px; 18 | background: rgba(255, 255, 255, 0.9); 19 | border: 1px solid #CCC; 20 | border-radius: 3px; 21 | z-index: 1000; 22 | padding: 4px 8px; 23 | } 24 | 25 | #map { 26 | min-height: 80vh; 27 | } 28 | -------------------------------------------------------------------------------- /brumadinho_heatmap/public/src/favicon_package_v0.16/site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "", 3 | "short_name": "", 4 | "icons": [ 5 | { 6 | "src": "/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "/android-chrome-512x512.png", 12 | "sizes": "512x512", 13 | "type": "image/png" 14 | } 15 | ], 16 | "theme_color": "#ffffff", 17 | "background_color": "#ffffff", 18 | "display": "standalone" 19 | } 20 | -------------------------------------------------------------------------------- /geolocations_service/service/brumadinho/migrations/0003_geolocation_radius.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.1.3 on 2019-01-30 22:07 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('brumadinho', '0002_auto_20190129_2219'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='geolocation', 15 | name='radius', 16 | field=models.FloatField(default=1, help_text='Radial área range.'), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == '__main__': 6 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') 7 | try: 8 | from django.core.management import execute_from_command_line 9 | except ImportError as exc: 10 | raise ImportError( 11 | "Couldn't import Django. Are you sure it's installed and " 12 | "available on your PYTHONPATH environment variable? Did you " 13 | "forget to activate a virtual environment?" 14 | ) from exc 15 | execute_from_command_line(sys.argv) 16 | -------------------------------------------------------------------------------- /geolocations_service/service/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == '__main__': 6 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'service.settings') 7 | try: 8 | from django.core.management import execute_from_command_line 9 | except ImportError as exc: 10 | raise ImportError( 11 | "Couldn't import Django. Are you sure it's installed and " 12 | "available on your PYTHONPATH environment variable? Did you " 13 | "forget to activate a virtual environment?" 14 | ) from exc 15 | execute_from_command_line(sys.argv) 16 | -------------------------------------------------------------------------------- /brumadinho_heatmap/README.md: -------------------------------------------------------------------------------- 1 | # Brumadinho Heatmap Location 2 | This maps plots s GeoJSON file in a heatmap Layer. The map that I use is MapBox. 3 | 4 | 5 | # To Do 6 | 1- The next step is get the places that were visited from the Brumadinho API, I'm just waiting for the response of the API's developer 7 | 2- Make an option to just plot the map of a specific day - save everyday a GeoJSON File of the areas that were visited in the day, and make an option Dropdown - FOR THE FUTURE 8 | 9 | ## Contributing 10 | Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. 11 | 12 | ## License 13 | [MIT](https://choosealicense.com/licenses/mit/) -------------------------------------------------------------------------------- /geolocations_service/service/service/urls.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from django.urls import path 3 | 4 | from django.conf.urls import url, include 5 | from rest_framework import routers 6 | 7 | from brumadinho import views 8 | 9 | 10 | router = routers.DefaultRouter() 11 | router.register(r'geolocations', views.GeolocationViewSet) 12 | router.register(r'visited_locations', views.VisitedLocationViewSet) 13 | router.register(r'found_people', views.FoundPeopleViewSet) 14 | 15 | urlpatterns = [ 16 | # path('admin/', admin.site.urls), 17 | url(r'api/', include(router.urls)), 18 | # url(r'ˆapi-auth/', include('rest_framework.urls', namespace='rest_framework')) 19 | ] 20 | -------------------------------------------------------------------------------- /brumadinho_heatmap/misc/geojson.py: -------------------------------------------------------------------------------- 1 | #! usr/bin/env python 2 | 3 | from sys import argv 4 | from os.path import exists 5 | import json 6 | 7 | script, in_file, out_file = argv 8 | 9 | with open(in_file) as f: 10 | data = json.load(f) 11 | 12 | new_data = [] 13 | for row in data['results']: 14 | new_data.append(row) 15 | 16 | geojson = { 17 | "type": "FeatureCollection", 18 | "features": [{ 19 | "type": "Feature", 20 | "properties":{}, 21 | "geometry": { 22 | "type": "Point", 23 | "coordinates": [ 24 | d['longitude'], 25 | d['latitude'] 26 | ] 27 | } 28 | } for d in new_data] 29 | 30 | } 31 | 32 | 33 | output = open(out_file, 'w') 34 | json.dump(geojson, output) 35 | 36 | print geojson -------------------------------------------------------------------------------- /geolocations_service/service/brumadinho/migrations/0004_auto_20190130_2213.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.1.3 on 2019-01-30 22:13 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('brumadinho', '0003_geolocation_radius'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='geolocation', 15 | name='radius', 16 | ), 17 | migrations.AddField( 18 | model_name='visitedlocation', 19 | name='observations', 20 | field=models.CharField(blank=True, help_text='Observations', max_length=2000, null=True), 21 | ), 22 | migrations.AddField( 23 | model_name='visitedlocation', 24 | name='radius', 25 | field=models.FloatField(default=1, help_text='Radial área range of search.'), 26 | ), 27 | ] 28 | -------------------------------------------------------------------------------- /DATA_SOURCES.md: -------------------------------------------------------------------------------- 1 | # Catalog of Data Sources 2 | 3 | ## People 4 | 5 | Links with information of deceased or missing people : 6 | 7 | * [Google Docs 1](https://docs.google.com/spreadsheets/d/120JXqEF8Mil7Ex_ty9tbdfNAYqZpYyJ7PIYu46teUJY/edit#gid=0) - [1](https://github.com/dieegom/brumadinho_location/issues/8#issuecomment-458161520) 8 | * [Google Docs 2](https://docs.google.com/spreadsheets/d/1M2AxPtzonn2Q4QWPdiW5UE8DeylO_tTGgoJ9Vkitf4E/edit#gid=0) - [2](https://github.com/dieegom/brumadinho_location/issues/8#issuecomment-458168314) 9 | * [Vale - Pessoas sem contato](http://brumadinho.vale.com/listagem-pessoas-sem-contato.html) 10 | * [Vale - Óbitos identificados](http://brumadinho.vale.com/obitos-identificados.html) 11 | 12 | ## Maps 13 | 14 | * [Brumadinho MUD Area](https://overpass-turbo.eu/s/FBC) 15 | 16 | ## News 17 | 18 | * [G1](https://g1.globo.com/busca/?q=brumadinho) 19 | * [Vale](http://brumadinho.vale.com/todas-as-noticias.html) 20 | * [Google](https://news.google.com/topics/CAAqKAgKIiJDQkFTRXdvS0wyMHZNRE5vTW10ek5SSUZjSFF0UWxJb0FBUAE) -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 dieegom 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /brumadinho_heatmap/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 José Bezerra 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /apps/api/views.py: -------------------------------------------------------------------------------- 1 | import googlemaps 2 | from rest_framework import status 3 | from rest_framework.response import Response 4 | from rest_framework.views import APIView 5 | from django.http import HttpResponse 6 | from apps.api.serializers import CoordinateSerializer 7 | from apps.api.utils import Position 8 | 9 | 10 | from django.conf import settings 11 | 12 | 13 | class CalculateCoordinate(APIView): 14 | """ 15 | View to return possible victims coordinates 16 | """ 17 | 18 | def get(self, request): 19 | return Response(status=status.HTTP_405_METHOD_NOT_ALLOWED) 20 | 21 | def post(self, request): 22 | serializer = CoordinateSerializer(request.data) 23 | lat, lng = serializer.data['lat'], serializer.data['lng'] 24 | vector_position = Position(lat, lng).calc_vector() 25 | return Response(vector_position, status=status.HTTP_200_OK) 26 | 27 | 28 | def get_elevation(lat, lng): 29 | gmaps = googlemaps.Client(key=settings.GMAPS_API_KEY) 30 | geocode_result = gmaps.elevation((lat, lng)) 31 | return geocode_result[0]['elevation'] 32 | 33 | 34 | calculatecoordinate = CalculateCoordinate.as_view() 35 | 36 | -------------------------------------------------------------------------------- /geolocations_service/service/brumadinho/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.1.3 on 2019-01-29 02:11 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | initial = True 10 | 11 | dependencies = [ 12 | ] 13 | 14 | operations = [ 15 | migrations.CreateModel( 16 | name='Geolocation', 17 | fields=[ 18 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 19 | ('latitude', models.FloatField()), 20 | ('longitude', models.FloatField()), 21 | ], 22 | ), 23 | migrations.CreateModel( 24 | name='VisitedLocation', 25 | fields=[ 26 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 27 | ('reference', models.CharField(max_length=100)), 28 | ('location', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='brumadinho.Geolocation')), 29 | ], 30 | ), 31 | ] 32 | -------------------------------------------------------------------------------- /geolocations_service/service/brumadinho/views.py: -------------------------------------------------------------------------------- 1 | # from django.contrib.auth.models import Group 2 | from brumadinho.models import Geolocation, VisitedLocation, FoundPeople 3 | from rest_framework import viewsets 4 | from brumadinho.serializers import GeolocationSerializer, VisitedLocationSerializer, FoundPeopleSerializer 5 | 6 | from rest_framework.decorators import api_view 7 | from rest_framework.response import Response 8 | from rest_framework.reverse import reverse 9 | 10 | 11 | @api_view(['GET']) 12 | def api_root(request, format=None): 13 | return Response({ 14 | # 'users': reverse('user-list', request=request, format=format), 15 | 'geolocations': reverse('geolocation-list', request=request, format=format) 16 | }) 17 | 18 | 19 | class GeolocationViewSet(viewsets.ModelViewSet): 20 | queryset = Geolocation.objects.all() 21 | serializer_class = GeolocationSerializer 22 | 23 | 24 | class VisitedLocationViewSet(viewsets.ModelViewSet): 25 | queryset = VisitedLocation.objects.all() 26 | serializer_class = VisitedLocationSerializer 27 | 28 | 29 | class FoundPeopleViewSet(viewsets.ModelViewSet): 30 | queryset = FoundPeople.objects.all() 31 | serializer_class = FoundPeopleSerializer -------------------------------------------------------------------------------- /apps/api/utils.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from scipy import interpolate 3 | 4 | x = np.linspace(-20.139558, -20.115769, 1000) 5 | y = np.linspace(-44.141856, -44.099738, 1000) 6 | z = np.array([100.0, 50.0, 50.0, 25, 100.0]) 7 | dam = [-20.119026, -44.119985] 8 | X, Y = np.meshgrid(x, y) 9 | npts = 5 10 | px, py = np.random.choice(x, npts), np.random.choice(y, npts) 11 | 12 | x_points = np.array([-20.115769, -20.115769, -20.129558, -20.129558]) 13 | y_points = np.array([-44.141856, -44.119738, -44.141856, -44.119738]) 14 | 15 | z1 = np.array([np.random.random() * 100 for x, y in zip(x_points, 16 | y_points)]) 17 | z2 = interpolate.griddata((x_points, y_points), z1, (X, Y), 18 | method='nearest') 19 | # print(z2) 20 | 21 | mapa = [(x, y, z) for x, y, z in zip(X, Y, z2)] 22 | 23 | 24 | class Position: 25 | def __init__(self, lat, lng): 26 | self.lat = lat 27 | self.lng = lng 28 | 29 | def calc_vector(self): 30 | v_pos_x, v_pos_y = (self.lat - dam[0], self.lng - dam[1]) 31 | xf = float('%.6f' % (self.lat + v_pos_x)) 32 | yf = float('%.6f' % (self.lng + v_pos_y)) 33 | return {'lat': xf, 'lng': yf} 34 | -------------------------------------------------------------------------------- /apps/api/tests/test_api.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | from django.urls import reverse 3 | from rest_framework import status 4 | from rest_framework.test import APIClient 5 | 6 | 7 | class ApiViewTestCase(TestCase): 8 | """Test suite for the api views.""" 9 | 10 | def setUp(self): 11 | """Define the test client and other test variables.""" 12 | 13 | self.client = APIClient() 14 | 15 | self.position_data = {'lat': -20.135896, 'lng': -44.123509} 16 | self.expected_result = {'lat': -20.152766, 'lng': -44.127033} 17 | self.response = self.client.post( 18 | reverse('api:coordinate_calculate'), 19 | self.position_data, 20 | format="json") 21 | 22 | def test_api_can_return_response(self): 23 | """Test the api has response capability.""" 24 | self.assertEqual(self.response.status_code, status.HTTP_200_OK) 25 | 26 | def test_get_not_allowed(self): 27 | """Test that the api don't return get method""" 28 | new_client = APIClient() 29 | res = new_client.get( 30 | reverse('api:coordinate_calculate'), format="json") 31 | self.assertEqual(res.status_code, status.HTTP_405_METHOD_NOT_ALLOWED) 32 | 33 | def test_api_return_expected_values(self): 34 | """Test the api can return expected json data.""" 35 | 36 | self.assertEquals(self.response.data, self.expected_result) 37 | -------------------------------------------------------------------------------- /brumadinho_heatmap/misc/input.json: -------------------------------------------------------------------------------- 1 | { 2 | "results": [ 3 | { 4 | "id": 7, 5 | "latitude": -20.1255982, 6 | "longitude": -44.1264581 7 | }, 8 | { 9 | "id": 8, 10 | "latitude": -20.1355982, 11 | "longitude": -44.1764581 12 | }, 13 | { 14 | "id": 9, 15 | "latitude": -20.4355982, 16 | "longitude": -44.8764581 17 | }, 18 | { 19 | "id": 10, 20 | "latitude": -20.1355982, 21 | "longitude": -44.1264581 22 | }, 23 | { 24 | "id": 11, 25 | "latitude": -20.1455982, 26 | "longitude": -44.1264581 27 | }, 28 | { 29 | "id": 12, 30 | "latitude": -20.1555982, 31 | "longitude": -44.1264581 32 | }, 33 | { 34 | "id": 13, 35 | "latitude": -20.1655982, 36 | "longitude": -44.1264581 37 | }, 38 | { 39 | "id": 14, 40 | "latitude": -20.1755982, 41 | "longitude": -44.1264581 42 | }, 43 | { 44 | "id": 15, 45 | "latitude": -20.1855982, 46 | "longitude": -44.1264581 47 | }, 48 | { 49 | "id": 16, 50 | "latitude": -20.1955982, 51 | "longitude": -44.1264581 52 | } 53 | ] 54 | } -------------------------------------------------------------------------------- /geolocations_service/service/brumadinho/serializers.py: -------------------------------------------------------------------------------- 1 | # from django.contrib.auth.models import Group 2 | from brumadinho.models import Geolocation, VisitedLocation, FoundPeople 3 | from rest_framework import serializers 4 | 5 | 6 | class GeolocationSerializer(serializers.ModelSerializer): 7 | class Meta: 8 | model = Geolocation 9 | fields = "__all__" 10 | 11 | 12 | class VisitedLocationSerializer(serializers.ModelSerializer): 13 | class Meta: 14 | model = VisitedLocation 15 | fields = "__all__" 16 | 17 | location = GeolocationSerializer( 18 | read_only=True 19 | ) 20 | location_id = serializers.PrimaryKeyRelatedField( 21 | write_only=True, 22 | queryset=Geolocation.objects.all(), 23 | source="location", 24 | help_text="Geoposition ID list." 25 | ) 26 | 27 | def validate_encounter_number(self, number): 28 | return 0 if number < 0 else number 29 | 30 | class FoundPeopleSerializer(serializers.ModelSerializer): 31 | class Meta: 32 | model = FoundPeople 33 | fields = "__all__" 34 | 35 | location = GeolocationSerializer( 36 | read_only=True, 37 | required=False, 38 | allow_null=True 39 | ) 40 | location_id = serializers.PrimaryKeyRelatedField( 41 | write_only=True, 42 | queryset=Geolocation.objects.all(), 43 | help_text="Geoposition ID list.", 44 | source="location", 45 | required=False, 46 | allow_null=True 47 | ) 48 | -------------------------------------------------------------------------------- /brumadinho_heatmap/public/js/map.js: -------------------------------------------------------------------------------- 1 | var mapData; 2 | 3 | mapboxgl.accessToken = 'pk.eyJ1Ijoiam9zZWJlemVycmEiLCJhIjoiY2pyazVtdDA5MDE5czQ0cmdsNnFjZjVsdiJ9.g3x0Z17jXKFjfYEc2ivxsg'; 4 | 5 | var request = new XMLHttpRequest(); 6 | 7 | request.open('GET', 'https://brumadinho-api.herokuapp.com/api/all_places', true); 8 | 9 | request.onload = function () { 10 | if (request.status >= 200 && request.status < 400) { 11 | mapData = JSON.parse(this.response); 12 | 13 | } else { 14 | console.log('error'); 15 | } 16 | } 17 | 18 | request.send(); 19 | 20 | var map = new mapboxgl.Map({ 21 | container: 'map', 22 | style: 'mapbox://styles/mapbox/satellite-streets-v9', 23 | // Long - Lat 24 | center: [-44.1227885, -20.1214628], 25 | zoom: 14 26 | }); 27 | 28 | map.on('load', function () { 29 | map.addSource('earthquakes', { 30 | "type": "geojson", 31 | // "data": "./misc/coords.geojson" 32 | "data": mapData 33 | }); 34 | 35 | map.addLayer({ 36 | "id": "earthquakes-heat", 37 | "type": "heatmap", 38 | "source": "earthquakes", 39 | "paint": { 40 | 'heatmap-radius': 5, 41 | "heatmap-weight": { 42 | "type": "identity", 43 | "property": "point_count" 44 | } 45 | } 46 | }, 'waterway-label'); 47 | 48 | }); 49 | 50 | map.on('mousemove', function (e) { 51 | let long = e.lngLat.lng 52 | let lat = e.lngLat.lat 53 | document.getElementById('info').innerHTML = "Latitude: "+lat+" Longitude: "+long 54 | }); -------------------------------------------------------------------------------- /geolocations_service/service/brumadinho/urls.py: -------------------------------------------------------------------------------- 1 | from brumadinho.views import GeolocationViewSet, VisitedLocationViewSet, FoundPeopleViewSet 2 | from rest_framework import renderers 3 | from django.urls import path 4 | 5 | from brumadinho.views import GeolocationViewSet, VisitedLocationViewSet, api_root 6 | from rest_framework.urlpatterns import format_suffix_patterns 7 | 8 | 9 | geolocation_list = GeolocationViewSet.as_view({ 10 | 'get': 'list', 11 | 'post': 'create' 12 | }) 13 | 14 | geolocation_detail = GeolocationViewSet.as_view({ 15 | 'get': 'retrieve', 16 | 'put': 'update', 17 | 'patch': 'partial_update', 18 | 'delete': 'destroy' 19 | }) 20 | 21 | visited_location_list = VisitedLocationViewSet.as_view({ 22 | 'get': 'list', 23 | 'post': 'create' 24 | }) 25 | 26 | visited_location_detail = VisitedLocationViewSet.as_view({ 27 | 'get': 'retrieve', 28 | 'put': 'update', 29 | 'patch': 'partial_update', 30 | 'delete': 'destroy' 31 | }) 32 | 33 | found_people_list = FoundPeopleViewSet.as_view({ 34 | 'get': 'list', 35 | 'post': 'create' 36 | }) 37 | 38 | found_people_detail = FoundPeopleViewSet.as_view({ 39 | 'get': 'retrieve', 40 | 'put': 'update', 41 | 'patch': 'partial_update', 42 | 'delete': 'destroy' 43 | }) 44 | 45 | 46 | urlpatterns = format_suffix_patterns([ 47 | path('', api_root), 48 | path('geolocations/', geolocation_list, name="geolocation-list"), 49 | path('visited_locations/', visited_location_list, name="visited_location-list"), 50 | path('found_people/', found_people_list, name="found_people-list"), 51 | ]) 52 | -------------------------------------------------------------------------------- /brumadinho_heatmap/public/src/imgs/placeholder.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 10 | 11 | 12 | 14 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /brumadinho_heatmap/public/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Page Not Found 7 | 8 | 23 | 24 | 25 |
26 |

404

27 |

Page Not Found

28 |

The specified file was not found on this website. Please check the URL for mistakes and try again.

29 |

Why am I seeing this?

30 |

This page was generated by the Firebase Command-Line Interface. To modify it, edit the 404.html file in your project's configured public directory.

31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /brumadinho_heatmap/public/src/favicon_package_v0.16/safari-pinned-tab.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | Created by potrace 1.11, written by Peter Selinger 2001-2013 9 | 10 | 12 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /geolocations_service/service/README.md: -------------------------------------------------------------------------------- 1 | # Português-BR 2 | 3 | ## Descrição 4 | 5 | Este serviço fornece CRUDs para as geolocalizações 6 | 7 | Atualmente conta com três endpoints: 8 | 9 | * `/api/geolocations/` para cadastro e recuperação de posições geográficas contendo latitude e longitude; 10 | 11 | * `/api/visited_locations/` para cadastro e recuperação de posições geográficas ja visitadas; 12 | 13 | * `/api/found_people/` para cadastro e recuperação de pessoas localizadas em uma geolocalização; 14 | 15 | 16 | ## Instalando 17 | 18 | Clone o repositório para um dretório da sua preferencia 19 | 20 | Instale os requerimentos para o servidor funcionar (preferencialmente em um ambiente virtual). 21 | 22 | 23 | ### Desenvolvimento 24 | pip install -r service.requirements.txt 25 | 26 | ### Rode as migrations já existentes. 27 | 28 | python manage.py migrate 29 | 30 | 31 | ## Rodando: 32 | 33 | ### Desenvolvimento 34 | 35 | make run 36 | 37 | Acesse o servidor local em `localhost:5002/api/` 38 | 39 | ## HELP NEEDED 40 | 41 | Tem muita coisa que pode ser feita aqui ainda, toda ajuda é necessária. 42 | 43 | 44 |
45 | 46 | # English 47 | 48 | ## Description 49 | 50 | This service serves CRUD for geoposition data. 51 | 52 | For now it only have three endpoints: 53 | 54 | * `/api/geolocations/` for creating and retrieving of groposition information (latitude and longitude)); 55 | 56 | * `/api/visited_locations/` for creating and retrieving already visited geopositions; 57 | 58 | * `/api/found_people/` for creating and retrieving found people in a geoposition coordinate; 59 | 60 | ## Installing 61 | 62 | Clone repo to a workspace. 63 | 64 | Install requeriments (preferably in a virtual environment) 65 | 66 | ### Development 67 | pip install -r service.requirements.develop.txt 68 | 69 | ### Migrate the database 70 | 71 | python manage.py migrate 72 | 73 | ## Running: 74 | 75 | ### Development 76 | 77 | make run_dev 78 | 79 | Acess local server at `localhost:5002/api/` 80 | 81 | 82 | 83 | ## HELP NEEDED 84 | 85 | There are a lot of work to do here yet, all help is needed. 86 | 87 |
88 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.egg-info 2 | *.py[co] 3 | .tox/ 4 | __pycache__ 5 | MANIFEST 6 | node_modules 7 | tests/coverage_html/ 8 | tests/.coverage 9 | build/ 10 | dist/ 11 | tests/report/ 12 | .idea 13 | *.ini 14 | *venv* 15 | .env 16 | *.sqlite3 17 | .vscode 18 | .DS_Store 19 | 20 | # etc 21 | .c9/ 22 | .idea/ 23 | .~c9* 24 | *.pyc 25 | node_modules 26 | .directory 27 | test.txt 28 | 29 | #VIM 30 | [._]*.s[a-w][a-z] 31 | [._]s[a-w][a-z] 32 | *.un~ 33 | Session.vim 34 | .netrwhist 35 | *~ 36 | 37 | # Byte-compiled / optimized / DLL files 38 | __pycache__/ 39 | *.py[cod] 40 | *$py.class 41 | 42 | # C extensions 43 | *.so 44 | 45 | # Distribution / packaging 46 | .Python 47 | env/ 48 | build/ 49 | develop-eggs/ 50 | dist/ 51 | downloads/ 52 | eggs/ 53 | .eggs/ 54 | lib/ 55 | lib64/ 56 | parts/ 57 | sdist/ 58 | var/ 59 | *.egg-info/ 60 | .installed.cfg 61 | *.egg 62 | *.sqlite3 63 | 64 | # PyInstaller 65 | # Usually these files are written by a python script from a template 66 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 67 | *.manifest 68 | *.spec 69 | 70 | # Installer logs 71 | pip-log.txt 72 | pip-delete-this-directory.txt 73 | 74 | # Unit test / coverage reports 75 | htmlcov/ 76 | .tox/ 77 | .coverage 78 | .coverage.* 79 | .cache 80 | nosetests.xml 81 | coverage.xml 82 | *,cover 83 | .hypothesis/ 84 | /coverage_html_report/ 85 | 86 | # Translations 87 | *.mo 88 | *.pot 89 | 90 | # Django stuff: 91 | *.log 92 | local_settings.py 93 | 94 | # Flask stuff: 95 | instance/ 96 | .webassets-cache 97 | 98 | # Scrapy stuff: 99 | .scrapy 100 | 101 | # Sphinx documentation 102 | docs/_build/ 103 | 104 | # PyBuilder 105 | target/ 106 | 107 | # IPython Notebook 108 | .ipynb_checkpoints 109 | *.ipynb 110 | 111 | # pyenv 112 | .python-version 113 | 114 | # virtualenv 115 | venv*/ 116 | ENV/ 117 | 118 | # Spyder project settings 119 | .spyderproject 120 | 121 | # Rope project settings 122 | .ropeproject 123 | 124 | ### VisualStudioCode ### 125 | .vscode/* 126 | .vscode/settings.json 127 | .vscode/tasks.json 128 | .vscode/launch.json 129 | .vscode/extensions.json 130 | 131 | # Pytest 132 | .pytest_cache/ 133 | 134 | # Decouple 135 | .env 136 | settings.ini 137 | 138 | *.log.* 139 | -------------------------------------------------------------------------------- /geolocations_service/service/brumadinho/migrations/0002_auto_20190129_2219.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.1.3 on 2019-01-29 22:19 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('brumadinho', '0001_initial'), 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='FoundPeople', 16 | fields=[ 17 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('full_name', models.CharField(blank=True, help_text='Full name of the found people.', max_length=150)), 19 | ('gender', models.CharField(blank=True, choices=[('M', 'Male'), ('F', 'Female')], default=None, help_text='Gender of the found people.', max_length=2, null=True)), 20 | ('status_condition', models.CharField(blank=True, choices=[('Alive', 'Alive'), ('Dead', 'Dead')], default=None, help_text='Status condition of the found people.', max_length=5, null=True)), 21 | ], 22 | ), 23 | migrations.AddField( 24 | model_name='visitedlocation', 25 | name='encounter_number', 26 | field=models.IntegerField(default=0, help_text='Number of people found in this location.'), 27 | preserve_default=False, 28 | ), 29 | migrations.AddField( 30 | model_name='visitedlocation', 31 | name='visitation_date', 32 | field=models.DateTimeField(blank=True, help_text='Datetime of the location analysis.', null=True), 33 | ), 34 | migrations.AlterField( 35 | model_name='visitedlocation', 36 | name='location', 37 | field=models.ForeignKey(help_text='Geoposition of the visited area.', on_delete=django.db.models.deletion.PROTECT, to='brumadinho.Geolocation'), 38 | ), 39 | migrations.AlterField( 40 | model_name='visitedlocation', 41 | name='reference', 42 | field=models.CharField(help_text='Reference and information.', max_length=100), 43 | ), 44 | migrations.AlterUniqueTogether( 45 | name='geolocation', 46 | unique_together={('latitude', 'longitude')}, 47 | ), 48 | migrations.AddField( 49 | model_name='foundpeople', 50 | name='location', 51 | field=models.ForeignKey(blank=True, help_text='Found location.', null=True, on_delete=django.db.models.deletion.PROTECT, to='brumadinho.Geolocation'), 52 | ), 53 | ] 54 | -------------------------------------------------------------------------------- /geolocations_service/service/brumadinho/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | 4 | class Geolocation(models.Model): 5 | 6 | class Meta: 7 | unique_together = ['latitude', 'longitude'] 8 | 9 | latitude = models.FloatField() 10 | longitude = models.FloatField() 11 | 12 | def __str__(self): 13 | return str("lat: {} long: {}".format( 14 | self.latitude, 15 | self.longitude 16 | )) 17 | 18 | 19 | class VisitedLocation(models.Model): 20 | 21 | reference = models.CharField( 22 | max_length=100, 23 | help_text="Reference and information." 24 | ) 25 | location = models.ForeignKey( 26 | Geolocation, 27 | on_delete=models.PROTECT, 28 | help_text="Geoposition of the visited area." 29 | ) 30 | visitation_date = models.DateTimeField( 31 | blank=True, 32 | null=True, 33 | help_text="Datetime of the location analysis." 34 | ) 35 | encounter_number = models.IntegerField( 36 | help_text="Number of people found in this location." 37 | ) 38 | radius = models.FloatField( 39 | help_text="Radial área range of search.", 40 | default=1 41 | ) 42 | observations = models.CharField( 43 | max_length=2000, 44 | help_text="Observations", 45 | blank=True, 46 | null=True 47 | ) 48 | 49 | 50 | class FoundPeople(models.Model): 51 | 52 | # Gender options 53 | MALE = "M" 54 | FEMALE = "F" 55 | GENDER_CHOICES = ( 56 | (MALE, "Male"), 57 | (FEMALE, "Female"), 58 | ) 59 | 60 | # Condition options 61 | ALIVE = "Alive" 62 | DEAD = "Dead" 63 | CONDITION_CHOICES = ( 64 | (ALIVE, ALIVE), 65 | (DEAD, DEAD) 66 | ) 67 | 68 | full_name = models.CharField( 69 | max_length=150, 70 | blank=True, 71 | help_text="Full name of the found people." 72 | ) 73 | location = models.ForeignKey( 74 | Geolocation, 75 | on_delete=models.PROTECT, 76 | help_text="Found location.", 77 | blank=True, 78 | null=True 79 | ) 80 | gender = models.CharField( 81 | max_length=2, 82 | choices=GENDER_CHOICES, 83 | default=None, 84 | null=True, 85 | blank=True, 86 | help_text="Gender of the found people." 87 | ) 88 | status_condition = models.CharField( 89 | max_length=5, 90 | choices=CONDITION_CHOICES, 91 | default=None, 92 | blank=True, 93 | null=True, 94 | help_text="Status condition of the found people." 95 | ) 96 | -------------------------------------------------------------------------------- /brumadinho_heatmap/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Locais Onde Passei 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 18 | 20 | 22 | 24 | 25 | 26 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 74 |
75 |

76 |     
77 | 
78 | 
79 | 
80 | 


--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
 1 | # Contributor Covenant Code of Conduct
 2 | 
 3 | ## Our Pledge
 4 | 
 5 | In the interest of fostering an open and welcoming environment, we as
 6 | contributors and maintainers pledge to making participation in our project and
 7 | our community a harassment-free experience for everyone, regardless of age, body
 8 | size, disability, ethnicity, sex characteristics, gender identity and expression,
 9 | level of experience, education, socio-economic status, nationality, personal
10 | appearance, race, religion, or sexual identity and orientation.
11 | 
12 | ## Our Standards
13 | 
14 | Examples of behavior that contributes to creating a positive environment
15 | include:
16 | 
17 | * Using welcoming and inclusive language
18 | * Being respectful of differing viewpoints and experiences
19 | * Gracefully accepting constructive criticism
20 | * Focusing on what is best for the community
21 | * Showing empathy towards other community members
22 | 
23 | Examples of unacceptable behavior by participants include:
24 | 
25 | * The use of sexualized language or imagery and unwelcome sexual attention or
26 |  advances
27 | * Trolling, insulting/derogatory comments, and personal or political attacks
28 | * Public or private harassment
29 | * Publishing others' private information, such as a physical or electronic
30 |  address, without explicit permission
31 | * Other conduct which could reasonably be considered inappropriate in a
32 |  professional setting
33 | 
34 | ## Our Responsibilities
35 | 
36 | Project maintainers are responsible for clarifying the standards of acceptable
37 | behavior and are expected to take appropriate and fair corrective action in
38 | response to any instances of unacceptable behavior.
39 | 
40 | Project maintainers have the right and responsibility to remove, edit, or
41 | reject comments, commits, code, wiki edits, issues, and other contributions
42 | that are not aligned to this Code of Conduct, or to ban temporarily or
43 | permanently any contributor for other behaviors that they deem inappropriate,
44 | threatening, offensive, or harmful.
45 | 
46 | ## Scope
47 | 
48 | This Code of Conduct applies both within project spaces and in public spaces
49 | when an individual is representing the project or its community. Examples of
50 | representing a project or community include using an official project e-mail
51 | address, posting via an official social media account, or acting as an appointed
52 | representative at an online or offline event. Representation of a project may be
53 | further defined and clarified by project maintainers.
54 | 
55 | ## Enforcement
56 | 
57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
58 | reported by contacting the project team at contato@victorshinya.com.br. All
59 | complaints will be reviewed and investigated and will result in a response that
60 | is deemed necessary and appropriate to the circumstances. The project team is
61 | obligated to maintain confidentiality with regard to the reporter of an incident.
62 | Further details of specific enforcement policies may be posted separately.
63 | 
64 | Project maintainers who do not follow or enforce the Code of Conduct in good
65 | faith may face temporary or permanent repercussions as determined by other
66 | members of the project's leadership.
67 | 
68 | ## Attribution
69 | 
70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72 | 
73 | [homepage]: https://www.contributor-covenant.org
74 | 
75 | For answers to common questions about this code of conduct, see
76 | https://www.contributor-covenant.org/faq
77 | 


--------------------------------------------------------------------------------
/core/settings.py:
--------------------------------------------------------------------------------
  1 | import os
  2 | from decouple import config, Csv
  3 | 
  4 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  5 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  6 | 
  7 | # Quick-start development settings - unsuitable for production
  8 | # See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/
  9 | 
 10 | # SECURITY WARNING: keep the secret key used in production secret!
 11 | SECRET_KEY = config('SECRET_KEY')
 12 | 
 13 | # SECURITY WARNING: don't run with debug turned on in production!
 14 | DEBUG = config('DEBUG', default=False, cast=bool)
 15 | 
 16 | ALLOWED_HOSTS = config('ALLOWED_HOSTS', cast=Csv())
 17 | 
 18 | # Application definition
 19 | 
 20 | INSTALLED_APPS = [
 21 |     # 'django.contrib.admin',
 22 |     'django.contrib.auth',
 23 |     'django.contrib.contenttypes',
 24 |     'django.contrib.sessions',
 25 |     'django.contrib.messages',
 26 |     'django.contrib.staticfiles',
 27 |     'apps.api',
 28 |     'apps.map',
 29 | ]
 30 | 
 31 | MIDDLEWARE = [
 32 |     'django.middleware.security.SecurityMiddleware',
 33 |     'django.contrib.sessions.middleware.SessionMiddleware',
 34 |     'django.middleware.common.CommonMiddleware',
 35 |     'django.middleware.csrf.CsrfViewMiddleware',
 36 |     'django.contrib.auth.middleware.AuthenticationMiddleware',
 37 |     'django.contrib.messages.middleware.MessageMiddleware',
 38 |     'django.middleware.clickjacking.XFrameOptionsMiddleware',
 39 | ]
 40 | 
 41 | ROOT_URLCONF = 'core.urls'
 42 | 
 43 | STATICFILES_DIRS = [
 44 |     os.path.join(BASE_DIR, "static"),
 45 | ]
 46 | 
 47 | TEMPLATES = [
 48 |     {
 49 |         'BACKEND': 'django.template.backends.django.DjangoTemplates',
 50 |         'DIRS': [os.path.join(BASE_DIR, 'templates')],
 51 |         'APP_DIRS': True,
 52 |         'OPTIONS': {
 53 |             'context_processors': [
 54 |                 'django.template.context_processors.debug',
 55 |                 'django.template.context_processors.request',
 56 |                 'django.contrib.auth.context_processors.auth',
 57 |                 'django.contrib.messages.context_processors.messages',
 58 |             ],
 59 |         },
 60 |     },
 61 | ]
 62 | 
 63 | WSGI_APPLICATION = 'core.wsgi.application'
 64 | 
 65 | # Database
 66 | # https://docs.djangoproject.com/en/2.1/ref/settings/#databases
 67 | 
 68 | DATABASES = {
 69 |     'default': {
 70 |         'ENGINE': 'django.db.backends.sqlite3',
 71 |         'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
 72 |     }
 73 | }
 74 | 
 75 | # Password validation
 76 | # https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators
 77 | 
 78 | AUTH_PASSWORD_VALIDATORS = [
 79 |     {
 80 |         'NAME':
 81 |         'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
 82 |     },
 83 |     {
 84 |         'NAME':
 85 |         'django.contrib.auth.password_validation.MinimumLengthValidator',
 86 |     },
 87 |     {
 88 |         'NAME':
 89 |         'django.contrib.auth.password_validation.CommonPasswordValidator',
 90 |     },
 91 |     {
 92 |         'NAME':
 93 |         'django.contrib.auth.password_validation.NumericPasswordValidator',
 94 |     },
 95 | ]
 96 | 
 97 | # Internationalization
 98 | # https://docs.djangoproject.com/en/2.1/topics/i18n/
 99 | 
100 | LANGUAGE_CODE = 'en-us'
101 | 
102 | TIME_ZONE = 'UTC'
103 | 
104 | USE_I18N = True
105 | 
106 | USE_L10N = True
107 | 
108 | USE_TZ = True
109 | 
110 | # Static files (CSS, JavaScript, Images)
111 | # https://docs.djangoproject.com/en/2.1/howto/static-files/
112 | 
113 | STATIC_URL = '/static/'
114 | STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
115 | 
116 | # Google Maps Elevation API
117 | GMAPS_API_KEY = config('GMAPS_API_KEY', default='')
118 | 


--------------------------------------------------------------------------------
/static/js/script.js:
--------------------------------------------------------------------------------
  1 | var app = new Vue({
  2 |     el: '#app',
  3 |     data: {
  4 |         locale: 'eng',
  5 |         locales: {
  6 |             eng: 'English',
  7 |             por: 'Portuguese'
  8 |         },
  9 |         lat: '-20.135896',
 10 |         lng: '-44.123509'
 11 |     },
 12 |     methods: {
 13 |         calculate: calculate
 14 |     }
 15 | });
 16 | 
 17 | // WARNING: doesn't sanitize inputs
 18 | function createMarker(name, point) {
 19 |     return L.marker(point).bindPopup(
 20 |         '' + name + '' +
 21 |         '
Latitude:' + point.lat + 22 | '
Longitude:' + point.lng 23 | ).addTo(map); 24 | } 25 | 26 | function drawVector(pointA, pointB) { 27 | createMarker('Localização inicial', pointA); 28 | createMarker('Localização final (estimada)', pointB); 29 | 30 | const line = new L.Polyline([pointA, pointB], { 31 | color: 'red', 32 | weight: 3, 33 | opacity: 0.5, 34 | smoothFactor: 1 35 | }).addTo(map); 36 | 37 | L.polylineDecorator(line, { 38 | patterns: [ 39 | { 40 | offset: '100%', 41 | repeat: 0, 42 | symbol: L.Symbol.arrowHead({ 43 | pixelSize: 15, 44 | polygon: false, 45 | pathOptions: { 46 | stroke: true, 47 | color: 'red', 48 | weight: 3, 49 | opacity: 0.5, 50 | smoothFactor: 1 51 | } 52 | }) 53 | } 54 | ] 55 | }).addTo(map); 56 | } 57 | 58 | async function calculate() { 59 | const srcPoint = new L.LatLng(app.lat, app.lng); 60 | 61 | const result = await fetch('/api/calculate', { 62 | method: 'POST', 63 | headers: { 64 | Accept: 'application/json', 65 | 'Content-Type': 'application/json' 66 | }, 67 | body: JSON.stringify(srcPoint) 68 | }); 69 | const data = await result.json(); 70 | const destPoint = new L.LatLng(data.lat, data.lng); 71 | drawVector(srcPoint, destPoint); 72 | } 73 | 74 | function initMap() { 75 | const mbAttr = 'Map data © OpenStreetMap contributors, ' + 76 | 'CC-BY-SA, ' + 77 | 'Imagery © Mapbox', 78 | mbUrl = 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoiY2F1ZXRoZW5vcmlvIiwiYSI6ImNqcmZlOTVzbDI4MXU0NHA4Y3NnM3Q2dTkifQ.dB1mAnvB0oqVvb-k_ZNbcQ'; 79 | 80 | const satelliteLayer = L.tileLayer(mbUrl, { 81 | id: 'mapbox.satellite', 82 | attribution: mbAttr 83 | }); 84 | 85 | const map = L.map('map', { 86 | layers: [satelliteLayer] 87 | }); 88 | 89 | var marker = null; 90 | 91 | map.on("click", function(e){ 92 | if(marker != null) marker.remove(); 93 | app.lat = e.latlng.lat; 94 | app.lng = e.latlng.lng; 95 | var point = new L.LatLng(e.latlng.lat, e.latlng.lng); 96 | marker = createMarker('Localização selecionada', point); 97 | }); 98 | 99 | fetch('/static/geodata/hot_area.json').then(function (response) { 100 | return response.json(); 101 | }).then(function (data) { 102 | const areaQuenteLayer = L.geoJSON(data); 103 | map.fitBounds(areaQuenteLayer.getBounds()); 104 | areaQuenteLayer.addTo(map); 105 | }); 106 | 107 | return map 108 | } 109 | 110 | 111 | document.addEventListener('DOMContentLoaded', function() { 112 | window.map = initMap(); 113 | }); 114 | -------------------------------------------------------------------------------- /geolocations_service/service/service/settings.py: -------------------------------------------------------------------------------- 1 | import os 2 | from decouple import config, Csv 3 | 4 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 5 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 6 | 7 | # Quick-start development settings - unsuitable for production 8 | # See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/ 9 | 10 | # SECURITY WARNING: keep the secret key used in production secret! 11 | SECRET_KEY = config('SECRET_KEY') 12 | 13 | # SECURITY WARNING: don't run with debug turned on in production! 14 | DEBUG = config('DEBUG', default=False, cast=bool) 15 | 16 | ALLOWED_HOSTS = config('ALLOWED_HOSTS', cast=Csv()) 17 | 18 | # Application definition 19 | 20 | INSTALLED_APPS = [ 21 | # 'django.contrib.admin', 22 | 'django.contrib.auth', 23 | 'django.contrib.contenttypes', 24 | 'django.contrib.sessions', 25 | 'django.contrib.messages', 26 | 'django.contrib.staticfiles', 27 | 'rest_framework', 28 | 'brumadinho' 29 | ] 30 | 31 | MIDDLEWARE = [ 32 | 'django.middleware.security.SecurityMiddleware', 33 | 'django.contrib.sessions.middleware.SessionMiddleware', 34 | 'django.middleware.common.CommonMiddleware', 35 | 'django.middleware.csrf.CsrfViewMiddleware', 36 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 37 | 'django.contrib.messages.middleware.MessageMiddleware', 38 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 39 | ] 40 | 41 | ROOT_URLCONF = 'service.urls' 42 | 43 | STATICFILES_DIRS = [ 44 | os.path.join(BASE_DIR, "static"), 45 | ] 46 | 47 | TEMPLATES = [ 48 | { 49 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 50 | 'DIRS': [os.path.join(BASE_DIR, 'templates')], 51 | 'APP_DIRS': True, 52 | 'OPTIONS': { 53 | 'context_processors': [ 54 | 'django.template.context_processors.debug', 55 | 'django.template.context_processors.request', 56 | 'django.contrib.auth.context_processors.auth', 57 | 'django.contrib.messages.context_processors.messages', 58 | ], 59 | }, 60 | }, 61 | ] 62 | 63 | WSGI_APPLICATION = 'service.wsgi.application' 64 | 65 | # Database 66 | # https://docs.djangoproject.com/en/2.1/ref/settings/#databases 67 | 68 | DATABASES = { 69 | 'default': { 70 | 'ENGINE': 'django.db.backends.sqlite3', 71 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 72 | } 73 | } 74 | 75 | # Password validation 76 | # https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators 77 | 78 | AUTH_PASSWORD_VALIDATORS = [ 79 | { 80 | 'NAME': 81 | 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 82 | }, 83 | { 84 | 'NAME': 85 | 'django.contrib.auth.password_validation.MinimumLengthValidator', 86 | }, 87 | { 88 | 'NAME': 89 | 'django.contrib.auth.password_validation.CommonPasswordValidator', 90 | }, 91 | { 92 | 'NAME': 93 | 'django.contrib.auth.password_validation.NumericPasswordValidator', 94 | }, 95 | ] 96 | 97 | # Internationalization 98 | # https://docs.djangoproject.com/en/2.1/topics/i18n/ 99 | 100 | LANGUAGE_CODE = 'en-us' 101 | 102 | TIME_ZONE = 'UTC' 103 | 104 | USE_I18N = True 105 | 106 | USE_L10N = True 107 | 108 | USE_TZ = True 109 | 110 | # Static files (CSS, JavaScript, Images) 111 | # https://docs.djangoproject.com/en/2.1/howto/static-files/ 112 | 113 | STATIC_URL = '/static/' 114 | STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') 115 | 116 | # Google Maps Elevation API 117 | GMAPS_API_KEY = config('GMAPS_API_KEY', default='') 118 | -------------------------------------------------------------------------------- /geolocations_service/service/service/original_settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for service project. 3 | 4 | Generated by 'django-admin startproject' using Django 2.1.3. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.1/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/2.1/ref/settings/ 11 | """ 12 | 13 | import os 14 | 15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = '&@9mr668o!*p1=jk$=#i+l5z4*qg)s1_ey!+i*o@&%!t#c+ra2' 24 | 25 | # SECURITY WARNING: don't run with debug turned on in production! 26 | DEBUG = True 27 | 28 | ALLOWED_HOSTS = ['*'] 29 | 30 | 31 | # Application definition 32 | 33 | INSTALLED_APPS = [ 34 | 'django.contrib.admin', 35 | 'django.contrib.auth', 36 | 'django.contrib.contenttypes', 37 | 'django.contrib.sessions', 38 | 'django.contrib.messages', 39 | 'django.contrib.staticfiles', 40 | 'rest_framework', 41 | 'brumadinho', 42 | ] 43 | 44 | MIDDLEWARE = [ 45 | 'django.middleware.security.SecurityMiddleware', 46 | 'django.contrib.sessions.middleware.SessionMiddleware', 47 | 'django.middleware.common.CommonMiddleware', 48 | 'django.middleware.csrf.CsrfViewMiddleware', 49 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 50 | 'django.contrib.messages.middleware.MessageMiddleware', 51 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 52 | ] 53 | 54 | ROOT_URLCONF = 'service.urls' 55 | 56 | TEMPLATES = [ 57 | { 58 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 59 | 'DIRS': [], 60 | 'APP_DIRS': True, 61 | 'OPTIONS': { 62 | 'context_processors': [ 63 | 'django.template.context_processors.debug', 64 | 'django.template.context_processors.request', 65 | 'django.contrib.auth.context_processors.auth', 66 | 'django.contrib.messages.context_processors.messages', 67 | ], 68 | }, 69 | }, 70 | ] 71 | 72 | WSGI_APPLICATION = 'service.wsgi.application' 73 | 74 | 75 | # Database 76 | # https://docs.djangoproject.com/en/2.1/ref/settings/#databases 77 | 78 | DATABASES = { 79 | 'default': { 80 | 'ENGINE': 'django.db.backends.sqlite3', 81 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 82 | } 83 | } 84 | 85 | 86 | # Password validation 87 | # https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators 88 | 89 | AUTH_PASSWORD_VALIDATORS = [ 90 | { 91 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 92 | }, 93 | { 94 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 95 | }, 96 | { 97 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 98 | }, 99 | { 100 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 101 | }, 102 | ] 103 | 104 | 105 | # Internationalization 106 | # https://docs.djangoproject.com/en/2.1/topics/i18n/ 107 | 108 | LANGUAGE_CODE = 'en-us' 109 | 110 | TIME_ZONE = 'UTC' 111 | 112 | USE_I18N = True 113 | 114 | USE_L10N = True 115 | 116 | USE_TZ = True 117 | 118 | 119 | REST_FRAMEWORK = { 120 | 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination', 121 | 'PAGE_SIZE': 10 122 | } 123 | 124 | 125 | # Static files (CSS, JavaScript, Images) 126 | # https://docs.djangoproject.com/en/2.1/howto/static-files/ 127 | 128 | STATIC_URL = '/static/' 129 | -------------------------------------------------------------------------------- /templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | {% load static %} 3 | 4 | 5 | Brumadinho Location 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 |
21 |
Brumadinho Location
22 | 29 | GitHub 30 |
31 |
32 |

We aim that this project will be a repository for tools to help rescue and location of missed people from the huge Dam Burst occurred recently in Brumadinho/MG.

33 |

This tool requires the latitude and longitude coordinates to calculate the estimative based on the tailing flows. For more info check the GitHub page.

34 |
35 |
36 |
37 |
38 |
39 | Coordinates 40 |
41 | 47 | 53 |
54 | 60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 | 81 | https://github.com/dieegom/brumadinho_location 82 |
83 |
84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Brumadinho Location 2 | 3 | ## Important 4 | 5 | * If you're looking for the project to predict victims' location of 6 | disasters like Dam Collapse go to the project [Victims Location 7 | Prediction](https://github.com/sosbrumadinho/victims_location_prediction) 8 | 9 | * If you want to contribute crawling data related with [Brumadinho dam 10 | disaster](https://en.wikipedia.org/wiki/Brumadinho_dam_disaster) go to 11 | the project [Brumadinho 12 | Crawlers](https://github.com/sosbrumadinho/brumadinho_crawlers) 13 | 14 | ## English 15 | The aim of this project is to setup a repository of tools to support the search and rescue efforts, currently taking place at Brumadino/MG/Brazil, in response to the [**Brumadinho dam disaster**](https://en.wikipedia.org/wiki/Brumadinho_dam_disaster) occurred on 25 January 2019. As this file is being updated, 65 people have been confirmed dead and over 300 are still missing. 16 | 17 | ### How to colaborate: 18 | * Please see the list of [Projects](https://github.com/dieegom/brumadinho_location/projects) that are being worked on and their respective issues. Project details are also listed below. 19 | * If you can help with any issue, please add a comment to the issue to indicate that you will work on it. 20 | * If you are the first to work on any given project, you can choose the language or technology that you are more familiar with. 21 | * If other volunteers are already helping with the project then please contact them to discuss what still needs to be implemented. 22 | * Once your change is complete please submit your Pull Request tagging the associated issue. 23 | * If you would like to suggest other tools for development then please create an issue and tag it with the #suggestion label. 24 | 25 | We also have a Telegram discussion group. You can access it in [this link](https://t.me/joinchat/K2pTZk1Xjo0UEzmCzkJvXQ). Anyway, let's keep the discussion here on GitHub and let Telegram only for suggestions and/or others things not related to the code. 26 | 27 | You can fork the project at will. We will continue to improve the code throughout the week. 28 | 29 | Join us in this project! This may be useful in the future as well. 30 | Thank you! 31 | 32 | ### - Location 33 | This tool calculates the probable location of missing individuals' bodies by taking into consideration their last known location coordinates (i.e. latitude and longitude) and the tailing flows. 34 | 35 | The algorithm still needs improvement and to improve it, we will need tailings physical-chemical data, location topographic map (.csv), simulations of the tailing spreading, and, of course, the latitude and longitude coordinates from the victims' cell phones. 36 | 37 | The production enviromment is currently live at: https://brumadinho.osei.ong.br 38 | 39 | We ask that those contributing to the project submit their Pull Requests as soon as possible to help improve the algorithm and make it available to those responsible for the search and rescue operations. 40 | 41 | #### Ideas to be implemented: 42 | * http://fluidityproject.github.io/ 43 | * http://lorenabarba.com/blog/cfd-python-12-steps-to-navier-stokes/ 44 | * https://pt.wikipedia.org/wiki/Equa%C3%A7%C3%B5es_de_Navier-Stokes 45 | * http://rlguy.com/gridfluidsim/ 46 | 47 | ### Support material 48 | * Using Python to Solve the Navier-Stokes Equations 49 | http://www.journalrepository.org/media/journals/JSRR_22/2015/May/Liu732015JSRR17346.pdf 50 | * Grid Fluid Sim 3D Exemples 51 | https://github.com/rlguy/GridFluidSim3D/tree/master/src/examples/python 52 | 53 | 54 | 55 | ### - Where we had searched 56 | This tool provides information regarding areas that have already been inspected by the search and rescue teams. 57 | 58 | ### - Report info 59 | App to report missing people and missing animals. 60 | 61 | ### - Missing people list 62 | This tool returns an updated .csv with all the names of missing people. 63 | 64 | ### - Identify the victim body 65 | Through a set of photos provided by victims relatives in [this project](https://github.com/dieegom/brumadinho_location/projects/3) and based on the picture of the body found, identify who is the possible victim. 66 | 67 | ## Português 68 | Pretendemos que esse projeto seja um repositório de ferramentas para ajudar no resgate e localização das vítimas atingidas pelo rompimento da barragem que ocorreu recentemente em Brumadinho/MG, onde muitas pessoas morreram e muitas outras ainda estão desaparecidas. 69 | 70 | >No início da tarde do dia 25 de janeiro de 2019 rompeu-se uma barragem de rejeitos de mineração controlada pela Vale S.A.,construída no ribeirão Ferro-Carvão, na localidade de Córrego do Feijão. 71 | > 72 | > — https://pt.wikipedia.org/wiki/Rompimento_de_barragem_em_Brumadinho 73 | 74 | ### Como colaborar 75 | 76 | * Acesse [Projetos](https://github.com/dieegom/brumadinho_location/projects) e veja a lista de ferramentas que estamos desenvolvendo e suas respectivas issues. Você também pode ver essa lista logo abaixo. 77 | * Se você puder ajudar com alguma issue, escreva um comentário dizendo que você irá trabalhar nela. 78 | * Se você for o primeiro a trabalhar no projeto, você pode escolher a linguagem ou tecnologia que se sinta mais confortável. 79 | * Se mais voluntários estiverem ajudando, contate-os antes para saber o que ainda precisa ser implementado. 80 | * Quando acabar, façam seu Pull Request informando a issue associada. 81 | * Se tiver sugestão de alguma outra ferramenta, cadastre uma issue usando o label #suggestion 82 | 83 | 84 | Nós também temos um grupo de discussão no Telegram que pode ser acessado [neste link](https://t.me/joinchat/K2pTZk1Xjo0UEzmCzkJvXQ). De qualquer maneira, vamos manter a discussão aqui no GitHub e usar o Telegram apenas para sugestões e/ou dúvidas não relacionadas ao código. 85 | 86 | 87 | "Forkem" à vontade. Continuaremos melhorando o código ao longo da semana.

88 | Vamos todos fazer a nossa parte! Isto pode ser útil no futuro também.
89 | Obrigado. 90 | 91 | ### - Location 92 | 93 | Essa ferramenta requer as coordenadas de latitude e longitude dos desaparecidos para calcular a estimativa baseando-se no fluxo de rejeitos
94 | O algoritmo precisa ser melhorado (e muito) ainda. Além disso, fizemos apenas com os poucos dados que obtivemos. Ideal seria termos dados físico-químicos do rejeito, mapa topográfico (em .csv) do local, simulações do rejeito se espalhando e, claro, latitude e longitude dos celulares.
95 | 96 | Vamos deixar o sistema atualizado rodando em: https://brumadinho.osei.ong.br
97 | Pedimos aos Devs que façam seus Pull Requests para que possamos deixar este algoritmo mais robusto e disponível para os responsáveis pelo resgate. "Forkem" à vontade. Continuaremos melhorando o código ao longo da semana.

98 | 99 | #### Ideias a serem implementadas:
100 | * http://fluidityproject.github.io/
101 | * http://lorenabarba.com/blog/cfd-python-12-steps-to-navier-stokes/
102 | * https://pt.wikipedia.org/wiki/Equa%C3%A7%C3%B5es_de_Navier-Stokes
103 | * http://rlguy.com/gridfluidsim/

104 | 105 | 106 | ### Materiais de apoio: 107 | * Using Python to Solve the Navier-Stokes Equations 108 | http://www.journalrepository.org/media/journals/JSRR_22/2015/May/Liu732015JSRR17346.pdf 109 | * Grid Fluid Sim 3D Exemplos 110 | https://github.com/rlguy/GridFluidSim3D/tree/master/src/examples/python 111 | 112 | 113 | 114 | ### - Onde já foi buscado 115 | Nesta ferramenta locais e equipes de resgatem podem fornecer informações de geolocalização sobre as áreas onde as buscas já foram realizadas. 116 | 117 | ### - Report info 118 | App para relatar informações de pessoas e animais desaparecidos 119 | 120 | 121 | ### - Missing people list 122 | Essa ferramenta retorna um arquivo .csv atualizado com todos os nomes das pessoas desaparecidas. 123 | 124 | 125 | ### - Identificar o corpo da vítima 126 | Utilizando um conjunto de fotos fornecidos por parentes e amigos da vítimas [neste projeto] (https://github.com/dieegom/brumadinho_location/projects/3) e baseado na foto do corpo, identificar quem possivelmente é a vítima. 127 | -------------------------------------------------------------------------------- /brumadinho_heatmap/misc/coords.geojson: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [ 4 | { 5 | "geometry": { 6 | "type": "Point", 7 | "coordinates": [ 8 | -44.1264581, 9 | -20.1255982 10 | ] 11 | }, 12 | "type": "Feature", 13 | "properties": {} 14 | }, 15 | { 16 | "geometry": { 17 | "type": "Point", 18 | "coordinates": [ 19 | -44.1364581, 20 | -20.1255982 21 | ] 22 | }, 23 | "type": "Feature", 24 | "properties": {} 25 | }, 26 | { 27 | "geometry": { 28 | "type": "Point", 29 | "coordinates": [ 30 | -44.1234581, 31 | -20.1255982 32 | ] 33 | }, 34 | "type": "Feature", 35 | "properties": {} 36 | }, 37 | { 38 | "geometry": { 39 | "type": "Point", 40 | "coordinates": [ 41 | -44.1254581, 42 | -20.1255982 43 | ] 44 | }, 45 | "type": "Feature", 46 | "properties": {} 47 | }, 48 | { 49 | "geometry": { 50 | "type": "Point", 51 | "coordinates": [ 52 | -44.1274581, 53 | -20.1255982 54 | ] 55 | }, 56 | "type": "Feature", 57 | "properties": {} 58 | }, 59 | { 60 | "geometry": { 61 | "type": "Point", 62 | "coordinates": [ 63 | -44.1224581, 64 | -20.1255982 65 | ] 66 | }, 67 | "type": "Feature", 68 | "properties": {} 69 | }, 70 | { 71 | "geometry": { 72 | "type": "Point", 73 | "coordinates": [ 74 | -44.1204581, 75 | -20.1255982 76 | ] 77 | }, 78 | "type": "Feature", 79 | "properties": {} 80 | }, 81 | { 82 | "geometry": { 83 | "type": "Point", 84 | "coordinates": [ 85 | -44.1264581, 86 | -20.129982 87 | ] 88 | }, 89 | "type": "Feature", 90 | "properties": {} 91 | }, 92 | { 93 | "geometry": { 94 | "type": "Point", 95 | "coordinates": [ 96 | -44.1264581, 97 | -20.12355982 98 | ] 99 | }, 100 | "type": "Feature", 101 | "properties": {} 102 | }, 103 | { 104 | "geometry": { 105 | "type": "Point", 106 | "coordinates": [ 107 | -44.1264581, 108 | -20.1255992 109 | ] 110 | }, 111 | "type": "Feature", 112 | "properties": {} 113 | }, 114 | { 115 | "geometry": { 116 | "type": "Point", 117 | "coordinates": [ 118 | -44.1264581, 119 | -20.1355982 120 | ] 121 | }, 122 | "type": "Feature", 123 | "properties": {} 124 | }, 125 | { 126 | "geometry": { 127 | "type": "Point", 128 | "coordinates": [ 129 | -44.1264581, 130 | -20.1295982 131 | ] 132 | }, 133 | "type": "Feature", 134 | "properties": {} 135 | }, 136 | { 137 | "geometry": { 138 | "type": "Point", 139 | "coordinates": [ 140 | -44.1264581, 141 | -20.1299982 142 | ] 143 | }, 144 | "type": "Feature", 145 | "properties": {} 146 | }, 147 | { 148 | "geometry": { 149 | "type": "Point", 150 | "coordinates": [ 151 | -44.1264581, 152 | -20.1355982 153 | ] 154 | }, 155 | "type": "Feature", 156 | "properties": {} 157 | }, 158 | { 159 | "geometry": { 160 | "type": "Point", 161 | "coordinates": [ 162 | -44.1364581, 163 | -20.1295982 164 | ] 165 | }, 166 | "type": "Feature", 167 | "properties": {} 168 | }, 169 | { 170 | "geometry": { 171 | "type": "Point", 172 | "coordinates": [ 173 | -44.1354581, 174 | -20.1295982 175 | ] 176 | }, 177 | "type": "Feature", 178 | "properties": {} 179 | }, 180 | { 181 | "geometry": { 182 | "type": "Point", 183 | "coordinates": [ 184 | -44.1384581, 185 | -20.1295982 186 | ] 187 | }, 188 | "type": "Feature", 189 | "properties": {} 190 | }, 191 | { 192 | "geometry": { 193 | "type": "Point", 194 | "coordinates": [ 195 | -44.1324581, 196 | -20.1295982 197 | ] 198 | }, 199 | "type": "Feature", 200 | "properties": {} 201 | }, 202 | { 203 | "geometry": { 204 | "type": "Point", 205 | "coordinates": [ 206 | -44.1364581, 207 | -20.1095982 208 | ] 209 | }, 210 | "type": "Feature", 211 | "properties": {} 212 | }, 213 | { 214 | "geometry": { 215 | "type": "Point", 216 | "coordinates": [ 217 | -44.1374581, 218 | -20.1095982 219 | ] 220 | }, 221 | "type": "Feature", 222 | "properties": {} 223 | }, 224 | { 225 | "geometry": { 226 | "type": "Point", 227 | "coordinates": [ 228 | -44.1394581, 229 | -20.1095982 230 | ] 231 | }, 232 | "type": "Feature", 233 | "properties": {} 234 | }, 235 | { 236 | "geometry": { 237 | "type": "Point", 238 | "coordinates": [ 239 | -44.1304581, 240 | -20.1095982 241 | ] 242 | }, 243 | "type": "Feature", 244 | "properties": {} 245 | }, 246 | { 247 | "geometry": { 248 | "type": "Point", 249 | "coordinates": [ 250 | -44.1324581, 251 | -20.1095982 252 | ] 253 | }, 254 | "type": "Feature", 255 | "properties": {} 256 | }, 257 | { 258 | "geometry": { 259 | "type": "Point", 260 | "coordinates": [ 261 | -44.1314581, 262 | -20.1095982 263 | ] 264 | }, 265 | "type": "Feature", 266 | "properties": {} 267 | }, 268 | { 269 | "geometry": { 270 | "type": "Point", 271 | "coordinates": [ 272 | -44.1364581, 273 | -20.1045982 274 | ] 275 | }, 276 | "type": "Feature", 277 | "properties": {} 278 | }, 279 | { 280 | "geometry": { 281 | "type": "Point", 282 | "coordinates": [ 283 | -44.1364581, 284 | -20.1095982 285 | ] 286 | }, 287 | "type": "Feature", 288 | "properties": {} 289 | }, 290 | { 291 | "geometry": { 292 | "type": "Point", 293 | "coordinates": [ 294 | -44.1364581, 295 | -20.1105982 296 | ] 297 | }, 298 | "type": "Feature", 299 | "properties": {} 300 | }, 301 | { 302 | "geometry": { 303 | "type": "Point", 304 | "coordinates": [ 305 | -44.1394581, 306 | -20.1195982 307 | ] 308 | }, 309 | "type": "Feature", 310 | "properties": {} 311 | }, 312 | { 313 | "geometry": { 314 | "type": "Point", 315 | "coordinates": [ 316 | -44.1354581, 317 | -20.1195982 318 | ] 319 | }, 320 | "type": "Feature", 321 | "properties": {} 322 | }, 323 | { 324 | "geometry": { 325 | "type": "Point", 326 | "coordinates": [ 327 | -44.1344581, 328 | -20.1195982 329 | ] 330 | }, 331 | "type": "Feature", 332 | "properties": {} 333 | }, 334 | { 335 | "geometry": { 336 | "type": "Point", 337 | "coordinates": [ 338 | -44.1334581, 339 | -20.1195982 340 | ] 341 | }, 342 | "type": "Feature", 343 | "properties": {} 344 | }, 345 | { 346 | "geometry": { 347 | "type": "Point", 348 | "coordinates": [ 349 | -44.1324581, 350 | -20.1195982 351 | ] 352 | }, 353 | "type": "Feature", 354 | "properties": {} 355 | }, 356 | { 357 | "geometry": { 358 | "type": "Point", 359 | "coordinates": [ 360 | -44.1314581, 361 | -20.1195982 362 | ] 363 | }, 364 | "type": "Feature", 365 | "properties": {} 366 | } 367 | ] 368 | } -------------------------------------------------------------------------------- /static/geodata/hot_area.json: -------------------------------------------------------------------------------- 1 | {"type":"FeatureCollection","features":[{"type":"Feature","id":"way/666387541","properties":{"type":"way","id":666387541,"tags":{"description":"Brumadinho Dam Collapse 2019-01-25: Linha de lama atual conforme imagem de Satelite Sentinel S2-L1C TCI/NDWI de 2019-01-27","source:image":"Sentinel Satellite S2-L1C 2019-01-27 TCI/NDWI at sentinel-hub.com"},"relations":[],"meta":{}},"geometry":{"type":"LineString","coordinates":[[-44.121084,-20.1176603],[-44.1210309,-20.1178797],[-44.1209249,-20.118055],[-44.1193504,-20.1207142],[-44.1192592,-20.1208255],[-44.1191799,-20.1208925],[-44.1190323,-20.1209352],[-44.1184577,-20.1211346],[-44.1186804,-20.1212771],[-44.1190232,-20.1214483],[-44.1193271,-20.1216164],[-44.1195242,-20.1218195],[-44.1198067,-20.1221312],[-44.1200999,-20.1222906],[-44.1204704,-20.1223341],[-44.1211186,-20.1226602],[-44.1213038,-20.1228341],[-44.121736,-20.1228051],[-44.1219829,-20.122979],[-44.1220524,-20.123479],[-44.1220061,-20.1238413],[-44.1216048,-20.1242833],[-44.1212652,-20.1248485],[-44.1212112,-20.1253485],[-44.1209025,-20.1254427],[-44.1208022,-20.1258485],[-44.1204626,-20.1260441],[-44.1198067,-20.1267107],[-44.1195674,-20.1267325],[-44.1191353,-20.1265731],[-44.1182555,-20.1265658],[-44.1175854,-20.1264835],[-44.1173449,-20.1265803],[-44.1170594,-20.1266962],[-44.1170101,-20.1268511],[-44.1173936,-20.1272028],[-44.117843,-20.12743],[-44.1184867,-20.1276718],[-44.1191507,-20.1280585],[-44.1193668,-20.1287686],[-44.1195829,-20.1294352],[-44.1196755,-20.1299569],[-44.1197372,-20.1302902],[-44.1196446,-20.1307829],[-44.1188729,-20.1313625],[-44.1188729,-20.1317683],[-44.1184545,-20.1320134],[-44.1180897,-20.1325775],[-44.1178851,-20.1328841],[-44.1177924,-20.13318],[-44.1176392,-20.1334134],[-44.116959,-20.1335073],[-44.1166788,-20.1335093],[-44.1165276,-20.1333314],[-44.116388,-20.1332174],[-44.1161935,-20.1322536],[-44.1153743,-20.1313777],[-44.1147943,-20.1301977],[-44.1143016,-20.1299944],[-44.1146135,-20.1303413],[-44.1149876,-20.1319093],[-44.1154986,-20.1332189],[-44.1155262,-20.1336209],[-44.1151533,-20.1338154],[-44.1142809,-20.1339173],[-44.1137861,-20.1338802],[-44.1137447,-20.133984],[-44.1139518,-20.1342303],[-44.1141254,-20.1347382],[-44.1140395,-20.1349901],[-44.1140825,-20.1351361],[-44.1143024,-20.1353779],[-44.1143131,-20.1359621],[-44.1144955,-20.1362341],[-44.1149998,-20.136214],[-44.1152633,-20.13644],[-44.1153107,-20.1367014],[-44.1152249,-20.1373662],[-44.1154072,-20.1373965],[-44.1155896,-20.1372554],[-44.1154928,-20.1367098],[-44.1158169,-20.1364634],[-44.1165886,-20.1365214],[-44.1171906,-20.1369127],[-44.1179623,-20.1370866],[-44.1185025,-20.1374633],[-44.1189809,-20.1380864],[-44.1189964,-20.1384052],[-44.1188299,-20.138799],[-44.1185778,-20.1388732],[-44.1182092,-20.1386805],[-44.1179777,-20.1388255],[-44.1181475,-20.1394051],[-44.1180146,-20.1399309],[-44.1166658,-20.1412454],[-44.1167893,-20.1414338],[-44.1179293,-20.1415693],[-44.1181784,-20.1419699],[-44.1182555,-20.1432668],[-44.1185719,-20.1434624],[-44.1186723,-20.1433175],[-44.1185025,-20.1430857],[-44.1188408,-20.1419064],[-44.1197108,-20.1403894],[-44.1201848,-20.1401151],[-44.1204781,-20.1397384],[-44.1210492,-20.1394341],[-44.1215739,-20.1395065],[-44.1216357,-20.1397818],[-44.1209102,-20.1405064],[-44.1212266,-20.1407745],[-44.1217134,-20.1404931],[-44.1218169,-20.1405644],[-44.1216357,-20.1408759],[-44.1219058,-20.1409556],[-44.1223487,-20.1404931],[-44.1229553,-20.1404267],[-44.1236961,-20.1404991],[-44.1240589,-20.1409266],[-44.1247457,-20.1411874],[-44.1249155,-20.1415425],[-44.125147,-20.1415932],[-44.1254171,-20.141412],[-44.1257489,-20.1414555],[-44.1259573,-20.1418033],[-44.1258338,-20.1421873],[-44.125911,-20.1424626],[-44.12632,-20.1427017],[-44.1266283,-20.1431809],[-44.1270796,-20.143447],[-44.1275708,-20.1439628],[-44.1280731,-20.1441653],[-44.1283959,-20.144158],[-44.1285503,-20.1437667],[-44.1293657,-20.1433052],[-44.130032,-20.1428973],[-44.1301014,-20.1426655],[-44.1300416,-20.1422375],[-44.1304064,-20.1418044],[-44.1310072,-20.1416231],[-44.1316509,-20.1410892],[-44.1323376,-20.1408676],[-44.1327775,-20.1405554],[-44.1333889,-20.1405788],[-44.1336359,-20.1407237],[-44.1341375,-20.1405499],[-44.1352987,-20.1396488],[-44.1354494,-20.1392602],[-44.1361249,-20.1389286],[-44.1364306,-20.1384955],[-44.1367768,-20.1384704],[-44.136892,-20.1381631],[-44.136731,-20.1378861],[-44.1368651,-20.1376342],[-44.1376488,-20.1370503],[-44.1379575,-20.1370648],[-44.1382739,-20.1367605],[-44.1387534,-20.1368385],[-44.1395098,-20.1364708],[-44.1396976,-20.1362744],[-44.1399872,-20.1363499],[-44.1406739,-20.1361233],[-44.1414678,-20.1362542],[-44.141736,-20.1367075],[-44.1424978,-20.1367277],[-44.1422832,-20.1363449],[-44.14253,-20.1362945],[-44.142766,-20.1366169],[-44.1429806,-20.1370601],[-44.1438496,-20.1376443],[-44.1439676,-20.1380271],[-44.1437209,-20.138289],[-44.1429162,-20.1389437],[-44.1426695,-20.1396287],[-44.1425729,-20.1400719],[-44.1424292,-20.141271],[-44.1420702,-20.1415952],[-44.1423326,-20.1427103],[-44.1422497,-20.1432808],[-44.1427331,-20.1438513],[-44.1430431,-20.1446072],[-44.1434444,-20.1449622],[-44.1436991,-20.1450998],[-44.1437531,-20.1453389],[-44.1435448,-20.1461649],[-44.1432747,-20.1468386],[-44.1433518,-20.1470125],[-44.1432515,-20.1471719],[-44.1432438,-20.1472444],[-44.1434059,-20.1473096],[-44.143375,-20.1475486],[-44.1435139,-20.1477877],[-44.1435371,-20.1479978],[-44.1435756,-20.148063],[-44.1437531,-20.1478602],[-44.1442856,-20.1480848],[-44.144548,-20.1486789],[-44.1448567,-20.1487875],[-44.1451223,-20.1489208],[-44.1451499,-20.1491498],[-44.144957,-20.1493309],[-44.1449724,-20.1494106],[-44.1451808,-20.1495048],[-44.1452657,-20.1497511],[-44.1455512,-20.1498598],[-44.145559,-20.1500264],[-44.1451731,-20.1501423],[-44.1450496,-20.1503162],[-44.1450496,-20.1504539],[-44.1453197,-20.1503742],[-44.1454123,-20.1502872],[-44.1455127,-20.1503017],[-44.1457133,-20.1506205],[-44.1459062,-20.1506857],[-44.1460297,-20.1511349],[-44.1465853,-20.1518086],[-44.1474805,-20.1522868],[-44.1483294,-20.152381],[-44.1486844,-20.1522506],[-44.1494407,-20.152381],[-44.1496877,-20.1526563],[-44.149896,-20.1528374],[-44.1500041,-20.1530982],[-44.1501584,-20.1531562],[-44.1505751,-20.1529895],[-44.1508684,-20.1530982],[-44.1512157,-20.1529243],[-44.1514337,-20.1528233],[-44.1515938,-20.1529098],[-44.1517713,-20.1527432],[-44.1519565,-20.1527505],[-44.1525199,-20.1531706],[-44.1529289,-20.1538589],[-44.1531758,-20.1543588],[-44.1534029,-20.1544607],[-44.1535962,-20.1547418],[-44.1540942,-20.1549456],[-44.1544877,-20.1551847],[-44.1550048,-20.1553368],[-44.1553598,-20.1552933],[-44.1560006,-20.1553874],[-44.1563225,-20.1553471],[-44.156537,-20.1551658],[-44.1567081,-20.1549286],[-44.1568154,-20.1545207],[-44.1571656,-20.1542646],[-44.1573817,-20.1539024],[-44.1578756,-20.1537212],[-44.1582048,-20.153584],[-44.1585267,-20.1536847],[-44.1585779,-20.1540255],[-44.1584544,-20.1545182],[-44.1587013,-20.1547355],[-44.1589637,-20.1546848],[-44.159165,-20.1549185],[-44.1590953,-20.1552207],[-44.1590524,-20.1555631],[-44.1589397,-20.1557998],[-44.1588539,-20.1561775],[-44.1585696,-20.1565098],[-44.1585324,-20.1569008],[-44.1583872,-20.1572451],[-44.1584355,-20.157512],[-44.1587573,-20.1576782],[-44.1589075,-20.1579854],[-44.1590819,-20.158076],[-44.1592971,-20.1578934],[-44.1597849,-20.1576554],[-44.1594418,-20.1575479],[-44.1593234,-20.1573952],[-44.1593071,-20.1572095],[-44.1593804,-20.1570827],[-44.159392,-20.1570031],[-44.1594576,-20.1568654],[-44.1594615,-20.1567096],[-44.1594036,-20.1565865],[-44.1594383,-20.1564126],[-44.1596235,-20.1563076],[-44.1595811,-20.1560902],[-44.1594306,-20.1560395],[-44.1593573,-20.1559598],[-44.1592989,-20.1556886],[-44.1593581,-20.1553314],[-44.1593742,-20.155125],[-44.1595191,-20.1548883],[-44.1595942,-20.1547725],[-44.1596654,-20.1546147],[-44.1596966,-20.1544773],[-44.1596992,-20.1542738],[-44.159622,-20.1541328],[-44.1595515,-20.1540291],[-44.159522,-20.1539478],[-44.1594012,-20.1538105],[-44.1593205,-20.1537251],[-44.1592107,-20.1536964],[-44.1591456,-20.1536231],[-44.1590756,-20.1535552],[-44.1589822,-20.1533794],[-44.1590626,-20.1530866],[-44.1590893,-20.1529659],[-44.1590863,-20.1528458],[-44.1589523,-20.15279],[-44.1587031,-20.1528541],[-44.1586062,-20.1528963],[-44.1584731,-20.1529324],[-44.158383,-20.1529544],[-44.1582183,-20.1529654],[-44.1579488,-20.152963],[-44.1576747,-20.1529664],[-44.1574324,-20.152936],[-44.1571908,-20.15292],[-44.1568406,-20.1528169],[-44.1565827,-20.152796],[-44.156549,-20.1527075],[-44.1564144,-20.1527012],[-44.1561922,-20.1527833],[-44.1561181,-20.1529224],[-44.1558825,-20.1531499],[-44.1556334,-20.1533016],[-44.155189,-20.1534027],[-44.1551284,-20.1534849],[-44.1552227,-20.1536113],[-44.155088,-20.1537756],[-44.1545831,-20.1540285],[-44.1541682,-20.1540161],[-44.1534228,-20.1534677],[-44.1529262,-20.1530149],[-44.152469,-20.152619],[-44.1523882,-20.1523725],[-44.1522536,-20.1522587],[-44.1519574,-20.1522398],[-44.1516611,-20.1521197],[-44.1514902,-20.1521404],[-44.1514457,-20.1522524],[-44.1513109,-20.1522273],[-44.1513268,-20.1520601],[-44.1511475,-20.1519377],[-44.1510223,-20.1519509],[-44.1510229,-20.1521048],[-44.150923,-20.1521066],[-44.1508465,-20.1519554],[-44.1506713,-20.1519616],[-44.150565,-20.1521506],[-44.1503903,-20.1521689],[-44.1501217,-20.1519806],[-44.1495385,-20.1517675],[-44.1491412,-20.1517472],[-44.1487593,-20.1515824],[-44.1484698,-20.1510894],[-44.1485506,-20.150805],[-44.1483554,-20.1505648],[-44.1482242,-20.1503077],[-44.1479387,-20.1501179],[-44.147722,-20.1499324],[-44.1474384,-20.1497793],[-44.1472916,-20.149661],[-44.1469954,-20.1493007],[-44.1469198,-20.1487246],[-44.1466878,-20.1485541],[-44.1461658,-20.1482787],[-44.1459409,-20.1481698],[-44.1455963,-20.1479336],[-44.1454469,-20.1477522],[-44.1452094,-20.1472276],[-44.1451805,-20.1471765],[-44.1452229,-20.1469817],[-44.1447766,-20.1467103],[-44.1447254,-20.1465987],[-44.1447671,-20.1463936],[-44.145016,-20.14633],[-44.1452277,-20.1458352],[-44.1453594,-20.1455273],[-44.1455142,-20.1454388],[-44.1458306,-20.1455083],[-44.1460529,-20.1454041],[-44.1461146,-20.1451723],[-44.1462548,-20.1443829],[-44.1462983,-20.1441919],[-44.1463602,-20.1439197],[-44.1460812,-20.1435772],[-44.1455072,-20.1434362],[-44.1450671,-20.1433586],[-44.1447356,-20.1429955],[-44.144418,-20.1425417],[-44.1442779,-20.1416946],[-44.1444785,-20.1415352],[-44.1445249,-20.1409918],[-44.1448104,-20.1404086],[-44.1446252,-20.1400862],[-44.1446483,-20.1399992],[-44.144849,-20.1399485],[-44.1452271,-20.1396514],[-44.1455898,-20.1393399],[-44.1455411,-20.1391748],[-44.1453459,-20.1391748],[-44.1451843,-20.1391116],[-44.1450256,-20.1392224],[-44.1442661,-20.1392613],[-44.1441946,-20.1391242],[-44.144437,-20.139099],[-44.1445582,-20.1389536],[-44.1447332,-20.1382393],[-44.1448342,-20.1381508],[-44.1453352,-20.1381734],[-44.1454586,-20.1380502],[-44.1453197,-20.1378256],[-44.1454123,-20.1375503],[-44.1451422,-20.1373257],[-44.1451114,-20.1368257],[-44.1446483,-20.1364345],[-44.144547,-20.135942],[-44.1443831,-20.1356603],[-44.1443937,-20.1354491],[-44.1447872,-20.135123],[-44.1447079,-20.1347634],[-44.1443324,-20.1346023],[-44.1444826,-20.13429],[-44.1447332,-20.1339789],[-44.1447401,-20.1334136],[-44.1450496,-20.133203],[-44.1453089,-20.1325872],[-44.1457056,-20.1323552],[-44.1463637,-20.1318546],[-44.1469453,-20.1315073],[-44.1470407,-20.1312947],[-44.1470287,-20.1310642],[-44.1474116,-20.1309255],[-44.1475081,-20.1306737],[-44.1473367,-20.1306315],[-44.1472453,-20.1308046],[-44.1470254,-20.1308349],[-44.1469181,-20.1307341],[-44.146902,-20.1303513],[-44.1466391,-20.1303614],[-44.1464299,-20.1300693],[-44.1464245,-20.1293843],[-44.1462422,-20.1292936],[-44.1460473,-20.129656],[-44.1459883,-20.1299401],[-44.1460819,-20.130213],[-44.1460596,-20.1305022],[-44.1459712,-20.1306683],[-44.1458249,-20.130715],[-44.1456917,-20.1307618],[-44.1455546,-20.1307654],[-44.1454785,-20.130784],[-44.1453142,-20.1309207],[-44.145269,-20.1311319],[-44.1451871,-20.1314277],[-44.145092,-20.1315659],[-44.1448957,-20.1316911],[-44.1445421,-20.1318436],[-44.1442037,-20.132225],[-44.1438604,-20.1323358],[-44.1437423,-20.1324063],[-44.1430509,-20.1325364],[-44.1426187,-20.1325726],[-44.1423208,-20.1324642],[-44.1420553,-20.1324059],[-44.1418651,-20.1322567],[-44.1419257,-20.1319877],[-44.1417536,-20.1318881],[-44.141264,-20.131953],[-44.1406856,-20.132013],[-44.1405356,-20.1318157],[-44.1403222,-20.1317327],[-44.1402727,-20.131464],[-44.1400016,-20.1312841],[-44.1399871,-20.1310437],[-44.1398981,-20.1309079],[-44.1398661,-20.1307765],[-44.1398019,-20.1306452],[-44.1396399,-20.1306887],[-44.1395734,-20.1310184],[-44.1394553,-20.131269],[-44.1393174,-20.1314557],[-44.1391846,-20.1318915],[-44.1389608,-20.1319639],[-44.1390919,-20.1321016],[-44.1393775,-20.1320944],[-44.1396257,-20.1322983],[-44.1397549,-20.1324281],[-44.1397093,-20.1327537],[-44.1397479,-20.1329059],[-44.1399717,-20.1328624],[-44.140481,-20.1333841],[-44.1405786,-20.1339191],[-44.1398701,-20.1344117],[-44.1393543,-20.1347897],[-44.139145,-20.1351361],[-44.1388446,-20.1353275],[-44.1384289,-20.1350732],[-44.138276,-20.1348919],[-44.1380292,-20.1348667],[-44.1375639,-20.1350651],[-44.1374647,-20.1353001],[-44.1372707,-20.1354781],[-44.1372889,-20.1358664],[-44.1369993,-20.1360276],[-44.1366828,-20.1358513],[-44.1364064,-20.1359708],[-44.1366774,-20.1362643],[-44.1366077,-20.1364507],[-44.1357279,-20.1370802],[-44.1353309,-20.1374328],[-44.13495,-20.1373824],[-44.1345692,-20.1368083],[-44.1344726,-20.1368486],[-44.1343278,-20.136773],[-44.1340542,-20.1369493],[-44.1333139,-20.1371004],[-44.1328848,-20.1375637],[-44.1328179,-20.1381806],[-44.1324937,-20.1385646],[-44.1323008,-20.1385791],[-44.1318532,-20.1380212],[-44.1317297,-20.1379705],[-44.131614,-20.1381661],[-44.1319072,-20.1389124],[-44.1316217,-20.1393109],[-44.1316063,-20.1398108],[-44.1308731,-20.1405806],[-44.129929,-20.1408173],[-44.1293335,-20.1412403],[-44.1287005,-20.1413511],[-44.1274448,-20.1411025],[-44.126029,-20.1403539],[-44.1253322,-20.1401948],[-44.1249386,-20.1398833],[-44.1246299,-20.1397746],[-44.1243339,-20.1393768],[-44.1241407,-20.1391351],[-44.1239444,-20.138928],[-44.1236118,-20.1385852],[-44.123129,-20.1381561],[-44.1227591,-20.1379209],[-44.1216838,-20.1368284],[-44.1212807,-20.1361157],[-44.1212547,-20.1355189],[-44.1210291,-20.135124],[-44.1210884,-20.1348843],[-44.1213244,-20.1347836],[-44.1216665,-20.1343622],[-44.1217804,-20.1333733],[-44.1222067,-20.1328841],[-44.1222793,-20.1324416],[-44.1223442,-20.1321187],[-44.122494,-20.1318724],[-44.1226107,-20.131343],[-44.1230893,-20.1306032],[-44.1239045,-20.1301163],[-44.1252627,-20.1297105],[-44.1259808,-20.1290695],[-44.126409,-20.1283304],[-44.1270995,-20.125348],[-44.1270581,-20.1240512],[-44.1264608,-20.12236],[-44.1259896,-20.1213359],[-44.1252386,-20.1203202],[-44.1249742,-20.1197857],[-44.1243657,-20.1193833],[-44.1227996,-20.118565],[-44.1215476,-20.1179694],[-44.121084,-20.1176603]]}}]} 2 | --------------------------------------------------------------------------------