Skip to content

Latest commit

 

History

History
293 lines (203 loc) · 20.8 KB

application-directory.md

File metadata and controls

293 lines (203 loc) · 20.8 KB

Demography Applications

ACS Webmap

The ACS map is updated each year after the new ACS data is loaded into postgres, generally in January. Previously we created a new map for each year but starting with the 2017-2021 ACS we are making all years available within the application as a menu item in the 2nd button in the top left corner of the map.

To update this map to the newest year you will need to pull the github repository into your development environment. From there, add the new year into the index.html and change the initialize_cMap.js file to reflect the new acs database in the cMap.db variable. Then update webpack and push it back to github.

Adding more variables is pretty easy, those are done in the datatree.js and tableflavor.js, basically you add a json type item for each variable category. Look at other variables to get a sense of the proper format. The hardest part is finding the database table and column to draw the correct value.

The data is drawn from the data schema in the ACS database through the SDO Census API, the geography is drawn from the carto schema.

Age-Animation Bars

D3 chart showing single year of age from 1990 to 2050 for Colorado and every county, updated annually. Runs from a json file that has to be updated through an R script.

Age Distribution by County

Pretty simple line chart drawing from a table stored in ArcGIS Online. Just have to replicate the table with new data.

Base Industries Bar Chart

Pulls data from the base analysis table via the demog lookup. For a new year, update the dates in the chart and update the startdata variable in app2.js to reflect the current year's data in Alamosa.

BGU Viewer (2010)

Old application, haven't seen the need to update for 2020

Bracketology

Update as desired, March is a good time. To update, just go into the repository and update the population data in main.js

Broadband Status Map

Was an application to show the status of broadband plans implemented in rural Colorado. Likely obsolete at this point. Updates were made by changing the geojson files to show which maps each community should show up on.

Census Data Query Tool

Tool using the SDO Census API to allow users to obtain CSVs, jsons and geojson files for ACS tables. Once the new ACS database is loaded, a couple things need to be updated in the index.html in the repository. Add the option for the new ACS, make it selected and change $('$datasetl').val and loadtables to the new acs

Census Data Timeseries (non-functional)

Census 2020 Interactive Map

Javascript map created using the ArcGIS Javascript API and pulling from data in ArcGIS Online. Will be adding more data categories as more 2020 Census data is released.

Colorado DOLA Grants

Data is pulled from the grants.csv file in google cloud storage. That file is created from an R script that pulls the data from the Oracle database. I run this script at the beginning of every month. (need to put the script in github. The application itself is a webpack application and needs to be pushed to a developmental environment, updated, webpacked and pushed back to webpack.

Colorado County Population Change (Bubbles)

Simple D3 animation of the change of population among Colorado counties over the decades. To update, just add to the json file stored in datasets.js

Colorado County Population Change (Animated Pie)

Simple D3 animation of the change of population among Colorado counties over the decades. To update, just add to the json file stored in flare.json

Colorado Demographic Profiles

Colorado Municipal Boundaries

Map to show the annexation data stored in postgres. The map itself pretty much never needs updating but the data is updated directly in postgres using QGIS. Will generally update a batch of annexations and then it is necessary to run postgis-transform.sql in pgadmin to update the muni boundary layer from the annexation changes. There are also shapefiles available to download from the application, these are created manually after running the sql program and then uploaded into google cloud.

Colorado Municipal Data Map

Application that we host for the Colorado Municipal League. Data is a geojson of the municipal boundaries with data on each municipality attached. CML will send new data yearly if there are any changes. Data is kept in K:\ProjectsMain\WebMaps\MuniInfoMap. Can make a new file with updated municipal boundaries if desired but it's not really necessary.

Colorado Special Districts

Map showing the special districts in Colorado. Only those covered by Title 32 are included. All districts are maintained in postgres and updated using QGIS. We are limited by what the districts submit, so we do not have boundaries or current boundaries for all districts. New shapefiles for the different district types should also be created after major updates. The Special Districts API feeds the districts to the application.

For the search by name function to work, the district has to be included in the geopts.json file. After new districts have been created, run the following command in the bounds schema of the postgres database, export the result and load it into the github repository. SELECT lgid, ST_AsGeoJSON(st_transform(ST_Centroid(geom),4326)) as centroid, ST_AsGeoJSON(st_transform(ST_Envelope(geom),4326)) as bbox FROM bounds.districts;

Colorado Unemployment Map

Map showing unemployment statistics by county from the Bureau of Labor and Statistics. BLS updates this data roughly monthly. Currently doing the pull using an R script that can be found at (https://github.com/ColoradoDemography/BLS_Unemployment_R). This creates a json file that then needs to be modified slightly. Found it easiest to do this in notepad, could probably modify the script to do it though. the [] at the ends and the / have to be deleted. Once ready, put this file in google cloud.

Compare Cities (Likeness Tool)

Not being maintained at this time, a way to show a comparison of municipalities and CDPs in Colorado by 15 different factors.

Components of Change Map

Map showing the number and rates of births, deaths and migration in counties between desired years. The data is drawn from our estimates database using the demog lookup. Changes have to be made in a development environment so that webpack can be applied. Changes to the data will be made automatically when new data is loaded into the database but the default year has to be changed within the program. This map also serves as the base architecture for the age and job change maps.

COVID Map Series

Series of maps and charts in ArcGIS Online showing a variety of statistics about COVID and its impacts. Modifying this going into the future to be a more general dashboard.

Demography Dashboard (old version)

Demography Dashboard (new version)

This is maintained inside the website repository now as a javascript application.

Density Map

ESRI Javascript API application showing the density of population and census block from the 2020 Census, also includes a swipe to compare against 2010. Blocks are generalized into categories by density so that the individual blocks don't have to be stored in ArcGIS Online.

Demography Data Lookups

These all pull data from the estimates database in postgres via the demog lookup. Slowly replacing with new lookups within the website.

Grants by County (2012-2021)

Historical County Populations

Series of maps showing Colorado's counties and their populations through history.

Historical Birthplaces of Colorado Residents

Application hosted in Flourish to show what states Colorado residents were born in through history. Need the Flourish login to access

Historical Residence of Colorado Born

Application hosted in Flourish to show where people born in Colorado have lived through history. Need the Flourish login to access

Job Change Map

Map showing the change in the number of jobs in counties between desired years. The data is drawn from our estimates database using the demog lookup. Changes have to be made in a development environment so that webpack can be applied. Changes to the data will be made automatically when new data is loaded into the database but the default year has to be changed within the program.

Jobs and Migration

Bar and line chart showing job change and migration by year for all counties. Both pieces of data are pulled from our estimates database using the demog lookup. Nnew years have to be added within the repository in app.js

Job Sector Chart

Job Sector County Map

Map to show job sectors by county, both total and percent. Pulls data from a version of the jobs table that is specifically created for this chart by taking the original jobs table in the postgres estimates database and replacing all nulls with 0 and creating the new table called jobs0. This application has to be updated in a development environment due to using webpack. The queried years variable in workers/load_data.js has to be updated each yearas well as variables in three of the other javascript files (add_title_control.js, get_from_dom.js and init_object.js).

Map Gallery

This is where we maintain the list of publically released visualizations

Marijuana Grant Eligibility Map

Map of counties eligible for marijuana grants. Hasn't been updated in quite awhile, based upon the needs of https://cdola.colorado.gov/funding-programs/marijuana-enforcement-grant

Migration Animation (Bubbles)

Old visualization of migration to and from Colorado based upon 2006-2010 ACS data. Hasn't been updated as it's not particularly useful, need a better version at some point. Migration data is rather lacking currently due to survey issues around the pandemic.

Net Migration Dashboard

Population Change by Age

-Github -Application Link

Map showing the change in population by age in Colorado counties between the selected years. Draws from the county_sya table in the estimates database through the demog lookup. Large data pull, thus the long initialization time. This application has to be updated in a development environment due to using webpack. The load_data.js and add_custom_control.js have to be updated each year.

Poverty by Age

Map showing poverty levels for different age groups based upon ACS 5 year data. Built using ArcGIS Javascript API version 3. The data is stored in ArcGIS Online. Uses data from ACS table B17024, probably easiest to download all census tract data from our API, then change the column headings to match what was used the previous year. Join to the census tract geography and delete all rows except geoid and the data columns. Load into ArcGIS Online as a shapefile and adjust indiv.js to point at the new feature class.

Quadrant Chart

Not being used currently but an interesting application that compares counties or states on up to 3 variables at once from the ACS. May be worth reviving?

Rural-Urban Commuting Areas (RUCA)

Uses data from the US Department of Agriculture, released after each census. May be worth reconstructing this map when the new data is released in 2024.

SRF Disavantaged

Unemployment Chart

Chart showing unemployment statistics by county from the Bureau of Labor and Statistics. BLS updates this data roughly monthly. Currently doing the pull using an R script that can be found at (https://github.com/ColoradoDemography/BLS_Unemployment_R). This creates a json file that then needs to be modified slightly. Found it easiest to do this in notepad, could probably modify the script to do it though. the [] at the ends and the / have to be deleted. Once ready, put this file in google cloud. The length of the chart needs to be extended in the program with each new year.

Unemployment Ribbon

USDA Webmap

Pushing applications live

Applications that live in Github repositories Need to be pulled from within the dlg-coreos VM.

  • SSH into the VM
  • docker exec -it website2 bash
  • cd coloradodemography.github.io
  • cd _site
  • cd into the directory with the name of the application
  • git pull

Architecture Descriptions (archive reference only)

  • Client Applications are purely static web applications with no server-side code dependancies. Often the data is served in a CSV or JSON file along with the application code. These applications are written in a mix of HTML, CSS, and Javascript. These applications are served via Github Project Pages from their repository.
  • Client Application + Print are like pure Client Applications, with the exception that they call a server process for print/save functionality. In the event of server failure, these applications would still function without issue (aside from inabilty to save/print). These applications are served via Github Project Pages from their repository.
  • Client-Microservice Architecture are web applications that are written in HTML, CSS and Javascript, but which use AJAX calls to retrieve dynamic data from the web server (gis.dola.colorado.gov). These applications are served via Github Project Pages from their repository, however they depend heavily on data from the server to function correctly.
  • Server Applications are applications that are served directly from gis.dola.colorado.gov rather than Github (demography.dola.colorado.gov). They can be written in any language.