|
1 | | -<!-- ===================================================================== --> |
2 | | -<!-- This file is generated from .tpl/README.rmd --> |
3 | | -<!-- ===================================================================== --> |
| 1 | +# world-datas-analysis |
4 | 2 |
|
| 3 | +Miscellaneous worlds data and analysis |
5 | 4 |
|
| 5 | + |
6 | 6 |
|
| 7 | +## Requirements |
7 | 8 |
|
| 9 | +Installing prerequisites on various distributions |
8 | 10 |
|
9 | | -# world-datas-analysis |
10 | | -miscellaneous worlds data and analysis |
| 11 | +```bash |
| 12 | +./install_requirements.sh |
| 13 | +``` |
11 | 14 |
|
12 | | -## Providers of dataset |
| 15 | +Works on : |
13 | 16 |
|
| 17 | +- Alpine |
| 18 | +- Archlinux |
| 19 | +- Ubuntu |
14 | 20 |
|
15 | | -|Dataset |Description | Avg scope|Nb datasets |Max variables | Nb observations| |
16 | | -|:----------------------------|:-------------------------------------------------------------|---------:|:--------------------------------------------------|:----------------------------------------------------|---------------:| |
17 | | -|[geonames](dataset/geonames) |[Geonames entries](https://download.geonames.org/export/dump) | 4070489|[1](dataset/dataset_geonames.md#geonames-datasets) |[15](dataset/dataset_geonames.md#geonames-variables) | 4823955| |
18 | | -|[owid](dataset/owid) |[Our World In Data](https://ourworldindata.org) | 836|[1472](dataset/dataset_owid.md#owid-datasets) |[1](dataset/dataset_owid.md#owid-variables) | 32609745| |
19 | | -|[vigilo](dataset/vigilo) |[Vigilo observations](https://vigilo.city) | 232|[1](dataset/dataset_vigilo.md#vigilo-datasets) |[9](dataset/dataset_vigilo.md#vigilo-variables) | 31623| |
| 21 | +## Usage |
20 | 22 |
|
21 | | -## Todo |
| 23 | +``` |
| 24 | +just import # Import data to PostgreSQL (used by grafana) |
| 25 | +just chart # open the grafana (admin/admin) |
| 26 | +just stop # stop the grafana server |
| 27 | +``` |
22 | 28 |
|
23 | | -| Status | Category | Scope | Description | Sample Report | |
24 | | -|--------|-----------------------------|-------------|-----------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------| |
25 | | -| [_] | Geonames | Cities | [Geonames](https://download.geonames.org/export/dump/) | [International Covid-19](international/covid-19/README.md) / [French Covid-19](countries/french/covid-19/README.md) | |
26 | | -| [_] | Covid | Countries | [Johns Hopkins University](https://github.com/CSSEGISandData/COVID-19) | [International Covid-19](international/covid-19/README.md) / [French Covid-19](countries/french/covid-19/README.md) | |
27 | | -| [_] | Population | Countries | [United nation](https://population.un.org/wpp/Download/Standard/Population/) | | |
28 | | -| [_] | Population | Cities | [insee](https://www.insee.fr/fr/information/2008354) | | |
29 | | -| [_] | Population | Cities | [insee estimation](https://www.insee.fr/fr/statistiques/1893198) | | |
30 | | -| [_] | Weather | Cities | [European Climate Assessment & Dataset](https://www.ecad.eu/dailydata/predefinedseries.php) | | |
31 | | -| [_] | Weather | Cities | [European Centre for Medium-Range Weather Forecasts](https://confluence.ecmwf.int/display/WEBAPI/Accessing+ECMWF+data+servers+in+batch) | | |
32 | | -| [_] | bike counter | Montpellier | [Montpellier 3M/Velocité](https://compteurs.velocite-montpellier.fr/) | | |
33 | | -| [_] | Rental bike | Montpellier | [Montpellier 3M](https://data.montpellier3m.fr/dataset/courses-des-velos-velomagg-de-montpellier-mediterranee-metropole) | | |
34 | | -| [_] | universitetetioslo | Countries | [CO2 emissions](https://folk.universitetetioslo.no/roberan/GCB2020.shtml) | | |
35 | | -| [_] | NASA | Countries | [Anormal température](https://data.giss.nasa.gov/gistemp/) | | |
36 | | - |
37 | | -## Init environment |
| 29 | +**Note:** The grafana account is `admin/admin` |
38 | 30 |
|
39 | | -``` |
40 | | -# Python |
41 | | -python -m venv .venv |
42 | | -source .venv/bin/activate |
43 | | -pip install --only-binary=:all: -r requirements.txt |
| 31 | +## Scopes reference |
44 | 32 |
|
45 | | -# R |
46 | | -renv::restore() |
47 | | -``` |
| 33 | +When you add new data to this project, you can sync with reference data by |
| 34 | +scope. |
48 | 35 |
|
49 | | -## Import and export datas |
| 36 | +For example, if you import a new dataset associated with cities, you can link |
| 37 | +them with geonames city elements |
50 | 38 |
|
51 | | -``` |
52 | | -# All in one |
53 | | -./importer/<dataset>/import_and_export.sh |
54 | | -# or step by step |
55 | | -./importer/<dataset>/download.sh |
56 | | -./importer/<dataset>/import.sh |
57 | | -./importer/<dataset>/export.sh |
58 | | -``` |
59 | | -## Update this Readme.md page |
60 | | -``` |
61 | | -./build_rmarkdown_pages.sh |
62 | | -``` |
| 39 | +<!-- BEGIN SCOPEREFERENCE --> |
63 | 40 |
|
| 41 | +| provider | dataset | wda_scope | source | nb_variables | nb_entries | |
| 42 | +| -------- | ---------------------- | --------- | -------------------- | -----------: | ---------: | |
| 43 | +| geonames | wda_geonames_cities | city | https://geonames.org | 98 | 534217 | |
| 44 | +| geonames | wda_geonames_countries | country | https://geonames.org | 20 | 252 | |
64 | 45 |
|
65 | | -``` |
66 | | -# Use virtualenn python environment |
67 | | -source .venv/bin/activate |
| 46 | +<!-- END SCOPEREFERENCE --> |
| 47 | + |
| 48 | +## Providers |
| 49 | + |
| 50 | +<!-- BEGIN PROVIDER --> |
68 | 51 |
|
69 | | -# owid |
70 | | -importer/owid/download.sh |
71 | | -importer/owid/import.sh |
| 52 | +| provider | description | website | nb_datasets | nb_observations | |
| 53 | +| -------- | ----------------------------------------------------- | ------------------- | ----------: | --------------: | |
| 54 | +| vigilo | Observations of the collaborative citizen application | https://vigilo.city | 1 | 25548 | |
72 | 55 |
|
| 56 | +<!-- END PROVIDER --> |
73 | 57 |
|
74 | | -# Level 1 (geoname) |
75 | | -importer/geonames/download.sh |
76 | | -importer/geonames/import.sh |
| 58 | +## Datasets |
77 | 59 |
|
78 | | -# Worldbnk |
79 | | -python importer/200-worldbank/download.py |
80 | | -sqlite3 -bail world-datas-analysis.db < importer/200-worldbank/import.sql |
81 | | -#international/countryexport_worldbank.sh |
82 | | -#python international/country/download_from_ourworldindata.py |
| 60 | +<!-- BEGIN DATASET --> |
83 | 61 |
|
84 | | -# Vigilo |
85 | | -./importer/vigilo/import_and_export.sh |
| 62 | +| provider | real_provider | dataset | wda_scope | wda_scope_ref | description | source | nb_variables | nb_observations | nb_scopes | |
| 63 | +| ---------- | ------------- | --------------------------------------- | --------- | ------------------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -----------: | --------------: | --------: | |
| 64 | +| opendata3m | opendata3m | wda_opendata3m_ecocompteur_observations | city | wda_geonames_cities | ecocompteur observations | https://data.montpellier3m.fr/dataset/comptages-velo-et-pieton-issus-des-eco-compteurs/resource/edf3e04f-9409-40fe-be66 | 107 | 54149 | 11 | |
| 65 | +| vigilo | vigilo | wda_vigilo_observations | city | wda_geonames_cities | vigilo citizen observations | https://vigilo.city | 111 | 25548 | 173 | |
86 | 66 |
|
87 | | -# Summary |
88 | | -sqlite3 -bail world-datas-analysis.db < db_summary.sql |
| 67 | +<!-- END DATASET --> |
| 68 | + |
| 69 | +## Todo |
| 70 | + |
| 71 | +| Status | Category | Scope | Description | Sample Report | |
| 72 | +| ------ | ------------------ | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | |
| 73 | +| [x] | Geonames | Cities | [Geonames](https://download.geonames.org/export/dump/) | [International Covid-19](international/covid-19/README.md) / [French Covid-19](countries/french/covid-19/README.md) | |
| 74 | +| [x] | bike counter | Montpellier | [Montpellier 3M](https://data.montpellier3m.fr/dataset/comptages-velo-et-pieton-issus-des-eco-compteurs/resource/edf3e04f-9409-40fe-be66) | | |
| 75 | +| [x] | vigilo | Montpellier | [Vigilo](https://vigilo.city) | | |
| 76 | +| [ ] | Covid | Countries | [Johns Hopkins University](https://github.com/CSSEGISandData/COVID-19) | [International Covid-19](international/covid-19/README.md) / [French Covid-19](countries/french/covid-19/README.md) | |
| 77 | +| [ ] | NASA | Countries | [Anormal température](https://data.giss.nasa.gov/gistemp/) | | |
| 78 | +| [ ] | Population | Cities | [insee estimation](https://www.insee.fr/fr/statistiques/1893198) | | |
| 79 | +| [ ] | Population | Cities | [insee](https://www.insee.fr/fr/information/2008354) | | |
| 80 | +| [ ] | Population | Countries | [United nation](https://population.un.org/wpp/Download/Standard/Population/) | | |
| 81 | +| [ ] | Rental bike | Montpellier | [Montpellier 3M](https://data.montpellier3m.fr/dataset/courses-des-velos-velomagg-de-montpellier-mediterranee-metropole) | | |
| 82 | +| [ ] | Weather | Cities | [European Centre for Medium-Range Weather Forecasts](https://confluence.ecmwf.int/display/WEBAPI/Accessing+ECMWF+data+servers+in+batch) | | |
| 83 | +| [ ] | Weather | Cities | [European Climate Assessment & Dataset](https://www.ecad.eu/dailydata/predefinedseries.php) | | |
| 84 | +| [ ] | universitetetioslo | Countries | [CO2 emissions](https://folk.universitetetioslo.no/roberan/GCB2020.shtml) | | |
| 85 | + |
| 86 | +## Project commands |
| 87 | + |
| 88 | +<!-- COMMANDS --> |
| 89 | + |
| 90 | +```text |
| 91 | +justfile commands: |
| 92 | + browse # Browse world datas |
| 93 | + chart # Open browser to grafana page |
| 94 | + db-reset # Reset duckdb database |
| 95 | + doc-update FAKEFILENAME # Update documentation |
| 96 | + docker-build # Build the wda docker image |
| 97 | + docker-duckdb # Run duckdb cli on docker |
| 98 | + docker-push # Push the wda docker image to docker hub |
| 99 | + docker-run CMD="" # Run the wda docker image |
| 100 | + help # This help |
| 101 | + import # Import datasets to sqlite |
| 102 | + lint # Lint the project |
| 103 | + packages # Show installed packages |
| 104 | + precommit-check # precommit check |
| 105 | + precommit-install # Setup pre-commit |
| 106 | + precommit-update # Update pre-commit |
| 107 | + reset # Reset grafana storage |
| 108 | + start # Start grafana |
| 109 | + stop # Stop grafana |
| 110 | + update # Update datasets |
89 | 111 | ``` |
| 112 | + |
| 113 | +<!-- /COMMANDS --> |
0 commit comments