Posts for Tag: California

Bay Area Coronavirus Cases

Posted In: Health
coronavirus bay area

Compare the Bay Area coronavirus cases with Los Angeles and the rest of California

I wanted to better understand the coronavirus situation in my home region, the Bay Area, and I hadn’t seen any good resources that compared what was happening here to other regions in California. So I decided to make this graph. This page will be updated daily so you can come back regularly to see how the situation is changing (and hopefully improving sometime soon).

The coronavirus lockdowns began in mid-March 2020 and things have been opening up in late May, which corresponded to an uptick in coronavirus cases in the Bay Area and throughout California. While the cases in the Bay Area are increasing, it’s clear that there’s a big difference between the Bay Area and much of the rest of California. Los Angeles is currently leading the state with a large increase in the number of new cases in June as the economy tries to reopen restaurants, bars, gyms and other businesses.

You can toggle between coronavirus cases and deaths and look at the absolute numbers or on a per capita basis (per one million inhabitants). California has 39.5 million residents, while greater LA has 18.7 million residents and the Bay Area has 7.7 million residents. The daily data is shown as well as a five day moving average so you can get a better sense of the trends.

The San Francisco Bay Area was among the first regions to impose restrictions on gatherings and encourage people to stay home to fight the virus. In late February, the city of San Francisco declared an emergency in preparation for the upcoming pandemic and by early March, things became clear that life would not continue on as before.

The Bay Area is defined as the nine-county region consisting of Alameda, Contra Costa, Marin, Napa, San Francisco, San Mateo, Santa Clara, Solano and Sonoma counties.

Greater Los Angeles is defined as the 5 county region consisting of Los Angeles, Orange, Ventura, San Bernardino and Riverside counties.

Data and Tools:
County level data on coronavirus cases and deaths is from the New York Times github. Data is processed in python and javascript and graphed using the plotly open source graphing library.
bay area coronavirus cases

Electric Vehicle Sales By State

Posted In: Energy | Technology

Where are electric vehicles being sold in the United States?



Electric vehicles are any vehicle that can be plugged in to recharge a battery that provides power to move the vehicle. Two broad classes are battery electric vehicles (BEVs) which only have batteries as their power source and plug-in hybrid electric vehicles (PHEVs) which have an alternative or parallel power source, typically a gasoline engine. PHEVs are built so that when the battery is depleted, the car can still run on gasoline and operate like a hybrid vehicle similar to a regular Toyota Prius (which is not plugged in at all).

Electric vehicles (EVs) have been sold in the US since 2011 (a few commercial models were sold previous to that but not in any significant numbers) and some conversions were also available. Since then, the number of EVs sold has increased pretty significantly. I wanted to look at the distribution of where those vehicles were located. What is interesting is that California accounts for around 50% of the electric vehicles sold in the United States. Other states have lower rates of EV adoption (in some cases much, much lower). There are many reasons for this, including beneficial policies, public awareness, a large number of potential early adopters and a mild climate. Even so, the EV heatmap of California done early shows that sales are mostly limited to the Bay Area, and LA areas.

The map shows data for total electric vehicle sales by state for years 2016, 2017 or 2018 and also the number of EV sales per 1000 licensed drivers (this is all people in the state with a drivers license, not drivers of EVs). If you hover over a state, you can see both data points for that state.

It will be interesting to see how the next generation of electric vehicles continues to improve, lower in price and become more popular with drivers outside of early adopters.

Data and Tools:
Data on electric vehicle sales is from the Auto Alliance website. Licensed driver data was downloaded from the US Department of Transportation’s Bureau of Transportation Statistics website. The map was made using the leaflet open source mapping library. Data was compiled and calculated using javascript.

Electric vehicle sales by state

Size of California Economy Compared to Rest of US

Posted In: Maps | Money

California is one of the world’s largest economies (as measured by gross domestic product), currently ranking 5th in the world (if it were judged as it’s own country). This map divides the rest of the US economy into 6 more or less equal parts (each the size of California’s) and they are all within about 10% of each other.

Instructions:
You can hover over a state with your cursor to get more information about the GDP of that state and the group of states that equal California’s economy.

Gross domestic product is a measurement of the size of a region’s economy. It is the sum of gross value added from all entities in the region or state. It measures the monetary value of the goods produced and services provided in a year.

The main sectors of the California economy are agriculture, technology, tourism, media (movies and TV) and trade. Some of the world’s largest and most famous companies contribute to the California economy, like Apple, Google, Facebook, Disney, and Chevron.

Data and Tools:
Data for state level GDP is obtained from Wikipedia for the year 2017. The map data is processed in javascript and then plotted using the leaflet.js mapping library.

california gdp

Interactive California Reservoir Levels Dashboard

Posted In: Environment | Water

How much water is in California’s reservoirs?

Check out my new Colorado river reservoirs visualization.

I also added the ability to select specific reservoirs to display on the graph and share a custom URL which will point those selected reservoirs (click on “list” button on top right of dashboard).

If you are reading this, it’s probably the winter rainy season in California again, and time to check on the status of the water in the California reservoirs. I previously made a “bar graph” showing the overall level of water in the major California reservoirs. This dashboard provides a bit more detail on the state of each of the reservoirs while also showing an aggregate total. It updates hourly using data from the California Department of Water Resources (DWR) website, giving an up-to-date picture of California reservoir levels.

This is a marimekko (or mekko) graph which may take some time to understand if you aren’t used to seeing them. Each “row” represents one reservoir, with bars showing how much of the reservoir is filled (blue) and unfilled (brown). The height of the “row” indicates how much water the reservoir could hold. Shasta is the reservoir with the largest capacity and so it is the tallest row. The proportion of blue to brown will show how full it is, while the red line shows the historical level that reservoir is typically at for this date of the water year. The blue line indicates the reservoir’s water level one year ago today. There are many very small reservoirs (relative to Shasta) so the bars will be very thin to the point where they are barely a sliver or may not even show up.

Instructions:
If you are on a computer, you can hover your cursor over a reservoir and the dashboard at the top will provide information about that individual reservoir. If you are on a mobile device you can tap the reservoir to get that same info. It’s not possible to see or really interact with the tiniest slivers. The main goal of this visualization is to provide a quick overview of the status of the main reservoirs in the state and how they compare to historical levels.

You can sort the mekko graph by size – largest at the top to smallest at the bottom – or by reservoir location, from north to south.

If you click on the “list” button in the top right of the dashboard, it will show a list of the reservoirs (in order of size from largest to smallest) and you can check which ones you would like to display. You can also share a custom URL by clicking the “Save URL” button which will put the custom URL into the URL bar of your browser which you can then copy and share. You can also use it to monitor only the reservoirs you are most interested in.

Units are in kaf, thousands of acre feet. 1 kaf is the amount of water that would cover 1 acre in one thousand feet of water (or 1000 acres in water in 1 foot of water). It is also the amount of water in a cube that is 352 feet per side (about the length of a football field). Shasta is very large and could hold about 3.5 cubic kilometers of water at full (but not flood) capacity.

Data and Tools
The data on water storage comes from the California Department of Water Resources’ (DWR) Data Exchange Center. Python is used to extract the data from this page hourly and wrangle the data in to a clean format. Visualization was done in javascript and specifically the D3.js visualization library. It was my first time using D3 and it took me a long time to get up to speed. It takes a fair amount of work to make graphs compared to other more plug-and-play libraries but its very customizable, which is a plus. It was the only tool that I could find that would allow me to make a vertical marimekko graph.

california reservoir levels dashboard

Current Bay Area Air Quality

Posted In: Environment | Health

Fires are once again raging in California and air quality in one of the most populated metropolitan areas in the country (the San Francisco Bay Area) is quite poor. This map show current air quality in the Bay Area. For more information see the EPA’s Air Quality website.

AQI colors

EPA has assigned a specific color to each AQI category to make it easier for people to understand quickly whether air pollution is reaching unhealthy levels in their communities. For example, the color orange means that conditions are "unhealthy for sensitive groups," while red means that conditions may be "unhealthy for everyone," and so on.

Air Quality Index
Levels of Health Concern
Numerical
Value
Meaning
Good 0 to 50 Air quality is considered satisfactory, and air pollution poses little or no risk.
Moderate 51 to 100 Air quality is acceptable; however, for some pollutants there may be a moderate health concern for a very small number of people who are unusually sensitive to air pollution.
Unhealthy for Sensitive Groups 101 to 150 Members of sensitive groups may experience health effects. The general public is not likely to be affected.
Unhealthy 151 to 200 Everyone may begin to experience health effects; members of sensitive groups may experience more serious health effects.
Very Unhealthy 201 to 300 Health alert: everyone may experience more serious health effects.
Hazardous 301 to 500 Health warnings of emergency conditions. The entire population is more likely to be affected.

For more information and additional maps see the EPA’s Air Quality website.

Bay Area Air Quality from Napa and Santa Rosa Fires

Posted In: Environment

The fires in Napa and Santa Rosa California have been burning for about a week and a half so far and these fires have resulted in numerous deaths (with many more missing), significant property damage (over 4000 buildings), and forced the evacuation of tens of thousands from their homes.  Luckily, these fires are mostly contained at this point with incredible work from firefighters and as well as from the weather (link to fire status on the CalFire’s websites on the Tubbs, Atlas, Nuns fires).

(more…)