Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for region-specific details around point sources #125

Open
devilgate opened this issue Dec 19, 2018 · 1 comment
Open

Add support for region-specific details around point sources #125

devilgate opened this issue Dec 19, 2018 · 1 comment

Comments

@devilgate
Copy link
Member

devilgate commented Dec 19, 2018

If I understood Paul's comment yesterday, the comparison around point sources should be with the local area, not the country as a whole.

Peter's comment copied from #129 when that was closed as a duplicate:

Currently the RIF analyses there in N bands with all the sites as on. It is proposed to extend the RIF to support:

  • Individual site analysis;
  • Pooled analysis (1 or more groups of sites). Groups would be defined from a categorisation variable in the shapefile. Would require changes to:
    • Shapefile load screen and controller;
    • JSON study definition format;
    • Study extract and result tables;
    • R risk analysis code.
@peterhambly
Copy link
Contributor

peterhambly commented Mar 8, 2019

This has been added as a separate model (pooledAnalysis) entitled "Individual site and pooled analysis (1 or more groups of sites). Groups are defined from a categorisation variable in the shapefile or from regional area identifiers or from a field in the shapefile".

I propose to add a "Multi Site Risk Stratification" dropdown which is only available if:

  • It is a risk analysis study;
  • Study area;

The choices of stratification type are one of:

  • "NONE": No stratification (i.e. as now);
  • "GEOLEVEL": Stratification by geolevel, usually region. Geolevels 2 and 3 are available for choice. Region is not defined (or definable) so you have to pick it from the list. The top geolevel with a single area is not included as it only has one area;
  • "MULTIPOLYGON": Stratification by a single multi polygon site - e.g. points + bands or exposure shapefile contoured shaped);
  • "SHAPEFILE_FIELD": Stratification by a field in the shape file.

risk stratfication1

SAHSULAND example showing choices:

2019-03-08 2

Changes required to the front end:

  • Detect multiple polygon usage on the basis of coordinates;
  • Add required fields to map table partial and shapefile load partial;
  • Add stratification support to map table controller and shapefile load controller;
  • Add stratification support to map and submission state controllers;
  • Add stratification support to extract/JSON load. In this case I have added a "stratification" by region of "01.002":
      "studySelectedAreas": [
        {
          "straficiation": "01.002",
          "nearestRifShapePolyId": "RIFPOLY_4",
          "id": "01.002.001500.6",
          "gid": "01.002.001500.6",
          "label": "01.002.001500.6",
          "centroid": {
            "lat": 54.9747,
            "lng": -6.59188
          },
          "distanceFromNearestSource": 24710.2,
          "intersectCount": 1,
          "shapeIdList": {
            "RIFPOLY_4": {
              "id": "01.002.001500.6",
              "band": 2,
              "rifShapeId": "RIF_2",
              "rifShapePolyId": "RIFPOLY_4",
              "distanceFromNearestSource": 24710.2,
              "centroid": {
                "lat": 54.85000264919724,
                "lng": -6.271886401793655
              },
              "radius": "25000"
            }
          },
          "band": 2
        }
        ,...

Changes to the database:

  • Add "stratification" column to g_rif40_study_areas, t_rif40_study_areas and rif40_study_areas. The comment is Stratification value. Multi Site Risk Stratification: NONE, <rifshapepolyid: poygon identifier for band 1> or <geolevel code: usually a regional code> or <field from shapefile DBF>; risk analysis only.;
  • Add the following columns to rif40_studies/t_rif40_studies:
    • stratification_field: VARCHAR(30)
    • stratify_to: JSON/VARCHAR(300) /* Postgres/SQL Server */
    • stratification_list: JSON/VARCHAR(300)
  1. Add the following column to rif40_study_areas/t_rif40_study_areas
    • stratification: VARCHAR(30)
  • Add "stratification" to extract;

Changes to middleware and R:

  • Support risk stratification;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants