Giter Club home page Giter Club logo

healthsites's Introduction

Welcome to the healthsites code base!

Join the chat at https://gitter.im/healthsites/healthsites

Healthsites is a framework for capturing, publishing and sharing critical health and sanitation related data to help make these facilities more accessible and relevant to the communities they serve. Our framework does not limit our endeavours to these domains and in the future we plan to support additional domains where it is helpful in humanitarian work.

Please note that this project is in the early phase of its development.

You can visit a running instance of healthsites at healthsites.io.

Status

These badges reflect the current status of our development branch:

Tests status: Build Status

Coverage status: Coverage Status

Development status: User stories in the backlog

License

Data: Open Database License
Data credits : © OpenStreetMap contributors
Code: 3-clause BSD License

Our intention is to foster widespread usage of the data and the code that we provide. Please use this code and data in the interests of humanity and not for nefarious purposes.

Setup instructions

  1. Copy the .env template to project root
cp deployment/.template.env .env
  1. Copy docker-compose file
cp deployment/docker-compose.override.template.yml deployment/docker-compose.override.yml
  1. Change the PBF file to smaller one, i.e. from Senegal
# change this
RUN wget https://planet.openstreetmap.org/pbf/planet-latest.osm.pbf  -O settings/country.pbf
# to this
RUN wget https://download.geofabrik.de/africa/senegal-and-gambia-latest.osm.pbf -O settings/country.pbf
  1. Run make

Additional steps:

  1. Because the imposm may fail as the database container is not ready, you may need to restart it.
docker restart healthsites_osm_imposm

healthsites's People

Contributors

anitanh avatar danieldegroot2 avatar dependabot[bot] avatar dimasciput avatar dodobas avatar ericboucher avatar gitter-badger avatar gustry avatar ismailsunni avatar jnicho02 avatar mariasolovyeva avatar markherringer avatar meomancer avatar milovanderlinden avatar myarjunar avatar nixilla avatar timlinux avatar tyrasd avatar waffle-iron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

healthsites's Issues

We need to document required functionality for v1

The first version should provide the following functionality:

Map with OSM underlay

  • Full screen map with top bar (as per wireframe above) (see #20 )
  • Sites should be rendered as geojson using leaflet point clustering (how will this scale to ~1000 of points?) (see #21)
  • Clicking on a site should reveal the item info and its contextual info

Point creation

  • Click 'add site to map'
  • On clicking 'add site to map', the user should be prompted to log in using oauth if they are not already logged in (see #22)
  • Return user to same position on the map with marker cross hairs activated
  • User locates the site by dragging the map and toggling the satelite image and map view (need a ticket)
  • Clicking the site on the map activates the red marker and the small pop-up window as per http://users.inasafe.org/
  • User completes form
  • Lat long auto-populated
  • Click the 'more..' link in the small form opens the slider window on the right with data loaded
    home-add-location-inasafe
  • Place the cursor in the next empty field
  • Move the map and the site position so that it is horizontal with the first field
  • After the site is accepted, it should turn into a blue marker as per image below and the new site modal should be removed

selection_009

selection_010

About

There should be a simple about box - @markherringer to provide markup

Add google analytics

<script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-56378524-1', 'auto'); ga('send', 'pageview'); </script>

We need to show healthsites as points on a map

Obviously, rendering a huge number of points is going to be PITA.

  • a single .geojson from the server
    • (-) it will take time to download to client
    • (-) clustering depends on the client library and requires resources (probably not too much)
    • (-/+) it possible to control what gets downloaded, but we need to dynamically 'render' geojson on the server
    • (-/+) best supported by Leaflet and Openlayers3
    • (+) user can interact with every single point
  • server based raster rendering
    • (-) it requires map rendering infrastructure
    • (-) client needs to issue a 'GetFeatureInfo' request to pull more data from the server
    • (+) works in every browser
  • server based vector tile rendering
    • (-) the new kid on the block (forget about older browsers (corporate environment))
    • (-) requires a custom rendering backend implementation (based on Tilestashe vecLayer)
    • (+) full control over output (baked in permissions, max features per zoom level)
    • (-/+) supported by Leaflet and Openlayers3

Option 1. and Leaflet.js are probably best bet for initial implementation

We need a help page

Lets have a modal with disqus set up in it.

    <div id="disqus_thread"></div>
    <script type="text/javascript">
        /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
        var disqus_shortname = 'healthsites'; // required: replace example with your forum shortname

        /* * * DON'T EDIT BELOW THIS LINE * * */
        (function() {
            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
            dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
        })();
    </script>
    <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>

Sierra-Leone import fails on line 17

I haven't had time to look why but I get this import error for Sierra-Leone:

timlinux@channel:~/dev/python/healthsites$ scripts/manage.sh import_csv Health testsource /home/web/data_for_import/sierra-leone.tsv /home/web/data_for_import/sierra-leone.json
Running django management command
---------------------------------
*********** Setting up sentry logging ************
{'DATABASE_NAME': 'gis', 'TERM': 'xterm', 'HEALTHSITES_POSTGIS_PORT_5432_TCP_ADDR': '172.17.0.28', 'HEALTHSITES_POSTGIS_ENV_USERNAME': 'docker', 'DEBIAN_FRONTEND': 'noninteractive', 'HEALTHSITES_POSTGIS_PORT_5432_TCP': 'tcp://172.17.0.28:5432', 'HOSTNAME': 'healthsites-manage', 'HEALTHSITES_POSTGIS_PORT': 'tcp://172.17.0.28:5432', 'DATABASE_HOST': 'healthsites-postgis', 'HEALTHSITES_POSTGIS_NAME': '/healthsites-manage/healthsites-postgis', 'HEALTHSITES_POSTGIS_PORT_5432_TCP_PORT': '5432', 'DJANGO_SETTINGS_MODULE': 'core.settings.prod_docker', 'HEALTHSITES_POSTGIS_ENV_PASS': 'docker', 'HEALTHSITES_POSTGIS_PORT_5432_TCP_PROTO': 'tcp', 'DATABASE_PASSWORD': 'docker', 'PATH': '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'HOME': '/', 'HEALTHSITES_POSTGIS_ENV_DEBIAN_FRONTEND': 'noninteractive', 'DATABASE_USERNAME': 'docker'}
Traceback (most recent call last):
  File "/home/web/django_project/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 377, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 338, in execute
    output = self.handle(*args, **options)
  File "/home/web/django_project/localities/management/commands/import_csv.py", line 33, in handle
    options["use_tabs"]
  File "/home/web/django_project/localities/importers.py", line 30, in __init__
    self.attr_map = json.load(attr_map_file)
  File "/usr/lib/python2.7/json/__init__.py", line 290, in load
    **kw)
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Expecting property name: line 17 column 5 (char 429)

Unique ID required for upstream ID

We need to discuss how best to achieve this. If we can't create one we will need to establish a process that enables us to identify duplicate entries.

As a registered user I want to request moderation permissions

As a registered user living in an area I would like to request moderation permissions so that I can manage the details of locations in my area.

This feature thinks about local administrators who want to take the responibility for managing the healthsites.

As a registered user I want to request a location validation from another user so that I can confirm a locations details

tweet this location
http://www.konektaz.info/location/desmond-tutu-hiv-foundation/

This information is considered:
current
because:

  • it was recently edited
  • it was manually verified by a trusted user
  • it has been verified using social harvesting
  • 13 people have verified its existence in the last 3 months
  • 222 people have verified its existence in the last year

https://www.flickr.com/photos/rainbowcountry/12634110243/in/set-72157643606894844/

As an administrator I want to assign users as 'trusted'

This feature will allow administrators the opportunity to delegate healthsite validation work to people familiar with the region.
In addition it will give us the opportunity to add credibility to the location data.

User story:
As an administrator I want to assign users as trusted so that I can trust them to load good data.

Normal course:
User makes contact through share data form.
Administrator returns email and arranges Skype call to discuss trusted user status and determine data source.
Admin requests contact with organisation to confirm user is authorised to share the data on behalf of the organisation
Administrator makes decision regarding trusted user status and associates organisation/s to the user profile using a drop down list.

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

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

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.