Global Historical Daily Weather Data now available in BigQuery

Historical daily weather data from the Global Historical Climate Network (GHCN) is now available in Google BigQuery, our managed analytics data warehouse. The data comes from over 80,000 stations in 180 countries, spans several decades and has been quality-checked to ensure that it’s temporally and spatially consistent. The GHCN daily data is the official weather record in the United States.

According to the National Center for Atmospheric Research (NCAR), routine weather events such as rain and unusually warm and cool days directly affect 3.4% of the US Gross Domestic Product, impacting everyone from ice-cream stores, clothing retailers, delivery services, farmers, resorts and business travelers. The NCAR estimate considers routine weather only — it doesn’t take into account, for example, how weather impacts people’s moods, nor the impact of destructive weather such as tornadoes and hurricanes. If you analyze data to make better business decisions (or if you build machine learning models to provide such guidance automatically), weather should be one of your inputs.

The GHCN data has long been freely available from the National Oceanic and Atmospheric Association (NOAA) website to download and analyze. However, because the dataset changes daily, anyone wishing to analyze that data over time would need to repeat the process the following day. Having the data already loaded and continually refreshed in BigQuery makes it easier for researchers and data scientists to incorporate weather information in analytics and machine learning projects. The fact that BigQuery analysis can be done using standard SQL makes it very convenient to start analyzing the data.

Let’s explore the GHCN dataset and how to interact with it using BigQuery.

Where are the GHCN weather stations?

The GHCN data is global. For example, let’s look at all the stations from which we have good minimum-temperature data on August 15, 2016:

SELECT
name,
value/10 AS min_temperature,
latitude,
longitude
FROM
[bigquery-public-data:ghcn_d.ghcnd_stations] AS stn
JOIN
[bigquery-public-data:ghcn_d.ghcnd_2016] AS wx
ON
wx.id = stn.id
WHERE
wx.element = ‘TMIN’
AND wx.qflag IS NULL
AND STRING(wx.date) = ‘2016-08-15′

This returns:

By plotting the station locations in Google Cloud Datalab, we notice that the density of stations is very good in North America, Europe and Japan and quite reasonable in most of Asia. Most of the gaps correspond to sparsely populated areas such as the Australian outback, Siberia and North Africa. Brazil is the only gaping hole. (For the rest of this post, I’ll show only code snippets — for complete BigQuery queries and Python plotting commands, please see the full Datalab notebook on github.)

Blue dots represent GHCN weather stations around the world.

Using GHCN weather data in your applications
Here’s a simple example of how to incorporate GHCN data into an application. Let’s say you’re a pizza chain based in Chicago and want to explore some weather variables that might affect demand for pizza and pizza delivery times. The first thing to do is to find the GHCN station closest to you. You go to Google Maps and find that your latitude and longitude is 42 degrees latitude and -87.9 degrees longitude, and run a BigQuery query that computes the great-circle distance between a station and (42, -87.9) to get the distance from your pizza shop in kilometers (see the Datalab notebook for what this query looks like). The result looks like this:

Plotting these on a map, you can see that there are a lot of GHCN stations near Chicago, but our pizza shop needs data from station USW00094846 (shown in red) located at O’Hare airport, 3.7 km away from our shop.

Next, we need to pull the data from this station on the dates of interest. Here, I’ll query the table of 2015 data and pull all the days from that table. To get the rainfall amount (“precipitation” or PRCP) in millimeters, you’d write:

SELECT
wx.date,
wx.value/10.0 AS prcp
FROM
[bigquery-public-data:ghcn_d.ghcnd_2015] AS wx
WHERE
id = ‘USW00094846′
AND qflag IS NULL
AND element = ‘PRCP’
ORDER BY wx.date

Note that we divide wx.value by 10 because the GHCN reports rainfall in tenths of millimeters. We ensure that the quality-control flag (qflag) associated with the data is null, indicating that the observation passed spatio-temporal quality-control checks.

Typically, though, you’d want a few more weather variables. Here’s a more complete query that pulls rainfall amount, minimum temperature, maximum temperature and the presence of some weather phenomenon (fog, hail, rain, etc.) on each day:

SELECT
wx.date,
MAX(prcp) AS prcp,
MAX(tmin) AS tmin,
MAX(tmax) AS tmax,
IF(MAX(haswx) = ‘True’, ‘True’, ‘False’) AS haswx
FROM (
SELECT
wx.date,
IF (wx.element = ‘PRCP’, wx.value/10, NULL) AS prcp,
IF (wx.element = ‘TMIN’, wx.value/10, NULL) AS tmin,
IF (wx.element = ‘TMAX’, wx.value/10, NULL) AS tmax,
IF (SUBSTR(wx.element, 0, 2) = ‘WT’, ‘True’, NULL) AS haswx
FROM
[bigquery-public-data:ghcn_d.ghcnd_2015] AS wx
WHERE
id = ‘USW00094846′
AND qflag IS NULL )
GROUP BY
wx.date
ORDER BY
wx.date

The query returns rainfall amounts in millimeters, maximum and minimum temperatures in degrees Celsius and a column that indicates whether there was impactful weather on that day:

You can cast the results into a Pandas DataFrame and easily graph them in Datalab (see notebook in github for queries and plotting code):

BigQuery Views and Data Studio 360 dashboards
Since the previous query pivoted and transformed some fields, you can save the query as a View. Simply copy-paste this query into the BigQuery console and select “Save View”:

SELECT
REPLACE(date,”-“,””) AS date,
MAX(prcp) AS prcp,
MAX(tmin) AS tmin,
MAX(tmax) AS tmax
FROM (
SELECT
STRING(wx.date) AS date,
IF (wx.element = ‘PRCP’, wx.value/10, NULL) AS prcp,
IF (wx.element = ‘TMIN’, wx.value/10, NULL) AS tmin,
IF (wx.element = ‘TMAX’, wx.value/10, NULL) AS tmax
FROM
[bigquery-public-data:ghcn_d.ghcnd_2016] AS wx
WHERE
id = ‘USW00094846′
AND qflag IS NULL
AND value IS NOT NULL
AND DATEDIFF(CURRENT_DATE(), date) < 15 )
GROUP BY
date
ORDER BY
date ASC

Notice my use of DATEDIFF and CURRENT_DATE functions to get weather data from the past two weeks. Saving this query as a View allows me to query and visualize this View as if it were a BigQuery table.

Since visualization is on my mind, I can go over to Data Studio and easily create a dashboard from this View, for example:

One thing to keep in mind is that the “H” in GHCN stands for historical. This data is not real-time, and there’s a time lag. For example, although I did this query on August 25, the latest data shown is from August 22.

Mashing datasets in BigQuery
It’s quite easy to execute a weather query from your analytics program and merge the result with other corporate data.

If that other data is on BigQuery, you can combine it all in a single query! For example, another BigQuery dataset that’s publicly available is airline on-time arrival data. Let’s mash the GHCN and on-time arrivals datasets together:

SELECT
wx.date,
wx.prcp,
f.departure_delay,
f.arrival_airport
FROM (
SELECT
STRING(date) AS date,
value/10 AS prcp
FROM
[bigquery-public-data:ghcn_d.ghcnd_2005]
WHERE
id = ‘USW00094846′
AND qflag IS NULL
AND element = ‘PRCP’) AS wx
JOIN
[bigquery-samples:airline_ontime_data.flights] AS f
ON
f.date = wx.date
WHERE
f.departure_airport = ‘ORD’
LIMIT 100

This yields a table with both flight delay and weather information:

We can look at the distributions in Datalab using the Python package Seaborn:

As expected, the heavier the rain, the more the distribution curves shift to the right, indicating that flight delays increase.

GHCN data in BigQuery democratizes weather data and opens it up to all sorts of data analytics and machine learning applications. We can’t wait to see how you use this data to build what’s next.

Quelle: Google Cloud Platform

Visit Docker @ Microsoft Ignite – Booth #758

 

Next week Microsoft will host over 20,000 IT executives, architects, engineers, partners and thought-leaders from around the world at Microsoft Ignite, September 25th-30th at the Georgia World Congress Center in Atlanta, Georgia.
Visit the Docker booth to learn how developers and IT pros can build, ship, and run any application, anywhere, across both Windows and Linux operating systems with Docker. By transforming modern application architectures for Linux and Windows applications, Docker allows business to benefit from a more agile development environment with a single journey for all their applications.
Don’t miss out! Docker experts will be on-hand to for in-booth demos to help you:

      Deploy your first Docker Windows container
      Learn about Docker containers on Windows Server 2016
      Manage your container environment with Docker Datacenter on Windows

Calling all Microsoft MVPs!

Attend our daily in booth theater session “Docker Containers for Linux and Windows&; with Docker evangelist Mike Coleman in the Docker booth @ 2PM every day. Session attendees will receive exclusive Docker and Microsoft swag.
To learn more about how Docker powers Windows containers, add these key Docker sessions to your Ignite agenda:
GS05: Reinvent IT infrastructure for business agility
Microsoft’s strategy centers on empowering you – the IT professionals &; to generate business value within your organizations. With Microsoft Azure and Azure Stack, you can leverage the power of cloud to drive business agility and developer productivity With the launch of Windows Server 2016 and Microsoft System Center 2016, you can accomplish more than ever before in your existing datacenters. And with Operations Management Suite, you can securely manage all of your on-premises and cloud infrastructure from one place. Microsoft Corporate VP Jason Zander discusses in-depth the latest technology innovations across all of these areas that help you reinvent your IT infrastructure, and be a hero within your organizations.
Speaker: Jason Zander, Microsoft
 
BRK3146: Dive into the new world of Windows Server and Hyper-V Containers
Applications need to be always available, globally accessible, scalable and secure in today’s 24/7 economy. Businesses must be able to deploy rapid updates and revisions at a lower cost with fewer resources than ever before to be competitive. Containers are an amazingly powerful technology for building, deploying and hosting applications that have been proven to reduce costs, improve efficiency and reduce deployment times &8211; making it a hot new feature in Windows Server 2016. We dive into the architecture features of the new container technology, talk about development and deployment experiences and best practices, along with some of the new Windows innovations such as Hyper-V Containers and Active Directory backed container identity.
Speakers: Taylor Brown, Microsoft & Patrick Lang, Microsoft
Thursday, September 29, 9:00am &8211; 10:15am, Room A1
BRK3147: Accelerate application delivery with Docker Containers and Windows Server 2016
Applications are changing and Docker is driving the containerization movement to deliver new microservices applications or provide a new construct to package legacy applications. Attend this session to learn how the combination of Docker, Linux, Microsoft Windows Server and Microsoft Azure technologies together deliver an application platform for hybrid cloud apps. Accelerate your app delivery and gain freedom to use any stack across a secure software supply chain.
Speakers: Mike Coleman, Docker & Taylor Brown, Microsoft
Thursday, September 29, 12:30pm &8211; 1:45pm, Room A411 &8211; A412
BRK3319: The Path to Containerization – transforming workloads into containers
Containers, micro-services and Docker are all the rage but what workloads are they used for? And how can you take advantage of these transformative new technologies? In this session you will hear from a user that has succeeded in taking their existing .Net application and migrated it into Windows containers proving them the agility and flexibility to further transform the application. But where do I start with containers? We will further cover concepts and best practices for identifying and migrating applications from existing deployments into containers and how to start down the path to microservice architectures.
Speakers: Taylor Brown, Microsoft & Matthew Roberts, Microsoft
To get ready for Ignite and to learn more about Docker, read the eBook Containers for the Virtualization Admin by Docker Technical Evangelist Mike Coleman.
More resources

Learn more about Docker for the Enterprise
Read the white paper: Docker for the Virtualization Admin
See all the integrations between Docker and Microsoft
Learn more about Docker Datacenter

The post Visit Docker @ Microsoft Ignite &8211; Booth 758 appeared first on Docker Blog.
Quelle: https://blog.docker.com/feed/

Social Justice YouTubers Are About To Get A Big Boost

Social Justice YouTubers Are About To Get A Big Boost

Today, YouTube announced a global initiative that endorses a select group of YouTube video creators who confront issues ranging from hate speech to xenophobia in their videos posted on the site. The program, called Creators for Change, will profile and promote six “ambassadors” — though there are more to come, the company says — and provide $1 million in grants and equipment to videographers aspiring to make work focused on positive change.

In a press release, the company said it wants the ambassador project to “demonstrate the incredible power YouTube has to generate a positive social impact,” especially “in a time when the internet is criticized for fueling division and distrust.”

The six ambassadors each focuses on different issues, including minority media representation, xenophobia, and religious tolerance. Each creates different types of videos, ranging from lifestyle vlogs to design theory lessons to comedy. They hail from an array of countries, and not all of them are even YouTube famous, with the exception of Australia’s Natalie Tran, also known as CommunityChannel, with 1.8 million subscribers, and Nilam Farooq of Germany, who has 1.1 million. The other ambassadors are Fakir Almobtaghi Abdelouahid of Belgium, known on his channel as Abdel en Vrai, Omar Hussein of Saudi Arabia, Bar&x131;&x15F; Özcan of Turkey, and Humza Arshad of the United Kingdom, known by his channel name HumzaProductions.

YouTube will give its Creators for Change ambassadors production and equipment grants to fulfill a social impact project of their choice. The ambassadors will also work with YouTube to select the recipients of the $1 million in grants and production equipment.

Arshad said in a prepared statement, “I&;m honoured Google and YouTube have asked me to be their global ambassador for their campaign against Islamophobia. Right now so many people are suffering because of faith-based hatred and are too afraid to go on about their daily lives.” He creates short comedic videos about his life as a Muslim man in the UK in the series Diary of a Bad Man.

HumzaProductions&039; Diary of a Bad Man

youtube.com

As part of the Creators for Change initiative, YouTube will create its own videos profiling each of the ambassadors. In his profile, Arshad focuses on the negative perception of Islam and how he uses comedy to work against it. “I thought I should bring that positive energy that Muslims bring to the table to the mainstream,” he said in the video. “I try my best to change the perception that people have of Muslims. We’re just like everyone else…just a bit hairier.”

youtube.com

Tran, who has been creating videos since 2006 about her travels, her life and the representations of Asian people in media, has accrued half a billion channel views. In prepared statement, she said that one of things she appreciated about YouTube “is how willing people are to start or engage in real conversations.”

Here she is her talking about Asian representation in media and how it’s affected her life:

Here she is her talking about Asian representation in media and how it's affected her life:

justinjonestv.tumblr.com / Via justinjonestv.com

justinjonestv.tumblr.com / Via justinjonestv.com

justinjonestv.tumblr.com / Via justinjonestv.com

YouTube has struggled with a reputation for having some of the worst comment sections on the internet, though it has in recent years attempted to clean them up. When asked how it plans to moderate comments on Creator videos, a YouTube spokesperson told BuzzFeed News, “We are deeply troubled by reports of harassment on YouTube, and we work hard to address this issue through strict policies that prohibit misconduct.”

YouTube also plans to support more localized versions of Creators for Change in conjunction with NGOs and schools that will resemble its recent program in France that explored fraternité, French for “brotherhood,” in 140 videos featuring 700 participants. The company told BuzzFeed News it may name American ambassadors soon. The announcement of Creators for Change comes alongside a $2 million commitment from Google.org to nonprofits promoting inclusion and cross-cultural understanding.

Quelle: <a href="Social Justice YouTubers Are About To Get A Big Boost“>BuzzFeed