[PULL REQUEST] add in military employment#245
Conversation
There was a problem hiding this comment.
Pull request overview
Adds military active duty employment into the Employment estimates workflow so it is output as its own sector (industry_code = 'MIL') at the MGRA level and included in regional control totals.
Changes:
- Introduces a new SQL extract to allocate military active duty job counts to MGRA polygons.
- Extends the employment input pipeline to ingest military MGRA jobs, add a military control total, and include military jobs in the controlled MGRA-by-industry output.
- Updates the expected distinct
industry_codecount in the integration test constants to account for the newMILsector.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
sql/employment/get_military_employment.sql |
New query to spatially join military active duty employment to MGRAs and return MGRA-level job counts under industry_code = 'MIL'. |
python/employment.py |
Loads the new military query output, appends its regional total into control_totals, validates the new input, and includes military jobs in the MGRA jobs dataset. |
python/tests.py |
Updates distinct-count expectations for industry_code to include the new MIL category. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
There is run in production database for |
Eric-Liu-SANDAG
left a comment
There was a problem hiding this comment.
I haven't looked at any code yet, just at the output data of [run_id] = 199. A few points I hope you can address before I review any further:
- Does military employment include recruitment? From Google Maps, I see a lot of military recruitment buildings which do not have associated military employment
- Why does military employment not cover the whole base? For example, in Coronado, only some of the MGRAs have military employment when I would expect for all MGRAs:
- Pretty much all military bases are captured. Please double check:
- March FFS
- Oceanside coast guard office?
No, military reports it by major base installations.
Try to assign them to MGRAs that have the most buildings or group of buildings. Coronado is the only one you could possibly add a couple extra points to incorporate 1 or 2 extra MGRAs (3745 and 5556) but they are more the outskirts of the base on Coronado Island and think it would be fine to add or leave as is. @GregorSchroeder maybe worth your review if it worth to add 1-2 extra points to incorporate those 2 MGRAs
This is fine as office looks small and probably actually report within Camp Pendleton. There has been issue with how coast guard count have been historically reported. We currently locate all coast guard jobs to the location close to the airport as this is the main and biggest Coast guard location in San Diego |
Hmm, but should we be including recruitment in military employment? Is the only reason we don't include it because the military report doesn't? Is recruitment already captured by some employment sector? |
We are just capturing active duty military which is publicly reported. These reports are done by base installations and locations. We sited only locations within those know base locations. This is the most defensible to SANDAG and don't think we should be siting active duty military outside of those locations to possibly capture recruitment, which would probably involve very minimal counts anyways. If these recruiting jobs are done by non active duty or civilians then they would possibly be captured in other data sets like the LEHD LODES data which is used to capture all other employment, excluding self employment and military |
|
Can you do a little more investigation on this topic? Either confirm that:
|
From some research it looks recruiting is mainly done by active duty members and the military reports we use intentionally sites this employment on base instead of at a recruitment facility. Here are two separate sources source 1 source 2 |
I agree with Bryce’s point that we are trying to assign them to the MGRAs that contain the most buildings or clusters of buildings. Think of these as the travel‑destination MGRAs. The outer areas of the North Island MGRAs house testing sites and bomb storage facilities, not offices. Imagine a pilot arriving at North Island in the morning, he or she drives in, parks near one of the offices, reports for duty, and then walks or takes another vehicle to the jet. We count the office as the employment location, not the location of the jet. I think what we are missing is MGRA 9161. Based on the imagery, there appear to be office buildings there. I am adding a point and splitting the share from MGRA 7514. @bryce-sandag please review the gdb and update. Overall, the goal of these MGRA assignments is to understand where the offices and active‑duty employment locations are, despite the lack of building‑level employment counts. For large military installations with multiple MGRAs, we do not want to distribute employment evenly across all of them, we used to do that, prior to SR 13, and the results didn’t look right. Instead, in the absence of detailed building‑level information, we estimate the employment share for the MGRAs that contain offices or other relevant buildings. A good way to illustrate this is through mapping. When creating a dot density employment map using mgra, we want the employment clusters to appear in the portions of the base where the offices are, not scattered uniformly across the whole installation. At the same time, it’s important to understand that this is not building level accuracy, just a more reasonable approximation of where employment activity is concentrated. Please keep in mind that we want to focus our efforts on the MGRAs that clearly contain clusters of activity or meaningful office, or employment uses. If we begin including every MGRA with just a small office or two, we will then need to estimate additional employment shares for all those areas, which introduces more uncertainty. Our goal is to keep the assumptions reasonable and avoid pushing the process into too much guesswork. |
|
new test run ready to review with |
GregorSchroeder
left a comment
There was a problem hiding this comment.
approved, do not merge until permanent home is found for military employment table and the get_military_employment.sql file is updated
There was a problem hiding this comment.
You added a comment regarding "SE" being added, should probably also add a comment regarding "MIL" being added.
There was a problem hiding this comment.
will need to update source once table is moved
may run into double-hop issue if the table is put into [EMPCORE]
Please title Pull Request with prefix [PULL REQUEST]
Describe this pull request. What changes are being made?
Add in the military job counts to the employment estimates module as 'MIL' sector in industry_code
What issues does this pull request address?
close #242
Additional context
Work was done to site military active duty employment from 2010-2025 and want to use this effort to add military employment to employment estimates