Skip to content
Snippets Groups Projects
Commit 19c7f841 authored by Riccardo Boero's avatar Riccardo Boero :innocent:
Browse files

Added check on results form

parent 54e7307f
No related branches found
No related tags found
No related merge requests found
......@@ -138,6 +138,11 @@ function eu_lfs(conn::MySQL.Connection, selection::Dict)
query = "SELECT Nace as industry, ((EmpTh_Q1+EmpTh_Q2+EmpTh_Q3+EmpTh_Q4)/4)*1000 as jobs FROM LFS WHERE Year = $year AND GeoID = '$id';"
# execute
result = query_connection(conn, query)
if !("industry" in names(result))
println("No data returned for query with GeoID = $full_id and Year = $year and AND Agglvl_code = $agglvl_code.")
# Initialize `result` with the expected columns but no rows
#result = DataFrame(industry = String[], jobs = Float64[], geo_id = String[], agg_level = Int[])
end
# add geo_id col
result[!, :geo_id] = fill(id, nrow(result))
# add agg level
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment