Code Monkey home page Code Monkey logo

django-ebola's People

Contributors

caseymm avatar

Watchers

 avatar  avatar  avatar  avatar

django-ebola's Issues

Figure out what to do with location based data

Whether it comes as pdf or json, what's the best way to use it?

  • Possible to do something with rate of change over time if we grab as many previous ones as we can and load them all in?

Load basic front end views

  • summary view of location stats
  • list view of sitreps
  • detail view sitreps
  • list view of locations
  • detail view of locations

CrisisNET API data

Is any of this data worth cataloging?

  • would be able to save locations and geocode them - wouldn't be live query, but would be quicker than geocoding in browser
  • take a look at what other data they provide that may be useful outside of mapping

Make some bad json!

No rush, just for the next data load whenever that is...
For the sparkline data can you remove the quote from the value (not the key) so it is just the array that includes the [ ] of new_weekly_deaths and new_weekly_cases?

ex.
"new_weekly_deaths": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 6, 4, 2, 4, 15, 1],


for your refrence from a previous email:
for sparkline/'aaData'
ex) {"aaData": [{"cases_cum": 63, "new_weekly_deaths": "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 6, 4, 2, 4, 15, 1]", "total_deaths_all": 34,...
http://django-ebola.herokuapp.com/data/?format=table_sparkline_ex_natl

SitRep data organization scheme?

Currently broken down by location/date. Each of those entries has fk to location and to date.

Do we want to keep doing it this way, or have one giant model? Not sure what would be best considering what type of data/json we want to pull out.

regional file update

regional_drilldown.json

{
"aaData": [{"daily_deaths": [0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, -2, 0, 0, 5, 0, -8, 0, 0, 0, 0], "cases_cum": 63, "total_deaths_all": 34, "hcw_cases_cum": 5, "hcw_deaths_cum": 4, "location__name": "Bomi County", "daily_cases": [0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 4, 0, 19, 0, 0, 0, 0]}, {"daily_deaths": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "cases_cum": 3, "total_deaths_all": 2, "hcw_cases_cum": 0, "hcw_deaths_cum": 0, "location__name": "Grand Gedeh", "daily_cases": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}, {"daily_deaths": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0], "cases_cum": 46, "total_deaths_all": 19, "hcw_cases_cum": 3, "hcw_deaths_cum": 1, "location__name": "Grand Bassa", "daily_cases": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 6, 0, 0]}, {"daily_deaths": [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 2], "cases_cum": 147, "total_deaths_all": 41, "hcw_cases_cum": 26, "hcw_deaths_cum": 5, "location__name": "Bong County", "daily_cases": [0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 3]}, {"daily_deaths": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "cases_cum": 0, "total_deaths_all": 0, "hcw_cases_cum": 0, "hcw_deaths_cum": 0, "location__name": "Grand Kru", "daily_cases": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}, {"daily_deaths": [0, 5, 0, 0, 0, 0, 0, 35, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "cases_cum": 576, "total_deaths_all": 437, "hcw_cases_cum": 59, "hcw_deaths_cum": 28, "location__name": "Montserrado County", "daily_cases": [0, 16, 0, 0, 0, 0, 0, 22, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11]}, {"daily_deaths": [0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "cases_cum": 108, "total_deaths_all": 72, "hcw_cases_cum": 3, "hcw_deaths_cum": 0, "location__name": "Nimba County", "daily_cases": [0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 5, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]}, {"daily_deaths": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "cases_cum": 1, "total_deaths_all": 0, "hcw_cases_cum": 0, "hcw_deaths_cum": 0, "location__name": "Gbarpolu County", "daily_cases": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}, {"daily_deaths": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "cases_cum": 2, "total_deaths_all": 0, "hcw_cases_cum": 0, "hcw_deaths_cum": 0, "location__name": "Sinoe County", "daily_cases": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}, {"daily_deaths": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "cases_cum": 9, "total_deaths_all": 5, "hcw_cases_cum": 0, "hcw_deaths_cum": 0, "location__name": "River Gee County", "daily_cases": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0]}, {"daily_deaths": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1], "cases_cum": 10, "total_deaths_all": 9, "hcw_cases_cum": 3, "hcw_deaths_cum": 0, "location__name": "Grand Cape Mount", "daily_cases": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0]}, {"daily_deaths": [10, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8], "cases_cum": 628, "total_deaths_all": 320, "hcw_cases_cum": 20, "hcw_deaths_cum": 17, "location__name": "Lofa County", "daily_cases": [30, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 31]}, {"daily_deaths": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "cases_cum": 0, "total_deaths_all": 0, "hcw_cases_cum": 0, "hcw_deaths_cum": 0, "location__name": "Maryland County", "daily_cases": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}, {"daily_deaths": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "cases_cum": 1, "total_deaths_all": 1, "hcw_cases_cum": 0, "hcw_deaths_cum": 0, "location__name": "RiverCess County", "daily_cases": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}, {"daily_deaths": [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8], "cases_cum": 245, "total_deaths_all": 111, "hcw_cases_cum": 32, "hcw_deaths_cum": 19, "location__name": "Margibi County", "daily_cases": [14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19]}]
}

fixes

  • fix file path
  • auto update data on form submit
  • check live db
  • push heroku master

export_hc_county

Make standard json file with cases and deaths as separate lists:
dictionary keys

{
"deaths":{"total_deaths": [0, 17, 0, 3, 3, 2, 0, 34, 37, 0, 135, 11, 5, 0, 0]},{name: total_deaths_confirmed,data: [19, 11, 0, 13, 4, 0, 0, 146, 25, 0, 169, 27, 0, 0, 0]},{name: total_deaths_probable,data: [15, 13, 0, 3, 2, 0, 0, 140, 49, 0, 133, 34, 0, 1, 0]
},
"cases":{
[{"name: cases_cum_probable,data:" [31, 40, 0, 12, 4, 0, 0, 345, 89, 0, 309, 50, 3, 0, 0]},{name: cases_cum_confirmed,data: [31, 24, 0, 13, 4, 0, 0, 220, 30, 0, 225, 41, 0, 1, 1]},{name: cases_cum_suspected,data: [1, 83, 1, 21, 2, 3, 0, 63, 126, 0, 42, 17, 6, 0, 1]}]
}
}

create csv view

  • generate for each date (list and detail just like for locations)
  • supply 'latest' url that will redirect to supplied SitRep.objects.latest('formatted_date')

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.