Skip to content

Commit

Permalink
wip adding 2020 community fiestas
Browse files Browse the repository at this point in the history
  • Loading branch information
djptek committed Jul 1, 2020
1 parent 35f8105 commit 4467698
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 6 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
For 2019 I translated the fiestas into Json, incuding:
For 2019 & 2020 I translated the fiestas into Json, incuding:

- Fiesta Nacional no sustituible
- Fiesta Nacional respecto de la que no se ha ejercido la facultad de sustitución
- Fiesta de Comunidad Autónoma

Source: https://www.boe.es/diario_boe/verifica.php?c=BOE-A-2018-14369&acc=Verificar&fix_bug_chrome=foo.pdf

Source: https://www.boe.es/diario_boe/txt.php?id=BOE-A-2019-14552

Additional Data: lat/lon from
http://centrodedescargas.cnig.es/CentroDescargas/equipamiento.do?method=mostrarEquipamiento
See License: http://www.ign.es/resources/licencia/Condiciones_licenciaUso_IGN.pdf
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/demos/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,11 @@ public static void main(String[] args) throws java.io.IOException, ParseExceptio
CommunityLoader communityLoader = new CommunityLoader(client);
communityLoader.load();

/*
Need to migrate this to actual objects, not raw JSON otherqwise Kibana breaks :-(
KibanaObjectsLoader kibanaObjectsLoader = new KibanaObjectsLoader(client);
kibanaObjectsLoader.load();
*/

MunicipalityFiestasLoader municipalityFiestasLoader = new MunicipalityFiestasLoader(client);
municipalityFiestasLoader.load();
Expand Down
11 changes: 7 additions & 4 deletions src/main/java/demos/CommunityLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,18 @@ class CommunityLoader {

private static Logger logger = LogManager.getLogger(App.class);
private static BulkResponseDumper bulkResponseDumper = new BulkResponseDumper(logger);
private static String filename = "src/main/resources/fiestas.comunidad.ndjson";
private static File file = new File(filename);

private static String[] filenames = {
"src/main/resources/2019.fiestas.comunidad.ndjson",
"src/main/resources/2020.fiestas.comunidad.ndjson"};
private static DataLoader dataLoader;
private static RestHighLevelClient client;

CommunityLoader (RestHighLevelClient client) {
this.client = client;
this.dataLoader = new DataLoader(client, file, logger);
for (String filename : filenames) {
File file = new File(filename);
this.dataLoader = new DataLoader(client, file, logger);
}
}

void load() throws IOException {
Expand Down
9 changes: 8 additions & 1 deletion src/main/java/demos/Index.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@ enum Index {
MUNICIPIO_VS_COORDS("municipio_vs_coords",
"{\"number_of_shards\":1,\"number_of_replicas\":0}",
"{}");

/*
KIBANA_1(".kibana_1",
"{\"number_of_shards\":1,\"number_of_replicas\":0}",
"{}"),
KIBANA_2(".kibana_2",
"{\"number_of_shards\":1,\"number_of_replicas\":0}",
"{}");
*/

public String lowerCaseString;
public String settings;
Expand Down
File renamed without changes.
35 changes: 35 additions & 0 deletions src/main/resources/2020.fiestas.comunidad.ndjson
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{"date": "2020-01-01", "fiesta": "Año Nuevo", "comunidades": ["ANDALUCÍA","ARAGÓN","ASTURIAS","ILLES BALEARS","CANARIAS","CANTABRIA","CASTILLA-LA MANCHA","CASTILLA Y LEÓN","CATALUÑA","COMUNITAT VALENCIANA","EXTREMADURA","GALICIA","MADRID","MURCIA","NAVARRA","PAÍS VASCO","LA RIOJA","CIUDAD DE CEUTA","CIUDAD DE MELILLA"]}
{"date": "2020-01-07", "fiesta": "Lunes siguiente a Epifanía", "comunidades": ["ANDALUCÍA","ARAGÓN","ASTURIAS","CANARIAS","CASTILLA Y LEÓN","EXTREMADURA","MADRID","MURCIA","NAVARRA","CIUDAD DE CEUTA","CIUDAD DE MELILLA"]}
{"date": "2020-02-28", "fiesta": "Día de Andalucía", "comunidades": ["ANDALUCÍA"]}
{"date": "2020-03-01", "fiesta": "Día de las Illes Balears", "comunidades": ["ILLES BALEARS"]}
{"date": "2020-03-13", "fiesta": "Estatuto de Autonomía de la Ciudad de Melilla", "comunidades": ["CIUDAD DE MELILLA"]}
{"date": "2020-03-19", "fiesta": "San José", "comunidades": ["CASTILLA-LA MANCHA","COMUNITAT VALENCIANA","GALICIA","MURCIA","NAVARRA","PAÍS VASCO"]}
{"date": "2020-04-18", "fiesta": "Jueves Santo", "comunidades": ["ANDALUCÍA","ARAGÓN","ASTURIAS","ILLES BALEARS","CANARIAS","CANTABRIA","CASTILLA-LA MANCHA","CASTILLA Y LEÓN","EXTREMADURA","GALICIA","MADRID","MURCIA","NAVARRA","PAÍS VASCO","LA RIOJA","CIUDAD DE CEUTA","CIUDAD DE MELILLA"]}
{"date": "2020-04-19", "fiesta": "Viernes Santo", "comunidades": ["ANDALUCÍA","ARAGÓN","ASTURIAS","ILLES BALEARS","CANARIAS","CANTABRIA","CASTILLA-LA MANCHA","CASTILLA Y LEÓN","CATALUÑA","COMUNITAT VALENCIANA","EXTREMADURA","GALICIA","MADRID","MURCIA","NAVARRA","PAÍS VASCO","LA RIOJA","CIUDAD DE CEUTA","CIUDAD DE MELILLA"]}
{"date": "2020-04-22", "fiesta": "Lunes de Pascua", "comunidades": ["ILLES BALEARS","CANTABRIA","CASTILLA-LA MANCHA","CATALUÑA","COMUNITAT VALENCIANA","NAVARRA","PAÍS VASCO","LA RIOJA"]}
{"date": "2020-04-23", "fiesta": "San Jorge / Día de Aragón", "comunidades": ["ARAGÓN"]}
{"date": "2020-04-23", "fiesta": "Fiesta Castilla y León", "comunidades": ["CASTILLA Y LEÓN"]}
{"date": "2020-05-01", "fiesta": "Fiesta del Trabajo", "comunidades": ["ANDALUCÍA","ARAGÓN","ASTURIAS","ILLES BALEARS","CANARIAS","CANTABRIA","CASTILLA-LA MANCHA","CASTILLA Y LEÓN","CATALUÑA","COMUNITAT VALENCIANA","EXTREMADURA","GALICIA","MADRID","MURCIA","NAVARRA","PAÍS VASCO","LA RIOJA","CIUDAD DE CEUTA","CIUDAD DE MELILLA"]}
{"date": "2020-05-02", "fiesta": "Día de la Comunidad de Madrid", "comunidades": ["MADRID"]}
{"date": "2020-05-30", "fiesta": "Día de Canarias", "comunidades": ["CANARIAS"]}
{"date": "2020-06-09", "fiesta": "Día de la Región de Murcia", "comunidades": ["MURCIA"]}
{"date": "2020-06-09", "fiesta": "Día de La Rioja", "comunidades": ["LA RIOJA"]}
{"date": "2020-06-11", "fiesta": "Corpus Christi", "comunidades": ["CASTILLA-LA MANCHA"]}
{"date": "2020-06-24", "fiesta": "San Juan", "comunidades": ["CATALUÑA","COMUNITAT VALENCIANA","GALICIA"]}
{"date": "2020-07-25", "fiesta": "Santiago Apóstol / Día Nacional de Galicia", "comunidades": ["GALICIA","PAÍS VASCO"]}
{"date": "2020-07-28", "fiesta": "Día de las Instituciones de Cantabria", "comunidades": ["CANTABRIA"]}
{"date": "2020-07-31", "fiesta": "Fiesta del Sacrificio - Eidul Adha", "comunidades": ["CIUDAD DE CEUTA"]}
{"date": "2020-07-31", "fiesta": "Fiesta del Sacrificio - Aid El Kebir", "comunidades": ["CIUDAD DE MELILLA"]}
{"date": "2020-08-15", "fiesta": "Asunción de la Virgen", "comunidades": ["ANDALUCÍA","ARAGÓN","ASTURIAS","ILLES BALEARS","CANARIAS","CANTABRIA","CASTILLA-LA MANCHA","CASTILLA Y LEÓN","CATALUÑA","COMUNITAT VALENCIANA", "EXTREMADURA","GALICIA","MADRID","MURCIA","NAVARRA","PAÍS VASCO","LA RIOJA","CIUDAD DE CEUTA","CIUDAD DE MELILLA"]}
{"date": "2020-09-02", "fiesta": "Día de Ceuta", "comunidades": ["CIUDAD DE CEUTA"]}
{"date": "2020-09-08", "fiesta": "Día de Asturias", "comunidades": ["ASTURIAS"]}
{"date": "2020-09-08", "fiesta": "Día de Extremadura", "comunidades": ["EXTREMADURA"]}
{"date": "2020-09-11", "fiesta": "Fiesta Nacional de Cataluña", "comunidades": ["CATALUÑA"]}
{"date": "2020-09-15", "fiesta": "La Bien Aparecida", "comunidades": ["CANTABRIA"]}
{"date": "2020-10-09", "fiesta": "Día de la Comunitat Valenciana", "comunidades": ["COMUNITAT VALENCIANA"]}
{"date": "2020-10-12", "fiesta": "Fiesta Nacional de España", "comunidades": ["ANDALUCÍA","ARAGÓN","ASTURIAS","ILLES BALEARS","CANARIAS","CANTABRIA","CASTILLA-LA MANCHA","CASTILLA Y LEÓN","CATALUÑA","COMUNITAT VALENCIANA", "EXTREMADURA","GALICIA","MADRID","MURCIA","NAVARRA","PAÍS VASCO","LA RIOJA","CIUDAD DE CEUTA","CIUDAD DE MELILLA"]}
{"date": "2020-11-02", "fiesta": "Lunes siguiente a Todos los Santos", "comunidades": ["ANDALUCÍA","ARAGÓN","ASTURIAS","CASTILLA Y LEÓN","EXTREMADURA","MADRID"]}
{"date": "2020-12-07", "fiesta": "Lunes siguiente al Día de la Constitución Española", "comunidades": ["ANDALUCÍA","ARAGÓN","ASTURIAS","ILLES BALEARS","CANARIAS","CASTILLA Y LEÓN","EXTREMADURA","MADRID","MURCIA","NAVARRA","LA RIOJA","CIUDAD DE CEUTA","CIUDAD DE MELILLA"]}
{"date": "2020-12-08", "fiesta": "Inmaculada Concepción", "comunidades": ["ANDALUCÍA","ARAGÓN","ASTURIAS","ILLES BALEARS","CANARIAS","CANTABRIA","CASTILLA-LA MANCHA","CASTILLA Y LEÓN","CATALUÑA","COMUNITAT VALENCIANA","EXTREMADURA","GALICIA","MADRID","MURCIA","NAVARRA","PAÍS VASCO","LA RIOJA","CIUDAD DE CEUTA","CIUDAD DE MELILLA"]}
{"date": "2020-12-25", "fiesta": "Natividad del Señor", "comunidades": ["ANDALUCÍA","ARAGÓN","ASTURIAS","ILLES BALEARS","CANARIAS","CANTABRIA","CASTILLA-LA MANCHA","CASTILLA Y LEÓN","CATALUÑA","COMUNITAT VALENCIANA","EXTREMADURA","GALICIA","MADRID","MURCIA","NAVARRA","PAÍS VASCO","LA RIOJA","CIUDAD DE CEUTA","CIUDAD DE MELILLA"]}
{"date": "2020-12-26", "fiesta": "San Esteban", "comunidades": ["ILLES BALEARS","CATALUÑA"]}

0 comments on commit 4467698

Please sign in to comment.