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

Genie.jl: Julia Web Framework #21

Closed
3 of 4 tasks
Diaga opened this issue Jun 3, 2020 · 7 comments · Fixed by #25
Closed
3 of 4 tasks

Genie.jl: Julia Web Framework #21

Diaga opened this issue Jun 3, 2020 · 7 comments · Fixed by #25
Assignees
Labels
component/backend Related to backend component of project discuss Group discussions to get input from everyone resource Libraries, documentation, links etc. used in solution

Comments

@Diaga
Copy link
Member

Diaga commented Jun 3, 2020

Genie is going to be as a middleman for communication between flutter app and prediction model through API.
Also, exposes endpoints for Use Case 3 in #1.

Repo link here.

Progress

@Diaga Diaga added the resource Libraries, documentation, links etc. used in solution label Jun 3, 2020
@Diaga Diaga self-assigned this Jun 3, 2020
@Diaga Diaga added the discuss Group discussions to get input from everyone label Jun 3, 2020
@Diaga
Copy link
Member Author

Diaga commented Jun 3, 2020

Endpoint

api/prediction

Query Params

  • longitude (required)
  • latitude (required)

Method

GET

Response

{
   "nearby":[
      {
         "longitude":-63.53797,
         "chance":0.59,
         "latitude":-81.46996
      },
      {
         "longitude":-63.53797,
         "chance":0.59,
         "latitude":-81.46996
      },
      {
         "longitude":-63.53797,
         "chance":0.59,
         "latitude":-81.46996
      }
   ],
   "requested":{
      "longitude":-63.53797,
      "chance":0.59,
      "latitude":-81.46996
   }
}

Edit: Updated response

Questions

@michiboo Does the following JSON provide all the info you might need for use case #1 and #2 in maps portion?
@RashikaKarki I think you will need a time series for the specific location to draw the visualization graphs, is that correct?
@zzj0402 We will get this chance parameter from the model right, given input of longitude and latitude, right?

@michiboo
Copy link
Collaborator

michiboo commented Jun 3, 2020

@Diaga Yes I think LatLong points is enough

@Diaga
Copy link
Member Author

Diaga commented Jun 3, 2020

@Diaga Yes I think LatLong points is enough

@michiboo We might need the chance to maybe add intensity/opacity to the "red" color on the map overlay. Does that work?

@michiboo
Copy link
Collaborator

michiboo commented Jun 3, 2020

@Diaga so from client side we just need to post lat/long and in response receive chance and higher the chance the more red for the line of circle. So it work.

But the things is should we use the user point as center of circle or the response's point as centre of circle? Also how many lat/long points should be return from the model? Just one or list of points?
I would suggest it return a radius as well from the model if it is possible. or we can just convert it in the genie/in flutter client. So higher chance == larger radius == more red?

@RashikaKarki
Copy link
Member

Yes, timestamp and total no. of infected people will be needed for the visualization.

@Diaga
Copy link
Member Author

Diaga commented Jun 3, 2020

@Diaga so from client side we just need to post lat/long and in response receive chance and higher the chance the more red for the line of circle. So it work.

Yes, exactly.

But the things is should we use the user point as center of circle or the response's point as centre of circle?

In an ideal situation, the user point would be the same as response point. I think this will depend on data but we should go with response's point as center.
Because realistically, the data cannot cover every road on the map. And I don't think our model predicts for locations about which we have no data.

Also how many lat/long points should be return from the model? Just one or list of points?

There are two main keys for the json.

  • "requested": This will return just one point closest to where the user requested.
  • "nearby": This will return multiple points (dynamic, could be 0 upto a maximum of 5?) near the user's requested point, upto a specified distance threshold like 1km. This way the user can see hotspots near his location as well.

I would suggest it return a radius as well from the model if it is possible. or we can just convert it in the genie/in flutter client. So higher chance == larger radius == more red?

Great! I think this formula would be better to calculate radius. We may have to experiment to see what works best.
Let's do it on the flutter side so we can easily see changes on hot reload.

@Diaga
Copy link
Member Author

Diaga commented Jun 3, 2020

Yes, timestamp and total no. of infected people will be needed for the visualization.

Got it.

@Diaga Diaga added the component/backend Related to backend component of project label Jun 3, 2020
@Diaga Diaga closed this as completed in #25 Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/backend Related to backend component of project discuss Group discussions to get input from everyone resource Libraries, documentation, links etc. used in solution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants