caseymm / django-ebola Goto Github PK
View Code? Open in Web Editor NEWAggregating and analyzing data provided about ebola in Liberia.
License: MIT License
Aggregating and analyzing data provided about ebola in Liberia.
License: MIT License
Whether it comes as pdf or json, what's the best way to use it?
possibly just create a text field to hold the array or such on the location model?
Is any of this data worth cataloging?
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
Documents is broken. Not critical to function, but would be nice to have.
have:
main_weekly.json
main_daily.json
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.
with one entry
export json
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]}]
}
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]}]
}
}
?format=json&fields=deaths,cases_cum,hcw_cases_cum
looking fun...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.