39 lines
1.3 KiB
Python
39 lines
1.3 KiB
Python
import pycen
|
|
import geopandas as gpd
|
|
|
|
sql = 'SELECT * FROM saisie.saisie_observation'
|
|
df = gpd.read_postgis(sql,pycen.con_sicen,geom_col="geometrie")
|
|
|
|
sql = 'SELECT * FROM saisie.v_synthese_invertebre'
|
|
v_inv = gpd.read_postgis(sql,pycen.con_sicen,geom_col="geom")
|
|
v_inv.date_obs = gpd.pd.to_datetime(v_inv.date_obs)
|
|
|
|
v_inv2021 = v_inv[v_inv.date_obs > '2021-01-01']
|
|
|
|
sql = 'SELECT * FROM saisie.v_synthese_vertebre'
|
|
v_vert = gpd.read_postgis(sql,pycen.con_sicen,geom_col="geom")
|
|
v_vert.date_obs = gpd.pd.to_datetime(v_vert.date_obs)
|
|
chiro = v_vert[v_vert.ordre=='Chiroptera']
|
|
|
|
dict_obs_pu = [
|
|
'{"JUTON Mathieu"}', '{"VEILLET Bruno"}',
|
|
'{"SUCHET Patrick","VEILLET Bruno"}',
|
|
'{"SUCHET Patrick"}',
|
|
'{"BIRON Nicolas"}',
|
|
'{"PASQUIER Guillaume"}',
|
|
'{"LUCAS Jérémie"}',
|
|
'{"JUTON Mathieu","PASQUIER Guillaume"}',
|
|
'{"BIRON Nicolas","BONHOMME Baptiste","GROSSI Jean-Luc","JUTON Mathieu"}',
|
|
'{"DELOCHE Denis","BEGUIN Lucile","JUTON Mathieu"}',
|
|
'{"BERENGER Myrtille"}','{"VINCENT Stéphane"}'
|
|
]
|
|
chiro[(
|
|
(chiro.diffusable=="oui") |
|
|
(chiro.observateurs.isin(dict_obs_pu)) |
|
|
chiro.rmq_localisation.str.contains('Camp de Chambaran',case=False))]
|
|
|
|
# IDEM
|
|
# chiro[(
|
|
# (chiro.diffusable=="oui") |
|
|
# (chiro.observateurs.isin(dict_obs_pu)) |
|
|
# (chiro.rmq_localisation=='Camp de Chambaran'))] |