SnowEx / snowexsql

A project to access the SnowEx database holding data from the NASA SnowEx campaign
https://snowexsql.readthedocs.io/en/latest/readme.html
GNU General Public License v3.0
23 stars 6 forks source link

Duplicate density profile data? #53

Open micahjohnson150 opened 3 years ago

micahjohnson150 commented 3 years ago

@micah-prime found this issue using the following query.

from snowexsql.data import LayerData 
from snowexsql.db import get_db 
from snowexsql.conversions import query_to_geopandas
from datetime import date 
engine, session = get_db(db_name) 

qry = session.query(LayerData)
qry = qry.filter(LayerData.date == date(2020, 2, 8))
qry = qry.filter(LayerData.site_id =="6N16")
qry = qry.filter(LayerData.type=='density')

df = query_to_geopandas(qry, engine)

Produces a data frame that has the density profile twice where one has the value AND samples A,B,C and the other only has the value.

hpmarshall commented 3 years ago

Are the density profiles identical? Sounds like a duplicate entry. @meganmason can you check your QA/QC notes on this? We definitely want to keep the one with samples A,B,C if so.

micahjohnson150 commented 3 years ago
depth value sample_a sample_b sample_c
0 121 306 317 295
1 111 279 263 295
2 101 316.5 306 327
3 91 376.5 378 375
4 81 349 356 342
5 71 360 385 335
6 61 332 324 340
7 51 341 335 347
8 41 383 366 400
9 31 350.5 346 355
10 21 334 347 321
11 11 315.5 326 305
12 111 279
13 121 306
14 101 316.5
15 91 376.5
16 81 349
17 71 360
18 61 332
19 51 341
20 41 383
21 31 350.5
22 21 334
23 11 315.5

Looks like it. Here is the markdown table of the results.

hpmarshall commented 3 years ago

Thanks. Yup, that looks like a duplicate. Same date/time?

micahjohnson150 commented 3 years ago

Yep!