This application receives attributes through the url (GET parameters) that allows to the user to configure the title, chart text, map, chart and attribute to display.
| Parameter | Description | Options |
|---|---|---|
| title | This is the title for the component | N/A |
| text | This is the text for the chart | N/A |
| scenario | This selects the datasource (endpoint) to get the geojson file.There are two different sources, one using points, and the other polygons. This object is defined in src/utils/services/dataSources.js |
|
| mapType | This selects which map should be displayed. Bubble and Density maps need a geojson composed of data points. Choropleth needs a geojson composed of polygons. Swipe map will use the same datasource for both maps, but the left will use property and the right map property2. |
|
| chart | This selects which data chart should be displayed. |
|
| property | Property to draw. This indicates what property will be used to draw the multiple objects in the map, i.e. sC_Res30_b0, sDt_Complete_b0. | This is an attribute from each feature |
| property2 | PProperty to draw in the right map on the Swipe maps component. This indicates what property will be used to draw the multiple objects in the map, i.e. sC_Res30_b0, sDt_Complete_b0. | This is an attribute from each feature |
| center | This is the center for the map. This is composed by lat and long separated by comma (,). | Example: 49.3,-123.07 (default) |
Usable once app is running on localhost, as per README.md
To create viewport based variants of the presentation, enclose different viewport scenarios in media queries with different CSS grid configurations. The grid configurations allow for very flexible layout. I have defined a 3x3 grid and these can be easily defined like so:
For instance for desktop, 701px viewport or larger:
@media (min-width: 701px) {
.infoViz {
grid-template-areas:
"leaflet leaflet narrative"
"leaflet leaflet narrative"
"leaflet leaflet chart";
}
}
And here is a mobile viewport query with a stacked rather than portrait view:
@media (max-width: 700px){
.infoViz {
grid-template-areas:
"leaflet leaflet leaflet"
"narrative narrative narrative"
"chart chart chart";
}
}
Both of these are found in the src/App.css but can be in any style sheet exposed to the components.