Giter Site home page Giter Site logo

lds_temples's Introduction

LDS Temples Far and Wide

Salt-Lake City Temple

Salt lake city temple

There are 214 temples as of Oct 2020 based on the data set downloaded from the link below. The top five contries that containt temples are United States(96), Mexico(14), Brazil(11), Canada(9), Argentina(5). The Top US States that have temples are Utah(24), California(8), Arizona(6), Idaho(6) and Texas(5). I was suprised to learn that there are no temples in the following states Deleware, Iowa Kansas, Main, Mississippi, New Hampshire, New Jersey, Rhode Island, South Dakota, Vermont, West Virginia, Wisconsin. Side note the data set used contains less temples then what the actuall website shows. I will be conducting further analysys and updating my files as needed.


For this project I will analyzing and creating Choropleth Maps from the following data set: Temples of the Church of Jesus Christ of Latter Day Saints. The CSV file contains the following data fields:

  • Temple
  • Latitude
  • Logitude
  • LatitudeDegrees
  • LongitudeDegress
  • Address
  • City
  • State
  • Postal Code
  • Country
  • Phone

Technology Used

Process

setup

I used jupyter notebook for my analysis with the following set up

import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import chart_studio.plotly as py
import plotly.graph_objs as go
import pandas as pd
from plotly.offline import download_plotlyjs, init_notebook_mode,plot,iplot
import cufflinks as cf
init_notebook_mode(connected=True)
%matplotlib inline
cf.go_offline()

Analysis

I used pandas to read in the csv data and create a dataframe

data = "Resources/ChurchofJesusChristTemples.csv"
temple_data = pd.read_csv(data)
temple_data.head()

dataframe

I checked the date set for missing values by using isnull() and how many rows and columns the data set contained by using .shape and nunique() to determine the number of unique values in the temple column.

Questions

How many temples are there world wide?

Total Number of Temples

What are the top 5 countries with temples?

Top 5 Countries

How many temples in the USA?

Total Number of temples in US

What are the top 5 US States with temples?

Top 5 US States

Choropleth Map

In order to create two maps based on country and US we need to use pandas .groupby() and filter the data by United States for my analysis. You can change this to filter by other countries if this is something of interest.

temples_by_country = temple_data.groupby(['Country'])
united_states = temple_data.loc[temple_data['Country'] == "United States"].reset_index()
By Country

Country Plot

By United States

To use the USA States geometry, I need to provide the locations as two-letter state abbreviations: The states column contained the full name I used the .map() with this dictionary to map the full state name to the two-letter state abbreviation

us_state_abbrev = {
    'Alabama': 'AL', 'Alaska': 'AK',
    'American Samoa': 'AS', 'Arizona': 'AZ', 'Arkansas': 'AR', 'California': 'CA', 'Colorado': 'CO', 'Connecticut': 'CT', 
    'Delaware': 'DE', 'District of Columbia': 'DC', 'Florida': 'FL', 'Georgia': 'GA', 'Guam': 'GU', 'Hawaii': 'HI',
    'Idaho': 'ID', 'Illinois': 'IL', 'Indiana': 'IN','Iowa': 'IA', 'Kansas': 'KS', 'Kentucky': 'KY','Louisiana': 'LA',
    'Maine': 'ME','Maryland': 'MD', 'Massachusetts': 'MA', 'Michigan': 'MI', 'Minnesota': 'MN', 'Mississippi': 'MS','Missouri': 'MO',
    'Montana': 'MT','Nebraska': 'NE','Nevada': 'NV','New Hampshire': 'NH','New Jersey': 'NJ','New Mexico': 'NM','New York': 'NY',
    'North Carolina': 'NC', 'North Dakota': 'ND','Northern Mariana Islands':'MP','Ohio': 'OH', 'Oklahoma': 'OK','Oregon': 'OR',
    'Pennsylvania': 'PA','Puerto Rico': 'PR','Rhode Island': 'RI', 'South Carolina': 'SC','South Dakota': 'SD','Tennessee': 'TN',
    'Texas': 'TX', 'Utah': 'UT', 'Vermont': 'VT', 'Virgin Islands': 'VI','Virginia': 'VA', 'Washington': 'WA',
    'West Virginia': 'WV','Wisconsin': 'WI','Wyoming': 'WY'
}
temple_count_state['Abbrev'] = temple_count_state['State'].map(us_state_abbrev)

State Plot

lds_temples's People

Contributors

azuniga1 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.