Fix cumulative co2 emissions
This commit is contained in:
parent
44ca5ebccf
commit
e7d682252e
2 changed files with 8 additions and 6 deletions
14
README.org
14
README.org
|
|
@ -25,25 +25,27 @@ done
|
|||
|
||||
#+RESULTS:
|
||||
|
||||
*** Cumulative CO2
|
||||
*** Cumulative CO2 emissions
|
||||
|
||||
Source: https://ourworldindata.org/grapher/cumulative-co-emissions
|
||||
|
||||
#+begin_src bash :results output replace
|
||||
csvs-to-sqlite \
|
||||
--shape 'Entity:entity(text),Code:code(text),Year:year(integer),"Cumulative CO2 emissions":cumulative_co2_emissions(real)' \
|
||||
-c entity -c code -i year \
|
||||
--shape 'Entity:entity(text),Code:code(text),Year:year(integer),Cumulative CO2 emissions:cumulative_co2_emissions(real)' \
|
||||
--extract-column entity,code \
|
||||
--index year \
|
||||
--replace-tables \
|
||||
sources/cumulative_co2_emissions.csv dbs/climate.db
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: extract_columns=('entity', 'code')
|
||||
: Loaded 0 dataframes
|
||||
: extract_columns=('entity,code',)
|
||||
: Loaded 1 dataframes
|
||||
: Added 1 CSV file to dbs/climate.db
|
||||
|
||||
** Pitalls
|
||||
|
||||
*** My Queries are slow, what do I do?
|
||||
*** My queries are slow, what do I do?
|
||||
|
||||
Make sure SQlite uses the correct indices. You can debug this by writing
|
||||
|
||||
|
|
|
|||
BIN
dbs/climate.db
BIN
dbs/climate.db
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue