Web application for displaying Dengue (and eventually other arbovirus) indicators on choropleth maps, on desktop and mobile.
The application is built using Vue, Vuetify and Pinia, and is deployed to Github Pages here: https://mrc-ide.github.io/arbomap/
Install dependencies: npm ci
Build: npm run build
Run in development mode, with hot reloading: npm run dev
Lint: npm run lint
or npm run lint-fix
Run unit tests: npm run test:unit
Run e2e tests: npm run test:e2e
We work with two sets of data:
- indicator values: these are provided by the researchers in the form of xlsx files, and can be found in the
data/raw
directory, withAdm1_
andAdm2_
prefixes. These provide indicator values (force of infection, seroprevalence at age 9, and age-stratified hospitalisations) for admin1 and admin2 regions, using GADM's region IDs. - geographical data defining the shape and locations of regions: we use GADM's geojson data, which has been simplified
using MapShaper. This data can be found in
public/dengue/may24/resources/geojson
.
When the app runs, all data is loaded from public/dengue/may24/resources
. Some of this data has been further processed from the
datasets described above. The data files are:
countryNames.json
: a handy mapping of country IDs to names, used for Excel download and country selection. Generated by the scriptgenerate_country_names_from_adm0_geojson.cjs
using data ingeojson/admin0
.geojson/all_adm1_0_5_pc_by_iso.json
: a single json file containing simplified admin1 level geojson for all countries - this is in the form of a dictionary where the country IDs are the keys, and is generated by the scripttransform_adm1_geojson_to_dict.cjs
using the filedata/raw/all_adm1_0_5pc.json
, which contains all features in the form of a single FeatureCollection. We load this when the app first loads, to display the global view with admin1 data from all countries.geojson/admin0
: country-level geojson, one file per country. We use these to draw an outline around the selected country,geojson/admin1
: admin1-level geojson, one file per country. We keep this only for the small set of countries which have no admin2 regions (countriesWithoutAdmin2
in config.json). This geojson is more detailed than the simplified regions defined in theall_adm1..
file. When one of these countries is selected we load and display from these files.geojson/admin2
: admin2-level geojson, one file per country. When a country is selected, we load and display from these files.indicators/admin1
: a single file containing all admin1 level indicator values. We load this when the app first loads, to display the global view. Generated from the xlsx file indata/raw
by the scriptprocess-data.R
indicators/admin2
: admin2-level indicator values, one file per country, loaded when the country is selected. Generated from the xlsx file indata/raw
by the scriptprocess-data.R
We also pre-generate the global Excel files available to download through the app. These can be found in the excel
sub-folder of the resources folder.
All public data is committed to github, and is not currently automatically updated using the scripts. So you need to remember to run scripts manually when required:
- if indicator values have changed: run
process-data.R
- if admin1 geojson has changed: run
transform_adm_geojson_to_dict.cjs
- if there are any changes to the list of countries, or country names: run
generate_country_names_from_adm0_geojson.cjs
Remember to copy resulting data from the data/processed
folder to the relevant part of public/dengue/may24/resources
.
- After copying new indicator values to the resources folder, run
npm run generate:global-excel
to regenerate the global Excel files.