raenonx / covid19-analyzer Goto Github PK
View Code? Open in Web Editor NEWCOVID-19 Data Analyzer using JavaFX for GUI. Coursework of UW Madison SP 2020 CS 400 AT-87.
COVID-19 Data Analyzer using JavaFX for GUI. Coursework of UW Madison SP 2020 CS 400 AT-87.
Apply the filter after the user clicks Enter
. If the filter query is invalid, display some popup indicating that the filter query failed instead.
Example: %state% = WI & %county% = Dane, WI
yields INCOMPLETE_EXPRESSION
A popup GUI to display the documentation.
Update the Chart
in filtered section after applying the filter.
This is the first screen when the application starts.
Click start button or similar to start loading the resources (Population data / state name data / Case data).
data/data.csv
- case datadata/uspops.csv
- US population datadata/usstates.csv
- US state name conversion datafilterdoc.html
- Documentation of the filter query syntaxShould modify Utils.generateHGridPane()
to let the generated GridPane
dock to bottom.
FilterParameter
- 1d62534Notes
FilterCondition
Enums
STATE
- state name / abbreviationCOUNTY
- county nameCONFIRMED
- confirmed casesFATAL
- fatal casesCONFIRMED_PER100K
- confirmed cases per 100K residentsFATAL_PER100K
- fatal cases per 100K residentsDEATH_RATE
- death rate (%)LATITUDE
- latitude of the countyLONGITUDE
- longitude of the countyZIP_CODE
- zip codeDATE
- dateMethods
FilterParameter parse(String word)
word
to be one of the parameter above. If not parsable, return null
.FilterComparator
- 1d62534Notes
FilterCondition
Enums
GT
- >GTE
- >=LT
- <LTE
- <=EQ
- =Methods
FilterComparator parse(String word)
word
to be one of the comparator above. If not parsable, return null
.FilterConditionEntity
- bc56bacNotes
Fields
FilterParameter param
FilterComparator cmp
- the comparator to be used against the given valueString val
- will be casted when going to be usedFilterCondition
Notes
conditions
is ORconditions
is AND[[(FATAL > 50), (CONFIRMED < 100)], [(STATE = "WI")]]
(%fatal% > 50 AND %confirmed% < 100) OR %state% = "WI"
Fields
List<FilterConditionBody> conditions
FilterSyntaxParser
Notes
FilterCondition
. Singleton.BST
Notes
TreeMap
as its underlying DS.int sum()
: sum of all node valuesint sum(Predicate<? super T> predicate)
: sum of all node values using the given predicateISummable
Notes
Methods
int getValue()
BSTDirectSum
Notes
BSTIndirectSum
Notes
Date | County | State | Confirmed | Fatal | |
---|---|---|---|---|---|
Index | 0 | 1 | 2 | 3 | 4 |
Omitted because it is calculated nationally.
Omitted because it is calculated by (confirmed - fatal)
.
Region
Methods
int getPopulation()
UnitedStates implements Region
Fields
List<State> states
static UnitedStates current
- current parsed UnitedStates
Methods
State getState(String state)
State
.state
can be the state's name or abbreviation.County getCounty(String countyState)
County
.countyState
needs to be in the format of <COUNTY>, <STATE>
for disambiguation. For example: Dane, WI
.State implements Region, Comparable<String>
Notes
Comparable
will use name
which will then be used in BSTs.Fields
String name
String abbr
List<County> counties
County implements Region
Notes
Comparable
will use name
which will then be used in BSTs.Fields
String name
double latitude
double longitude
PopulationDataReader
Methods
UnitedStates parse(String filePath)
- parse the US population data file to be an UnitedState
instance.Class to get the daily case count stats and output the table as text.
#212529
- Main#6C757D
- Secondary#DC3545
- Fatal#007BFF
- Filter Button BackgroundUpdate the Label
in filtered section after applying the filter.
Check TODO
tags in application.MainLayout
.
A class to produce a table which can then be attached to the main layout.
DataEntry
Notes
Fields
State state
County county
int confirmedCases
int fatalCases
Date date
Methods
double confirmedPer100K(bool isState)
isState
is false
, then it takes the population of the county
.double fatalPer100K(bool isState)
isState
is false
, then it takes the population of the county
.double deathRatePercentage(bool isState)
isState
is false
, then it takes the population of the county
.DataHolder
Notes
Methods
BST<State, BST<County, List<DataEntry>>>
dataTreeMap<Integer, List<DataEntry>> confirmedCase/fatalCase
HashTable<String, List<DataEntry>> zipCode
List<DataEntry> data
DataCollection filter(FilterCondition condition)
String summaryText()
int totalConfirmed() / totalFatal()
double avgGrowthConfirmed(bool isPer100K) / avgGrowthFatal(bool isPer100K)
void outputSummary(String path)
void outputData(String path)
Early raw data only have states but not county. Use the existing population data to get the population for these early raw data.
Check the overall data entries can get a sense of what null county will have.
Change uspops.csv
to be empty county name / state name only.
Invalid combinations
FilterParameter.ZIP_CODE
and not FilterComparator.EQ
Export some things from the filtered data.
BTreeNode
for this treeState | County | Population | Latitude | Longitude | ZIPs |
---|
zips
usually contains multiple codes which are separated by a space.
-1 should be an empty string instead.
A class to produce a line chart to be attached on the main layout.
As title.
Only keeps the necessary data.
Use Python
to do this task.
Add a new issue (#18) to record the header convention after this was completed.
git rebase
to apply newly implemented thing when the task has not completed yet.CODE - COMMIT_MESSAGE
Add - Updated README.md
Add - #8 FilterCondition
Code | Full Form |
---|---|
ADD | Add |
IMP | Improvements |
FIX | Fixes |
Brief and descriptive, recommended < 120 characters.
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.