Skip to content

Commit

Permalink
TEsts on NZ graph, correct data
Browse files Browse the repository at this point in the history
  • Loading branch information
carlaiau committed Apr 9, 2020
1 parent 77edf54 commit f35d329
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion client/data/countries.json
Original file line number Diff line number Diff line change
Expand Up @@ -41366,7 +41366,7 @@
"confirmed_per_mil": 194.452973084,
"deaths": 1,
"deaths_per_mil": 0.20468734,
"tests": 331166,
"tests": 33416,
"recovered": 127
},
{
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/advanced-country-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export default class AdvancedCountryPage extends React.Component{
field="confirmed"
type_of_area="state"
checkedAreas={this.props.checkedAreas}
accumulateFrom={100}
accumulateFrom={500}
accumulateOptions={[100, 250, 500, 1000, 5000]}
max_area_count={this.state.max_area_count}

Expand All @@ -201,7 +201,7 @@ export default class AdvancedCountryPage extends React.Component{
field="deaths"
type_of_area="state"
checkedAreas={this.props.checkedAreas}
accumulateFrom={10}
accumulateFrom={50}
accumulateOptions={[10, 50, 100, 250, 500]}
/>
</>
Expand Down
3 changes: 1 addition & 2 deletions client/src/components/country-overview-graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const CountryOverviewGraph = ({active_country, width, height, scale}) => {
else t.recovered = null

})

console.log(filteredData)

if(filteredData.length){
return (
Expand Down Expand Up @@ -88,7 +88,6 @@ const CountryOverviewGraph = ({active_country, width, height, scale}) => {
</AreaChart>
)
}
return <p className="is-size-3"><strong>No Deaths!</strong></p>
}

export default CountryOverviewGraph
11 changes: 3 additions & 8 deletions client/src/components/index-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,15 @@ export default class IndexPage extends React.Component{
<h2 className="is-size-3">
<strong className="has-text-white">Updates</strong>
</h2>
<p style={{marginTop: '10px'}}><strong>April 4</strong></p>
<p style={{marginTop: '10px'}}><strong>April 9</strong></p>
<p>Global Recovery data and <Link to='/new-zealand'>New Zealand</Link> test data.</p>
<p><strong>April 4</strong></p>
<p>State level graphs for <Link to='/united-states'>United States</Link>,{' '}
<Link to='/canada'>Canada</Link>,{' '}
<Link to='/australia'>Australia</Link> and {' '}
<Link to='/china'>China</Link>.</p>
<p><strong>April 3</strong></p>
<p>Regional data and demographics for <Link to='/new-zealand'>New Zealand</Link>.</p>
<p><strong>April 2</strong></p>
<p>State level cumulative graphs for
<Link to='/united-states'>United States</Link>,{' '}
<Link to='/canada'>Canada</Link>,{' '}
<Link to='/australia'>Australia</Link> and {' '}
<Link to='/china'>China</Link>.
</p>
<p style={{marginTop: '10px'}}><strong>Coming Soon</strong></p>
<p>
Regional level data for {' '}
Expand Down
3 changes: 3 additions & 0 deletions client/src/components/regional-graph-tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ const RegionalGraphToolTip = (tooltipProps) => {
"Hospitalized": "#ff793f",
"Recovered": "#2ecc71",
"Deaths": "#ff5252",
// For NZ Specific
"Total": "#ff793f",
" Confirmed": "#ff5252"
}
const tidy = new Intl.NumberFormat()
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const RegionalAreaGraph = ({active_region, width, height, scale}) => {
<YAxis width={55} scale={scale} domain={['auto', 'auto']} interval="preserveStart" tickCount={9}/>

<Area type="monotone" dataKey="total" name="Total" stroke="#ff793f" fillOpacity={1} fill="url(#total)" dot={false} strokeWidth={1}/>
<Area type="monotone" dataKey="confirmed" name="Confirmed" stroke="#ff5252" fillOpacity={1} fill="url(#confirmed)" dot={false} strokeWidth={1}/>
<Area type="monotone" dataKey="confirmed" name=" Confirmed" stroke="#ff5252" fillOpacity={1} fill="url(#confirmed)" dot={false} strokeWidth={1}/>
<Tooltip content={RegionalGraphTooltip}/>
<Legend verticalAlign="top" iconType="square"/>

Expand Down
1 change: 1 addition & 0 deletions client/src/context/GlobalContextProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const GlobalContextProvider = ({ children }) => {
deaths
deaths_per_mil
recovered
tests
}
highest_confirmed
highest_deaths
Expand Down
2 changes: 1 addition & 1 deletion processing/data/new-zealand.json
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@
"confirmed_per_mil": 194.452973084,
"deaths": 1,
"deaths_per_mil": 0.20468734,
"tests": 331166,
"tests": 33416,
"recovered": 127
},
{
Expand Down

0 comments on commit f35d329

Please sign in to comment.