<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by andresjvazquez on Medium]]></title>
        <description><![CDATA[Stories by andresjvazquez on Medium]]></description>
        <link>https://medium.com/@adjimenez?source=rss-200b46a8165a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*I3nrOJTA725zaBbW</url>
            <title>Stories by andresjvazquez on Medium</title>
            <link>https://medium.com/@adjimenez?source=rss-200b46a8165a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 16:15:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@adjimenez/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Pandas on Titanic Project]]></title>
            <link>https://medium.com/@adjimenez/pandas-on-titanic-project-d64673d372f3?source=rss-200b46a8165a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d64673d372f3</guid>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[andresjvazquez]]></dc:creator>
            <pubDate>Mon, 26 Aug 2019 22:55:43 GMT</pubDate>
            <atom:updated>2019-08-26T22:55:43.028Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/299/1*15edUTS8UNp84eolzPgogw.jpeg" /><figcaption>Titanic needs Pandas</figcaption></figure><p>To begin this pandas project I needed to read the data by downloading the Titanic data csv from Kaggle. I reviewed the data dictionary to read the explaination of each of columns’ meaning and to familiarize myself with the csv’s structure. Then I loaded the csv into a Jupiter Notebook to begin the Data Cleaning Process.</p><p>To get a clear idea of the data I was working with, I created a bar chart showing how many missing values were in each column. Matplotlibs format was troublesome to get right (with all of its different parameters when plotting charts and graphs).</p><p>I then used the .replace method to replace hundreds of missing values with with empty quotes since they don’t cause the same issues nan’s do when manipulating entire columns with pandas.</p><p>I also used for loops that iterated through different columns to make new columns (for example I iterated through Sex column to append males into a male_column and females into a female column)</p><p>It took some time to get familiar with using np. where to get booleans that returned true only if a certain condition was true. I mainly used np.where to calculate number passenger survivor types of (for example, the number reverends that survived) or to calculate the survival rate of a passenger type (for example the survival rate of females). After performing all of these pandas operations and calculations, I battled to the death with matplotlib trying to plot basic charts and here are the results (I plan to make matplotlib a cakewalk in upcoming projects)</p><p>In summary, my main issues were: plotting with Matplotlib, creating suctions containing coditional appends to an empty list, and using the np.where method. What became familiar to me in this project was using the .replace and the .dropna methods.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d64673d372f3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Predicting the price of homes at sale Project]]></title>
            <link>https://medium.com/@adjimenez/predicting-the-price-of-homes-at-sale-project-22abcebb7042?source=rss-200b46a8165a------2</link>
            <guid isPermaLink="false">https://medium.com/p/22abcebb7042</guid>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[andresjvazquez]]></dc:creator>
            <pubDate>Mon, 26 Aug 2019 22:07:33 GMT</pubDate>
            <atom:updated>2019-08-26T22:07:33.257Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Z9y3yNYxm3sKwaqkqQU8Q.jpeg" /><figcaption>Zillow Group and its subsidiaries have an interest in making accurate house price predictions</figcaption></figure><p>My data science problem was to use the Ames housing data to create a regression model that predicts the sales price of houses in Ames, IA</p><p>Using housing data to predict sales prices of houses is important to buyers, homeowners looking to sale, and Real Estate Companies like Trulia and Zillow investigate. Using data to predict accurate and reasonable sales prices can ultimately determine whether a potential buyer bothers inquiring about a house’s price listing to homeowners or Real Estate Companies.</p><p>The type of models developed were linear regression, lasso, and ridge.</p><p>The success of my model is evaluated using the root mean squared error (RMSE). The root mean squared error (RMSE) was also used to gauge the performance of my Kaggle submission.</p><p>In statistics, simple linear regression is a linear regression model with a single explanatory variable.</p><p>That is, it concerns two-dimensional sample points with one independent variable and one dependent variable (conventionally, the x and y coordinates in a Cartesian coordinate system) and finds a linear function (a non-vertical straight line) that, as accurately as possible, predicts the dependent variable values as a function of the independent variables.</p><p>To begin data cleaning, I reviewed the data description.<br>As for imputing missing values appropriately, it was a tossup between populating missing values with the median values or mean values of their respective column.<br>With respect to distributions examined, I focused mainly examining the correlation between sales price and the other features in the training dataset<br>I found using summary statistics like .describe(), .count() and .sum() useful for EDA.</p><p>On the Preprocessing and Modeling phase, I used exploratory data analysis to question correlation and relationship across predictive variables.</p><p>After some investigation using correlation and heatmaps, I determined<br>that the OverallQual feature: Overall material+finish quality &amp;<br>The GrLivArea feature: Above grade (ground) living area square feet were the two main predictive variable features that could guide my model to a good prediction of house sales prices.</p><p>The data was scaled using the StandardScaler from Scikit-Learn</p><p>I used train-test split, cross-validation, and data with unknown values for the target (predicted sales price) to simulate the modeling process</p><p>For validation purposes, train_test_split was used on the data.</p><p>I proceeded to test 3 models to identify a production algorithm: linear regression, lasso, and ridge.</p><p>Predictions were outputted in a format showing ID pared with Sales Price</p><p>My choice of production model ended up being Lasso since its coefficients appear to be the least inflated (which I realize may not be the best indicator if the best performing model overall).</p><p>Stakeholders might have interest in using this model to improve their understanding of a house+property’s (even neighborhood) worth. This understanding of higher and lower home sales prices could also be of interest to homeowners since investors could introduce services into the area that reflect the demand of the local homeowners.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22abcebb7042" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Disaster Corpus in Client Disaster Mapping Project]]></title>
            <link>https://medium.com/@adjimenez/building-a-disaster-corpus-in-client-disaster-mapping-project-1b6159b9bcee?source=rss-200b46a8165a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b6159b9bcee</guid>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[andresjvazquez]]></dc:creator>
            <pubDate>Mon, 26 Aug 2019 21:46:23 GMT</pubDate>
            <atom:updated>2019-08-26T21:46:23.009Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CM6GwjaAueF827D8l5ss4A.jpeg" /></figure><p>This post discusses my trials of a group project dealing with mapping tweets needing help in Disasters. Tweets were pulled using Twitters API and were then imported and concatenated three data frames each containing tweets that pertain to a natural disaster: Camp Fire, Carre, Fire, and Hurricane Harvey.</p><p>To clean up the data a little bit I created an nltk WordNetLematizer class to serve as a parameter for the CountVectorizer fuction so that words can be shortened to their base forms and not be confused as completely different words.</p><p>I also created an nltk RegexpTokenizer (regular expressions tokenzier) class to serve as a parameter for the CountVectorizer function to remove punctuation &amp; convert all words to lower case.</p><p>I then ran skleanr’s CountVectorizer with the WordNetLammatizer, RegexpTokenizer, stop_words parameters to transform the lists of the tweet words into training data features that I can pass into a model. CountVectorizer created columns, where each column counts how many times each word was observed each tweet. These features became a pandas series called tweet_words.</p><p>Then I sorted each word in the tweet_words series by its count frequency and converted the series into a data frame called tweet_words_with_counts to get a clear view of related words.</p><p>I briefly scanned and manually removed words (like https and rt) that were completely unrelated to help words. I then created a list of help related words based on their word frequency.</p><p>In the last process of Building this disaster corpus, I then inputted tweet_words_with_counts as the corpus into a Word2Vec model so that I can use Word2Vec’s .most_smiliar method to find and append more help-related words into the existing list of help related words</p><p>To find and append more help-related words, I repeated the Word2Vec procedure once more using gensim’s Wikipedia data as the new corpus. After performing Word2Vec on both corpora I ended up with an expanded list of 337 help related words. I then scanned the list one final time to handpick the final disaster words for the training data labeling phase of the project (which concluded my trials of the project).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b6159b9bcee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web API and Classification on Reddit Project]]></title>
            <link>https://medium.com/@adjimenez/web-api-and-classification-on-reddit-project-cb90ca18a07a?source=rss-200b46a8165a------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb90ca18a07a</guid>
            <category><![CDATA[reddit]]></category>
            <dc:creator><![CDATA[andresjvazquez]]></dc:creator>
            <pubDate>Mon, 26 Aug 2019 21:20:48 GMT</pubDate>
            <atom:updated>2019-08-26T21:23:10.100Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*U8aCIq7H1y5CyILV3i2qqA.jpeg" /><figcaption>Zoroastrian Reddit</figcaption></figure><p>In this project, I used Reddit’s API to collect posts from two subreddits: Confucianism and Zoroastrianism</p><p>I used NLP to train a classifier that determines which subreddit a given post came from. This is a binary classification problem.</p><p>I then imported requests, scii-kit learn, and pandas.</p><p>Next, I created a variable containing the zoroastrian son subreddit and another variable containing the confucious son subreddit</p><p>I then checked the status code for a green light to proceed.</p><p>To use Reddit’s API, I needed to add .json to the end of the url: <a href="https://www.reddit.com/r/Confucianism.json">https://www.reddit.com/r/Confucianism.json</a> &amp; <a href="https://www.reddit.com/r/Zoroastrianism.json">https://www.reddit.com/r/Zoroastrianism.json</a></p><p>I gathered and prepared the data using the requests library</p><p>Reddit allows users to pull 25 posts per request. To get enough data, I needed to hit Reddit’s API repeatedly with a for loop.</p><p>I performed a for loop on both sub reddits to request more posts and append them to lists</p><p>I also needed to use the time.sleep() function at the end of the for loop loop to allow for a break in between requests (that way I’m not flagged by Reddit as a bot).</p><p>Since the API will cap you at 1,000 posts for each subreddit, once I had about 1000 posts were collected from both subreddits, I converted the lists to pandas data frames so that I can export a cleaner view of the data and perform sci-kit learn modeling</p><p>I set all Zoroastrian posts to have a label column of 0 and set all Confucianism posts to have a label column of 1</p><p>Performed countvestorizer on my both posts text data convert my columns into matrix representation</p><p>I performed train_test_split.</p><p>Logistic regression was used make my binary classification task work.</p><p>Calculated the cross val score mean and fortunately due to to the dramatically different languages and philosophies of each subreddit, my score was 92%</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb90ca18a07a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beautiful Soup Webscraping Project]]></title>
            <link>https://medium.com/@adjimenez/beautiful-soup-webscraping-project-806fafe6f31?source=rss-200b46a8165a------2</link>
            <guid isPermaLink="false">https://medium.com/p/806fafe6f31</guid>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[andresjvazquez]]></dc:creator>
            <pubDate>Sun, 25 Aug 2019 23:29:36 GMT</pubDate>
            <atom:updated>2019-08-25T23:40:55.782Z</atom:updated>
            <content:encoded><![CDATA[<h3>Blog Post 2: Beautiful Soup Webscraping Project</h3><p>In this project, I attempted to practice web scraping with Beautiful Soup. I scraped ChubbyGrub.com to create a pandas data frame that captures each food items’ name, restaurant, category, calories, carbs, fat.</p><p>The first step I took to achieve the goal was to import all of the python libraries needed into my working Jupyter notebook. I imported the requests library so that I can eventually have BeautifulSoap make a web request to Chubbygrub.com so that data can be collected.</p><p>I imported the pandas library so that I can manipulate the data in useful ways. I then imported BeautifulSoup from the B4 library so that I can convert the data collected into an object that resembles json which makes data manipulated easier.</p><p>After importing libraries, the next step I took was to first use the request’s status code attribute on the chubbygrub.com url to make sure that there were no server errors or connection issues on my end.</p><p>After confirming a green light status code of 200, I proceeded to initialize the requests.get method on the chubbygrub.com url and also initialized the .content attribute so that I can capture the url content.</p><p>I then created an beautiful soup object that takes in the parameters that I instantiated ( requests.get method &amp; .content attribute)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3B98SVk4hO_ktDTUFsibrw.png" /><figcaption>ChubbyGrub.com was scraped for my Beautiful Soup Webscraping Project</figcaption></figure><p>After setting up the Beautiful Soup Data Collection flow, the next big step I took was to actually scrape the home page soup for every restaurant.</p><p>I used a for loop to iterate through all the food items’ restaurants and appended each restaurant’s name to an empty list named restaurants.</p><p>While iterating through the for loop I also appended each food items’ slug to an empty list named slug_loop.</p><p>After appending each food items’s restaurant &amp; slug into their respective lists, I proceeded to iterate through the slug list to populate a foods dictionary with every food item with its individual calories, carbs, category, fat, name. I then converted the foods dictionary into a pandas data frame so that to make the data into a readable format with each food item’s info represented by a row with the 6 column details about each particular row. To make the pandas data frame into a neat deliverable, I exported it as csv and managed to accomplish my goals.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=806fafe6f31" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blog Post 1]]></title>
            <link>https://medium.com/@adjimenez/blog-post-1-de9c01918b16?source=rss-200b46a8165a------2</link>
            <guid isPermaLink="false">https://medium.com/p/de9c01918b16</guid>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[andresjvazquez]]></dc:creator>
            <pubDate>Wed, 12 Jun 2019 19:09:24 GMT</pubDate>
            <atom:updated>2019-08-25T23:42:50.561Z</atom:updated>
            <content:encoded><![CDATA[<h3>Blog Post 1: Nested Dictionaries Project</h3><p>06/11/2019</p><h3>Andre Jimenez</h3><p>DSI-US-8-SF</p><p>Blog Post 1</p><p>This post will detail my skirmishes with using and indexing nested dictionaries/lists in our Pokemon Lab. Indexing nested dictionaries and lists was really difficult to do. Indexing dictionaries by their keys and trying to figure out whether my current location was an array, string, integer, float or another dictionary was quite hard to keep track of. I relied heavily on .keys() method and type() method to navigate through the dictionaries but sometimes in a haste, I’d skip using these keys/type methods only to find myself completely lost again in my dictionary.</p><p>There were 3 particularly painful memories where I experienced hardships with indexing: def add_player(), def create_and_add_to_pokedex(), and the def add_pokemon_to_player() functions. The add_player() function simply adds a player to my to poke_players dictionaries. Sounded simple but the problem was that I didn’t fully realize that the add_player() function was actually throwing a dictionary (new_player) into another parent dictionary (poke_players)…so I had a hard time understanding that I needed to assign the newly created dictionary (new_player) to the ‘player_id’ key (which needed to be accessed via: poke_players[new_player[‘player_id’]]).</p><p>My second battle dealt with the same concept. Add a new key:value pair to the pokedex dictionary via create_and_add_to_pokedex function sounded simple but I didn’t notice that the this newly added key is the poke_id key of the other pokemon_dict dictionary and I also didn’t notice that the newly added value corresponding to this newly added key is the value of the other pokemon_dict dictionary. The key to solving this was assigning poke_id like so: pokedex[poke_id][‘poke_id’] = poke_id.</p><p>My third and final painful memory was grappling with defining the add_pokemon_to_player() function to capture pokemon. The part where I particularly struggled with was adding the newly captured pokemon’s poke_id to the player_pokemon field of the specified player</p><p>I failed to remember that my key (poke_id integer) needed to be correspond to the value (pokemon_dict dictionary) via the following code (very messy and by far the hardest to get my head around):</p><p>pokedex[poke_id][‘poke_id’] = poke_id</p><p>poke_players[player_id][‘player_pokemon’].update({pokedex[poke_id][‘poke_id’]:pokedex[poke_id]})</p><p>These dilemmas of losing myself in the nested dictionaries repeated themselves quite a bit and ultimately I had to learn to slow down and apply the keys/type methods throughout each step of coding in order not to get lost in my notebook. I learned quite a bit through these beatings.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de9c01918b16" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>