Description Usage Arguments Details Examples
View source: R/get_insee_idbank.R
Get data from INSEE series idbank
1 2 3 4 5 6 7 8 |
... |
one or several series key (idbank) |
limit |
by default, the function get_insee_idbank has a 1200-idbank limit. Set limit argument to FALSE to ignore the limit or modify the limit with the following command : Sys.setenv(INSEE_idbank_limit = 1200) |
startPeriod |
start date of data |
endPeriod |
end date of data |
firstNObservations |
get the first N observations for each key series (idbank) |
lastNObservations |
get the last N observations for each key series (idbank) |
Get data from INSEE series idbank
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | #example 1 : import price index of industrial products and turnover index : manufacture of wood
data = get_insee_idbank("001558315", "010540726")
#example 2 : unemployment data
library(tidyverse)
idbank_list = get_idbank_list()
df_idbank_list_selected =
idbank_list %>%
filter(nomflow == "CHOMAGE-TRIM-NATIONAL") %>% #unemployment dataset
filter(dim5 == 0) %>% #men and women
mutate(title = get_insee_title(idbank))
idbank_list_selected = df_idbank_list_selected %>% pull(idbank)
unem = get_insee_idbank(idbank_list_selected)
#example 3 : French GDP growth rate
library(tidyverse)
idbank_list = get_idbank_list()
df_idbank_list_selected =
idbank_list %>%
filter(nomflow == "CNT-2014-PIB-EQB-RF") %>% # Gross domestic product balance
filter(dim1 == "T") %>% #quarter
filter(dim4 == "PIB") %>% #GDP
filter(dim6 == "TAUX") %>% #rate
filter(dim10 == "CVS-CJO") #SA-WDA, seasonally adjusted, working day adjusted
idbank = df_idbank_list_selected %>% pull(idbank)
data = get_insee_idbank(idbank)
#plot
ggplot(data, aes(x = DATE, y = OBS_VALUE)) +
geom_col() +
ggtitle("French GDP growth rate, quarter-on-quarter, sa-wda") +
labs(subtitle = sprintf("Last updated : %s", data$TIME_PERIOD[1]))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.